SentenceTransformer based on Qwen/Qwen3-Embedding-4B
This is a sentence-transformers model finetuned from Qwen/Qwen3-Embedding-4B on the json dataset. It maps sentences & paragraphs to a 2560-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: Qwen/Qwen3-Embedding-4B
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 2560 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- json
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: Qwen3Model
(1): Pooling({'word_embedding_dimension': 2560, 'pooling_mode_cls_token': False, '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': True, '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("sentence_transformers_model_id")
# Run inference
sentences = [
'w many? Couple thousand?" Naturally, Swift\'s hope had been in vain. He\'d objected to being sent out with someone so green, but orders were orders. There had been reassurances that Private Gallant Heart had showed excellent potential during training, that the mission wasn\'t dangerous, that Swift was more than capable of handling the both of them. Swift lacked his superiors\' certainty. Every mission was dangerous. Scrutinizing the crawling sea of troops, the captain counted their banners. After a few minutes, he\'d picked out four. Though he couldn\'t see the details, he recognised the colour schemes. A dark green flag for a regiment of engineers, two red banners for infantry and one of the pale blue ones for the crossbow dogs. Four banners. Four regiments. Each regiment about 600 troops strong. Each 600 troops having 8 or 9 officers. Plus the cooks, quartermasters, keepers of the baggage train... "Between two and a half and three thousand," Swift stated, keeping his voice low, speaking softly. "You think so, captain?" Gallant asked, his voice barely below conversation level. Why would he say that if he didn\'t think it? Swift held his tongue though, though his partner continued. "What do you think they\'re travelling up here for, captain?" His partner\'s speech made Swift wince. Already, Gallant was showing his lack of experience. Talking so openly? Addressing him by his rank during a mission? All it would take is one hostile snooping around and their cover would be compromised. Of course, if they were captured, Gallant\'s parents would ransom him back before anyone even noticed Swift was missing. The perks of having a rich, well connected family Swift supposed. "Silence." Swift frowned beneath his cloak. He knew that in time, Gallant would be moved to a different branch of the military. He wasn\'t suited for the Equestrian Expeditionary Force, the EED. Heck, it was right there in his name: Gallant Heart. Brave. Courageous. Heroic. Fine things for a knight in an old fairy t',
'n the dark clearing. There was a soft thud as Swift\'s throwing knife slammed into her neck, just below her skull. She seized up, and fell, clawing desperately at her throat. Swift leap, aiming for the screeching male griffon. He slammed into the scout, knocking him over and winding him. Quickly standing, the pegasus slammed his front hooves onto the griffon\'s skull. Putting his whole weight into it, the first blow knocked the griffon senseless. The second gave a sickening crack as the griffon\'s skill began to give. The third and final strike gave a disgusting squelching noise, dark globs spattering the pony. The griffon was finally silent, his skull reduced to mush. Swift stood and drew his own knife. The other griffon had managed to pull out the throwing knife, her claws desperately clamped over the wound, a strange wheezing noise the only sound she could make. With a few steps, Swift was close enough to finish her. His knife slid into the base of her skull in an easy motion born of countless repetitions, putting an end to her. The whole encounter had taken less than 5 seconds. In that time, Gallant hadn\'t moved an inch, his mouth hanging open, his hoof outstretched like he was still holding his knife. Swift moved back to his shocked partner and gave him a strong slap. "Focus, private." The rookie nodded, blinking like a moron. Swift would have liked to give him a good kicking right about then, but there were bigger things to worry about. "On me Gallant. Like glue." If the alarm was raised, they would be outflown by the griffons. Over flat terrain, at lower altitudes and without any strong wind, a pegasus\' smaller wingspan allowed for quicker manoeuvring, for higher acceleration. Griffons were, on the whole, built for endurance: they could fly much further than a pegasus, their larger wings allowing them to fly higher, to use the winds more efficiently. The pair hustled through the copse, silent trees surrounding them. Every bush a potential enemy, every waving bra',
'oldiers; Magnum broke it with his own curiosity. "Now you tell me. All about yourself, that is... Sir," he quickly added. Too many times had he forgotten that was he addressing a superior officer and not just a friend. "Heh," the stallion snorted, recollecting the memories from the chasms of his mind. "About me, eh? Alright, I\'ll humor you. If only to pass the time until we reach the drop-point." "I began my military career as Private Third Class \'Gilded Armour\' in the Canterlot Guard, though my friends all called me ‘Gil’. Back then, a civil war like this was the farthest thing from anypony\'s mind, due to the Griffon tribes banding under one Warlord and setting their sights on Equestria. For ten years I was sent all over the place, working my way up through the ranks." Magnum sat, listening intently. He motioned for the story-teller to continue the tale. "Well, it was during a routine visit to Canterlot for a resupply and debrief that the Griffons decided raiding small, defenseless villages wasn\'t enough. It seemed like they sent their entire species to invade Canterlot, there were so many. They outnumbered our Pegasus Air Force three-to-one. Our only advantage was their bulk; Pegasi can out-fly a cumbersome Griffon any day." Armour took a quick breath, letting the memories flood back. "Unfortunately, it meant shit-all. They still backed us up into the Castle proper. Of course, we hardly had this technology at all; it was all spears and other melee weaponry. We were pushed back into the Royal Throne Room; hell I\'m pretty sure my flank touched Celestia, praise her name. The only saving grace that day was when the Princesses decided to join the fight... Princess Luna herself was particularly nasty." "Eventually they had been routed after sustaining a heavy loss... but I celebrated too early. One last of those bird-lion mutts flew at Celestia herself in a blind fury. She stood frozen, in shock at the audacity that creature had, until I booted her out of the way and to',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 2560]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Training Details
Training Dataset
json
- Dataset: json
- Size: 59,805 training samples
- Columns: anchor, positive, negative, pair_s1, pair_s2, and label
- Approximate statistics based on the first 1000 samples:
anchor positive negative pair_s1 pair_s2 label type string string string string string int details min: 346 tokensmean: 454.86 tokensmax: 512 tokens min: 339 tokensmean: 455.88 tokensmax: 512 tokens min: 329 tokensmean: 456.76 tokensmax: 512 tokens min: 41 tokensmean: 464.68 tokensmax: 512 tokens min: 42 tokensmean: 464.46 tokensmax: 512 tokens 0: ~49.00%1: ~51.00% - Samples:
anchor positive negative pair_s1 pair_s2 label ere's a hard limit of 1920x1080 in the current driver. https://github.com/LIS/lis-next/issues/318 On a side note… credit % usage is talked about as one of the key factors in a good score. I just paid off one of my cards that was ~25% usage. The difference in my credit score… +2 points. That's it?! What kinds of things make for big jumps once you're in the 750+ club? or does it not matter at this point? They don't want to destroy the school because hurt. They want to destroy evidence because accountability. That's my $.02 settings issue, or if it’s a RWD car on tarmac… it’s often just that twitchy. I sometimes change my controller settings just for tarmac to make things more manageable. > I don’t generally play with all the assists off, and it happens whatever car I’m driving or whatever stage. What are your assist settings? Also, does it feel like you spin off immediately, or do you feel like it's more of an issue of over-correcting? As a controller player, I had to do a combination of all three things: adjusting sensitivity/linearity, adjusting the tunings for more understeer in order to be more forgiving of the snappiness of controller steering, and improving technique. There are definitely more and less forgiving cars, cars with better and worse stock tunings, etc. You only do it when you don’t need more than 2/3 (red) or 1/3(yellow) throughput on one of the belts, assuming your default is blue belts. It’s a situational trick that works well on slow crafting recipes. I will often put the *pro... f when you're negotiating a job offer is to participate on the hiring side. icity, minimalism. And you can just use two separate accounts today anyways. Twitter bootstrap is awesome. I wish I could justify redoing my site using it but right now too much else going on. If you are developing Facebook apps, also check out f-bootstrap. It's based on Twitter bootstrap, but the styles and colors are more similar to Facebook's: https://github.com/ckrack/fbootstrapp Uh..have you never heard of IntelliJ IDEA or Eclipse? Or RubyMine? Or Netbeans even...They pretty much do everything you're talking about. - Loss: main.MNRLTripletAuxWithPairBCELoss
Training Hyperparameters
Non-Default Hyperparameters
per_device_eval_batch_size: 16gradient_accumulation_steps: 4learning_rate: 2e-05weight_decay: 0.01num_train_epochs: 1warmup_ratio: 0.05seed: 779bf16: Trueddp_find_unused_parameters: Truegradient_checkpointing: Truegradient_checkpointing_kwargs: {'use_reentrant': False}ddp_timeout: 7200batch_sampler: no_duplicates
All Hyperparameters
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 8per_device_eval_batch_size: 16per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 4eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.01adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 1max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.05warmup_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: 779data_seed: Nonejit_mode_eval: Falsebf16: Truefp16: Falsefp16_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: Truedataloader_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}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Trueddp_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: Truegradient_checkpointing_kwargs: {'use_reentrant': False}include_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: 7200torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: noneftune_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: Trueprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional
Training Logs
| Epoch | Step | Training Loss |
|---|---|---|
| 0.0535 | 50 | 1.8134 |
| 0.1070 | 100 | 1.1711 |
| 0.1606 | 150 | 0.7509 |
| 0.2141 | 200 | 0.6107 |
| 0.2676 | 250 | 0.4794 |
| 0.3211 | 300 | 0.509 |
| 0.3746 | 350 | 0.4778 |
| 0.4282 | 400 | 0.4597 |
| 0.4817 | 450 | 0.4393 |
| 0.5352 | 500 | 0.4374 |
| 0.5887 | 550 | 0.3999 |
| 0.6422 | 600 | 0.382 |
| 0.6957 | 650 | 0.3671 |
| 0.7493 | 700 | 0.3741 |
| 0.8028 | 750 | 0.3856 |
| 0.8563 | 800 | 0.3391 |
| 0.9098 | 850 | 0.3586 |
| 0.9633 | 900 | 0.3359 |
Framework Versions
- Python: 3.11.12
- Sentence Transformers: 3.3.1
- Transformers: 4.57.0
- PyTorch: 2.11.0+cu128
- Accelerate: 1.12.0
- Datasets: 4.8.5
- Tokenizers: 0.22.2
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",
}