Downloads · 30 days
9
6% of all-time downloads
aaa961/finetuned-bge-base-en-firefox
finetuned-bge-base-en-firefox is a sentence similarity model from aaa961. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from BAAI/bge-base-en. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphras…
Downloads · 30 days
9
6% of all-time downloads
All-time downloads
146
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from BAAI/bge-base-en. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True, 'architecture': 'BertModel'})
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Normalize()
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("aaa961/finetuned-bge-base-en-firefox")
# Run inference
sentences = [
"Loss of bookmarks state after OS hibernation User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0\n\nSteps to reproduce:\n\nKept Firefox 88.0 open for several days, using hibernate on Windows inbetween.\nCreated several bookmarks using Ctrl-D and Shift-Ctrl-D both for private as well as non-private sites.\nAlso created some bookmarks by dragging from address bar into subfolders of bookmark window.\nI was wondering, that on some windows star icon an address bar did not become blue.\nVerified, that i already had bookmarked this site by pressing Ctrl-D. The appropriate bookmarks subfolder was shown. Star still did not become true.\nAnything else seem ok.\nDid quit Firefox using File->Quit menu command, saving session with all open tabs.\nDid start Firefox with restoring previous session using menu command.\n\n\nActual results:\n\nSome of the bookmarks created above are lost. Can't remember most of them.\nHowever i remember a few sites, which i definitely had created a bookmark for.\nNo bookmark exists.\nAlso there is no entry in history for these sites. Missing entry in history might be due to using private window. (Can't remember if i was using a private window for opening this site.)\n\nI repeatedly had lost both bookmarks and history entries some month ago and then created a new profile. Did not import anything from previous profiles. \n\n\nExpected results:\n\nBookmarks should have been saved as expected.",
'Messages with triggers cause trigger listeners to initialize multiple times [Currently](https://searchfox.org/mozilla-central/rev/07342ce09126c513540c1c343476e026cfa907bf/browser/components/newtab/lib/ASRouter.jsm#827) we call the `.init` function of every trigger (when defined).\nThis makes sense for `openURL` where we accumulate more URLs but for others it is a bug\n* moments trigger will add multiple setIntervals\n* whatsNew will evaluate multiple times which is wasteful).',
'Urlbar docs: In index.rst, the Architecture Overview link in the Where to Start section is broken In index.rst, the Architecture Overview link in the Where to Start section links to an unrelated page in the devtools docs.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 1.0000, 1.0000],
# [1.0000, 1.0000, 1.0000],
# [1.0000, 1.0000, 1.0000]])
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
bge-base-en-train| Metric | Value |
|---|---|
| cosine_accuracy | 0.4904 |
bge-base-en-train| Metric | Value |
|---|---|
| cosine_accuracy | 0.5142 |
| texts | label | |
|---|---|---|
| type | string | int |
| details | <ul><li>min: 17 tokens</li><li>mean: 211.84 tokens</li><li>max: 511 tokens</li></ul> | <ul><li>1: ~26.20%</li><li>2: ~21.70%</li><li>3: ~42.90%</li><li>4: ~0.80%</li><li>5: ~8.40%</li></ul> |
| texts | label |
|---|---|
| <code>The "X" button of the opt-in modal is only read as "button" using a screen reader [Affected Versions]:<br>- Firefox Beta 97.0b2 (Build ID: 20220111185943)<br>- Firefox Nightly 98.a1 (Build ID: 20220111093827)<br><br>[Affected Platforms]:<br>- Windows 10 x64<br>- Ubuntu 20.04 x64<br>- macOS 10.15.7<br><br>[Prerequisites]:<br>- Have Firefox Beta 97.0b2 downloaded on your computer.<br>- Have the "browser.search.region" set to "US".<br>- Have one of the treatment user.js on your computer.<br>- Make sure there is no other modal displayed when starting the browser (browser default window, onboarding for new users etc).<br>- Have a screen reader application opened.<br><br>[Steps to reproduce]:<br>1. Open Firefox Beta 97.0b2.<br>2. Navigate to the “about:support” page and paste the user.js file into the Profile folder.<br>3. Restart the browser.<br>4. Focus on the "X" button of the modal.<br>5. Listen to what the screen reader application reads.<br><br>**[Exp...</code> | <code>1</code> |
| <code>Text and radio buttons are overlapping on PDF Tested with:<br>Nightly 91.0a1 (2021-06-23)<br><br>Tested on:<br>Win 10<br><br>Preconditions:<br>In about:config, set pdfjs.enableXfa = true<br><br>Steps:<br><br>1. Launch Firefox<br>2. Open the attached pdf.<br>3. Go to "Taille de l'entreprise"<br><br>Actual result:<br>Radio buttons and text are overlapping.<br><br>Expected result:<br>Text and radio buttons should be properly displayed</code> | <code>1</code> |
| <code>opening a new private window shows the old private window start page for a moment with browser.privatebrowsing.felt-privacy-v1, causing a bad perceived performance STR:<br><br>1. Set browser.privatebrowsing.felt-privacy-v1 to true<br>2. Open a private window<br><br>Actual:<br><br>The content of the old private window start page is visible during the window creation. This causes a very visible jump of the content and the window creation feels slow. Please see the following screencast:<br><br>https://www.youtube.com/watch?v=Fax2VqefuuY<br><br>You can change the speed to 0,25 on YouTube to see it even better.<br><br>Expected:<br><br>No felt performance issue.</code> | <code>3</code> |
| texts | label | |
|---|---|---|
| type | string | int |
| details | <ul><li>min: 16 tokens</li><li>mean: 209.86 tokens</li><li>max: 508 tokens</li></ul> | <ul><li>1: ~26.30%</li><li>2: ~21.00%</li><li>3: ~42.50%</li><li>4: ~0.70%</li><li>5: ~9.50%</li></ul> |
| texts | label |
|---|---|
| <code>(Proton) (a11y) Selected tabs almost not to see STR:<br><br>1. select multiple tabs<br><br>Expected:<br><br>You have no difficulties to see your selected tabs.<br><br>Actual:<br><br>It's almost not possible (at least to me) to see the selected tabs due to a insufficient contrast between the tab bar color and the tab color.<br><br>Marking as regression since it has a11y implications compared to pre Proton.</code> | <code>2</code> |
| <code>The Not Now button from the Fakespot Onboarding sidebar is missing the Clicked State Found in<br>* Nightly 118.0a1 (2023-08-18)<br><br>Affected versions<br>* Nightly 118.0a1 (2023-08-18)<br><br>Affected platforms<br>* ALL<br><br>Preconditions:<br>Set the browser.shopping.experience2023.enabled - TRUE<br>Set the toolkit.shopping.useOHTTP - TRUE<br><br>Steps to reproduce<br>1. Reach about:preferences and turn off feature recommendations.<br>2. Reach the Amazon https://www.amazon.com/dp/B09B6ZXD2V/ref=sbl_dpx_office-desks_B0B4CYW8FB_0 link <br>3. Click and Hold the Not Now button from the Onboarding Shopping sidebar.<br><br>Expected result<br>* The Not now button from the Onboarding Shopping sidebar should change its state when Clicked.<br><br>Actual result<br>* The Not now button from the Onboarding Shopping sidebar is missing the Clicked state.<br><br>Regression range<br>Not Applicable</code> | <code>1</code> |
| <code>Missing data from table Tested with:<br>Nightly 91.0a1 (2021-06-22)<br><br>Tested on:<br>Win 10<br><br>Preconditions:<br>In about:config, set pdfjs.enableXfa = true<br><br>Steps:<br><br>1. Launch firefox<br>2. Open the attached PDF<br><br>Actual result:<br>No data in table is displayed<br><br>Expected result:<br>A table with data should be displayed</code> | <code>1</code> |
eval_strategy: stepsper_device_train_batch_size: 2per_device_eval_batch_size: 2gradient_accumulation_steps: 8learning_rate: 2e-05num_train_epochs: 5warmup_ratio: 0.1fp16: Truebatch_sampler: group_by_labeloverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 2per_device_eval_batch_size: 2per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 8eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 5max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: group_by_labelmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | Validation Loss | bge-base-en-train_cosine_accuracy |
|---|---|---|---|---|
| 0.2950 | 100 | 5.4327 | 5.0655 | 0.5050 |
| 0.5900 | 200 | 5.2042 | 5.0281 | 0.4919 |
| 0.8850 | 300 | 5.1393 | 5.0186 | 0.5009 |
| 1.1829 | 400 | 5.1552 | 5.0137 | 0.5004 |
| 1.4779 | 500 | 5.0807 | 5.0111 | 0.4989 |
| 1.7729 | 600 | 5.0634 | 5.0092 | 0.4982 |
| 2.0708 | 700 | 5.1017 | 5.0079 | 0.4985 |
| 2.3658 | 800 | 5.0431 | 5.0067 | 0.4913 |
| 2.6608 | 900 | 5.0378 | 5.0058 | 0.4888 |
| 2.9558 | 1000 | 5.0332 | 5.0051 | 0.4904 |
| 3.2537 | 1100 | 5.08 | 5.0048 | 0.4897 |
| 3.5487 | 1200 | 5.0277 | 5.0043 | 0.4899 |
| 3.8437 | 1300 | 5.0257 | 5.0041 | 0.4888 |
| 4.1416 | 1400 | 5.075 | 5.0039 | 0.4924 |
| 4.4366 | 1500 | 5.0235 | 5.0038 | 0.4937 |
| 4.7316 | 1600 | 5.0224 | 5.0038 | 0.4904 |
| -1 | -1 | - | - | 0.5142 |
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->