SentenceTransformer based on BAAI/bge-m3
This is a sentence-transformers model finetuned from BAAI/bge-m3. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: BAAI/bge-m3
- Maximum Sequence Length: 8192 tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
(1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'cls', 'include_prompt': True})
(2): Normalize({})
)
Usage
Direct Usage (Sentence Transformers)
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("pameydorke/arcanum-cross-platform-retriever-4-hard-negatives")
# Run inference
queries = [
'multiverse edition graphic glitch',
]
documents = [
"Original Post: Weird graphic bug while using Multiverse edition. https://imgur.com/a/eh6d2TU\n\nAny ideas? There seems to be a sort of outline around sprites, in buildings this results in these lines you can see that can go vertically and horizontally, it's not visible in this particular shot but it also shows around characters, as a sort of frame around the player model.\n\nI tried messing with the launcher options but nothing worked.\n\nOn this subject, is Multiverse edition really supposed to be more unstable than vanilla + some patches? Because I remember playing this game a few years ago for a little while (didn't even beat Black Mountain clan dungeon IIRC) and it had a lot less issues than the version I'm using now, and if I remember correctly I just had a few patches and the resolution patch back then.\n\nWith Multiverse edition I ran into a lot of bugs so far, random crashes but also a specific one that triggers always if I try to access a certain part of the log book, once during the bank robbery in Shrouded Hills my disposition towards everyone skyrocketed to 5000+, this visual bug, probably a few others I forgot... It doesn't seem very stable at all.",
"Original Post: Visual Background Bug. I tried playing the vanilla game but I had this bug where the UI (the brown part where your inventory and info is) would be covered in black pixels you had to hover your mouse above to clear, so I went and installed the UAP but now it's gone to hell\n----------EDIT-------------\nmy bad y'all, it was an old UAP, I think it was v0.9 I found on a very old Arcanum site, I tried again with V2.2 on the Nexus and this bug is gone, the game works fine now but the loading times after each transition take soooooooo long. User 1: Try installing a more recent ddraw.dll. The one from the UAP's high res patch is too old. https://github.com/narzoul/DDrawCompat/releases User 2: I don't know if this will work for you but for similar issues I've found adding -doublebuffer to the launch parameters helped. User 3: Updating my GPU firmware helped me with this in the past.",
'Stringy Pete. Stringy Pete. Stringy Pete Location: Stringy Petes Cove. "I don\'t talk much about him..I\'ll just say that Stringy Pete was the meanest, cold-blooded, murdering pirate who ever put to sail, and be done with it..there are stories and legends, and most of \'em are true.\xa0 He\'s been dead for more\'n two hundred years, and people still whisper his name when they talk about him..". —Captain Edward Teach. The most cruel, ruthless and\xa0Ax-Crazy\xa0pirate of all times, feared all over Arcanum. He died more than two centuries ago, but rumors are that his spirit still sails the seas, punishing anyone who plays with his name..',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 1024] [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[ 0.6833, 0.3603, -0.0365]])
Evaluation
Metrics
Information Retrieval
- Dataset:
val-hard-negatives - Evaluated with InformationRetrievalEvaluator
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5603 |
| cosine_accuracy@3 | 0.7528 |
| cosine_accuracy@5 | 0.8101 |
| cosine_accuracy@10 | 0.8742 |
| cosine_precision@1 | 0.5603 |
| cosine_precision@3 | 0.2509 |
| cosine_precision@5 | 0.162 |
| cosine_precision@10 | 0.0874 |
| cosine_recall@1 | 0.5603 |
| cosine_recall@3 | 0.7528 |
| cosine_recall@5 | 0.8101 |
| cosine_recall@10 | 0.8742 |
| cosine_ndcg@10 | 0.7173 |
| cosine_mrr@10 | 0.667 |
| cosine_map@100 | 0.6719 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 16,596 training samples
- Columns: anchor, positive, and negative
- Approximate statistics based on the first 100 samples:
anchor positive negative type string string string modality text text text details min: 7 tokensmean: 9.31 tokensmax: 14 tokens min: 88 tokensmean: 387.27 tokensmax: 823 tokens min: 18 tokensmean: 396.6 tokensmax: 941 tokens - Samples:
anchor positive negative compound bow explosives requirement Pyrotechnic Bow. Pyrotechnic Bow. The Pyrotechnic Bow Schematic can be found on the second level of the Black Mountain Clan. Expertise. Requires an expertise of 45 in Explosives Requires an expertise of 20 in Mechanical. Ingredients. Fire Obstruction + Compound Bow Fire Obstruction is the sixth degree in Explosvies The Compound Bow schematic can be purchased from Blacksmiths. Effects. One unit can be obtained per unit of both components Stats: 1-10 HD, 2-5 FT, 5-20 FD, 8 SP, 20 RNG, 5 WE, 80 QU. Used as an ingredient for:. None. Notes. The Mistress of Fire in Tulla carries a Pyrotechnic Bow. Item Page Explosives. Explosives. Explosives. A Technological Discipline concerned with the research and development of unstable substances. Schematic Components Description Found in-game? Component for something else? Molotov Cocktail Fuel (8)Rag (n/a) Thrown weapon. Explodes on contact, dealing moderate damage, and causes significant knockback to all characters caught in the blast radius. 1 unit is made. Flash Grenade Magnesium (20)Wine (n/a) Thrown weapon. Causes blindness to characters caught in the blast radius, but deals no damage. 5 units are made. Smoke Grenade Tom's Fertilizer (23)CK Sugar (n/a) Thrown weapon. Creates a 6x4 area of smoke on where it lands, drastically reducing accuracy of all characters within, and ranged attacks from anywhere. 5 units are made. Stun Grenade Stearic Acid (38)Saltpeter (5) Thrown weapon. Stuns all characters caught in the blast radius. 4 units are made. Explosive Grenade Black Powder (55)Metal Can (n/a) Thrown weapon. Causes significant damage to all cha... compound bow explosives requirement Pyrotechnic Bow. Pyrotechnic Bow. The Pyrotechnic Bow Schematic can be found on the second level of the Black Mountain Clan. Expertise. Requires an expertise of 45 in Explosives Requires an expertise of 20 in Mechanical. Ingredients. Fire Obstruction + Compound Bow Fire Obstruction is the sixth degree in Explosvies The Compound Bow schematic can be purchased from Blacksmiths. Effects. One unit can be obtained per unit of both components Stats: 1-10 HD, 2-5 FT, 5-20 FD, 8 SP, 20 RNG, 5 WE, 80 QU. Used as an ingredient for:. None. Notes. The Mistress of Fire in Tulla carries a Pyrotechnic Bow. Item Page Time Bomb. Time Bomb. The Time Bomb Schematic can be purchased at Gun Shops. Expertise. Requires an expertise of 85 in Explosives Requires an expertise of 80 in Mechanical. Ingredients. Dynamite + Clock Parts Dynamite is the seventh degree in Explosives Clock Parts can be purchased from Junk Dealers and Inventor Shops. Effects. One unit can be obtained per unit of both components Does delayed AoE dynamite damage without NPCs becoming hostile. Used as an ingredient for:. None. Notes. The Time Bomb must be placed, and not dropped or thrown. Item Page compound bow explosives requirement Pyrotechnic Bow. Pyrotechnic Bow. The Pyrotechnic Bow Schematic can be found on the second level of the Black Mountain Clan. Expertise. Requires an expertise of 45 in Explosives Requires an expertise of 20 in Mechanical. Ingredients. Fire Obstruction + Compound Bow Fire Obstruction is the sixth degree in Explosvies The Compound Bow schematic can be purchased from Blacksmiths. Effects. One unit can be obtained per unit of both components Stats: 1-10 HD, 2-5 FT, 5-20 FD, 8 SP, 20 RNG, 5 WE, 80 QU. Used as an ingredient for:. None. Notes. The Mistress of Fire in Tulla carries a Pyrotechnic Bow. Item Page Dynamite. Dynamite. This schematic is learned when you the acquire the Seventh Degree in the Explosives discipline. Ingredients. Nitroglycerin + Saltpeter Saltpeter can be bought from General Stores, Herbalists, and Inventors Shops Nitroglycerin can be bought from Inventors. Effects. One unit can be obtained per unit of both components It is a placed item that causes AoE physical and Fire Damage Items that are nearby or equipped by enemies also suffer fire damage. Used In. Time Bomb Plastique. Item Page. Notes. Dynamite can not be bought. But some can be found, for example, at the Crash Site Cave, in the Bessie Toone Mine, the Wolf Cave, carried by Cedrick Appleby, etc. - Loss: GISTEmbedLoss with these parameters:
{ "guide": "SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')", "temperature": 0.07, "margin_strategy": "absolute", "margin": 0.0, "contrast_anchors": true, "contrast_positives": true, "gather_across_devices": false }
Evaluation Dataset
Unnamed Dataset
- Size: 1,852 evaluation samples
- Columns: anchor, positive, and negative
- Approximate statistics based on the first 100 samples:
anchor positive negative type string string string modality text text text details min: 6 tokensmean: 8.69 tokensmax: 12 tokens min: 22 tokensmean: 380.04 tokensmax: 855 tokens min: 27 tokensmean: 443.15 tokensmax: 999 tokens - Samples:
anchor positive negative main choices arcana Original Post: What aspects of Arcanum do you wish other games would adopt?. For me, I really liked the way you could just bash doors down. It always bugged me in other games, where you'd have a giant hammer and godlike strength, or a rocket launcher, yet perfectly simple doors would deter you. Case in pointNot Arcanum! The only fault I can find with the system is Virgil's overenthusiastic response to the idea of breaking down doors. What aspects of Arcanum would you like to see "Bleed out" into more mainstream RPGs? U... Original Post: Sup, new to arcanum. As I said in another post, I am new to arcanum and I’m really interested in playing.Do any of you guys have any tips or something? I’m already using the unofficial arcanum patch btw User 1: Read the manual. Not saying it to be pithy; it's just one of those games (plus the manual is some cool worldbuilding and is pretty stylish). Supplement with checking out a character creation guide or two. Then just roleplay your guy! The game's vast replayability comes mostly from the many different choices and routes you can take to get through the various quests. Combat, in my opinion, is largely a chore, not very different from a diablo ARPG. Lotsa clicking. But the roleplay potential... User 2: Pick a character concept and stick to it. The ability to freely spend points can mean you advance in level but don't actually accrue a lot of power if you spread yourself too thin. You're better off excelling in a few things than being mediocre in everything. There ar... main choices arcana Original Post: What aspects of Arcanum do you wish other games would adopt?. For me, I really liked the way you could just bash doors down. It always bugged me in other games, where you'd have a giant hammer and godlike strength, or a rocket launcher, yet perfectly simple doors would deter you. Case in pointNot Arcanum! The only fault I can find with the system is Virgil's overenthusiastic response to the idea of breaking down doors. What aspects of Arcanum would you like to see "Bleed out" into more mainstream RPGs? U... Beginner's Build. Beginner's Build. Here is a one stop approach for a fun and safe build for a newcomer. Basically a simplified version of the Human Bard (Melee and Charisma). This is because the paradox (or dilemma) of Arcanum is that it is so broad. The choices are endless. Basically if you look at it on a grid, you have four "classes" along the top that you can work -- Melee, Ranged, Thief, and Diplomat. And along the side you have three approaches to choose from -- Magick, Technology, and Neutral. So right off the bat you'd need Twelve "basic" guides, and that's putting it mildly. Each "class" can specialize, and so it goes!. So to keep things simple the first time, the beginners build and tutorial might be for you! :). Starting the Game. Make sure that you are patched to Official 1.0.7.4 or are using the Steam or GoG version of the game. Make sure that your user setting options are set for Turn Based Combat and Easy. Start as a baseline (no background) Human and take 1 point of D... main choices arcana Original Post: What aspects of Arcanum do you wish other games would adopt?. For me, I really liked the way you could just bash doors down. It always bugged me in other games, where you'd have a giant hammer and godlike strength, or a rocket launcher, yet perfectly simple doors would deter you. Case in pointNot Arcanum! The only fault I can find with the system is Virgil's overenthusiastic response to the idea of breaking down doors. What aspects of Arcanum would you like to see "Bleed out" into more mainstream RPGs? U... Hotkey. Hotkey. A hotkey is a key or a combination of keys providing quick access to a particular function within a computer program. Learning Arcanum's hotkeys will prove to be of great use and convenience to a player, both in and outside of combat sequences. Controls. [Esc Key] Opens the main menu. [F1 Key] Commands all nearby followers to walk to the specified tile. [F2 Key] Commands all nearby followers to attack a creature or object. [F3 Key] Commands all nearby followers to stay close. [F4 Key] Commands all nearby followers to spread out. [F5 Key] Commands all nearby followers to stop attacking. [F7 Key] Auto-saves the game. [F8 Key] Loads the Autosave. [F12 Key] Takes a screenshot which is saved as a BMP file in the game's directory under \modules\Arcanum. [Num Lock Key] Toggles Always Run. [Shift Key + Left Mouse Button] Prevents the player character from moving while attacking or performing an action. Has a different function when used on items or spells. [Ctrl Key + Left Mou... - Loss: GISTEmbedLoss with these parameters:
{ "guide": "SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')", "temperature": 0.07, "margin_strategy": "absolute", "margin": 0.0, "contrast_anchors": true, "contrast_positives": true, "gather_across_devices": false }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 16num_train_epochs: 2learning_rate: 1e-05lr_scheduler_type: cosinewarmup_steps: 0.1weight_decay: 0.01gradient_accumulation_steps: 2per_device_eval_batch_size: 16eval_on_start: Trueload_best_model_at_end: Truebatch_sampler: no_duplicates
All Hyperparameters
per_device_train_batch_size: 16num_train_epochs: 2max_steps: -1learning_rate: 1e-05lr_scheduler_type: cosinelr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.01adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 2average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Falsefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 16prediction_loss_only: Trueeval_on_start: Trueeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Trueignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Nonedataloader_multiprocessing_context: Nonedataloader_in_order: Trueremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonelocal_rank: -1prompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}warmup_ratio: None
Training Logs
| Epoch | Step | Training Loss | Validation Loss | val-hard-negatives_cosine_ndcg@10 |
|---|---|---|---|---|
| 0 | 0 | - | 2.2270 | 0.6953 |
| 0.0963 | 50 | 1.7990 | 1.1023 | 0.7037 |
| 0.1927 | 100 | 0.8944 | 0.7083 | 0.7207 |
| 0.289 | 150 | 0.6376 | 0.6084 | 0.7237 |
| 0.3854 | 200 | 0.5309 | 0.5758 | 0.7210 |
| 0.4817 | 250 | 0.4498 | 0.5403 | 0.7201 |
| 0.5780 | 300 | 0.3999 | 0.5252 | 0.7173 |
- The bold row denotes the saved checkpoint.
Training Time
- Training: 53.1 minutes
Framework Versions
- Python: 3.13.15
- Sentence Transformers: 5.7.0
- Transformers: 5.18.0
- PyTorch: 2.11.0+cu130
- Accelerate: 1.15.0
- Datasets: 4.8.5
- Tokenizers: 0.23.2
Additional Resources
- Training and Finetuning Embedding Models with Sentence Transformers: the end-to-end guide for training or finetuning Sentence Transformer models.
- Introduction to Matryoshka Embedding Models: variable-size embeddings that can be truncated with minimal quality loss.
- Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval: post-training compression of embedding vectors.
- Multimodal Embedding & Reranker Models with Sentence Transformers: use text, image, audio, and video models through the same API.
- Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers: train multimodal embedding models, with a Visual Document Retrieval walkthrough.
Citation
BibTeX
Sentence Transformers
@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",
}
GISTEmbedLoss
@misc{solatorio2024gistembed,
title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning},
author={Aivin V. Solatorio},
year={2024},
eprint={2402.16829},
archivePrefix={arXiv},
primaryClass={cs.LG}
}