CoolFace
Modelpublic

zyc-zju/qwen3-embedding-0.6b_search-r1_hotpotqa_lsr

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
Model Card

SentenceTransformer based on Qwen/Qwen3-Embedding-0.6B

This is a sentence-transformers model finetuned from Qwen/Qwen3-Embedding-0.6B on the flash_rag_datasets dataset. It maps sentences & paragraphs to a 1024-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-0.6B <!-- at revision c54f2e6e80b2d7b7de06f51cec4959f6b3e03418 -->
  • —Maximum Sequence Length: 32768 tokens
  • —Output Dimensionality: 1024 dimensions
  • —Similarity Function: Cosine Similarity
  • —Training Dataset:
  • —flash_rag_datasets
  • —Language: en <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 32768, 'do_lower_case': False, 'architecture': 'PeftModelForFeatureExtraction'})
  (1): Pooling({'word_embedding_dimension': 1024, '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:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("qwen3-embedding-0.6b_search-r1_hotpotqa_lsr")
# Run inference
queries = [
    "Huddersfield Giants R.L.F.C. are an English professional rugby league club from Huddersfield, West Yorkshire, the birthplace of rugby league, who play in the Super League competition, they play their home games at the Kirklees Stadium which is shared with Huddersfield Town F.C., is a multi-use sports stadium in Huddersfield in West Yorkshire, in which country?",
]
documents = [
    'England',
    'Alan Menken',
    'lead singer',
]
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.3187, 0.1431, 0.1907]])

<!--

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. -->

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Dataset

flashragdatasets
  • —Dataset: flash_rag_datasets at bcafb8d
  • —Size: 90,447 training samples
  • —Columns: <code>query</code> and <code>response</code>
  • —Approximate statistics based on the first 1000 samples: | | query | response | |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 8 tokens</li><li>mean: 25.45 tokens</li><li>max: 147 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 4.93 tokens</li><li>max: 73 tokens</li></ul> |
  • —Samples: | query | response | |:---------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------| | <code>Which magazine was started first Arthur's Magazine or First for Women?</code> | <code>Arthur's Magazine</code> | | <code>The Oberoi family is part of a hotel company that has a head office in what city?</code> | <code>Delhi</code> | | <code>Musician and satirist Allie Goertz wrote a song about the "The Simpsons" character Milhouse, who Matt Groening named after who?</code> | <code>President Richard Nixon</code> |
  • —Loss: <code>fed_rag.loss.pytorch.lsr.LSRLoss</code>

Training Hyperparameters

Non-Default Hyperparameters
  • —per_device_train_batch_size: 1
  • —gradient_accumulation_steps: 16
  • —learning_rate: 1e-05
  • —max_steps: 100
  • —lr_scheduler_type: constant
  • —remove_unused_columns: False
  • —dataloader_pin_memory: False
  • —push_to_hub: True
All Hyperparameters

<details><summary>Click to expand</summary>

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: no
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 1
  • —per_device_eval_batch_size: 8
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 16
  • —eval_accumulation_steps: None
  • —torch_empty_cache_steps: None
  • —learning_rate: 1e-05
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —max_grad_norm: 1.0
  • —num_train_epochs: 3.0
  • —max_steps: 100
  • —lr_scheduler_type: constant
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.0
  • —warmup_steps: 0
  • —log_level: passive
  • —log_level_replica: warning
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —save_safetensors: True
  • —save_on_each_node: False
  • —save_only_model: False
  • —restore_callback_states_from_checkpoint: False
  • —no_cuda: False
  • —use_cpu: False
  • —use_mps_device: False
  • —seed: 42
  • —data_seed: None
  • —jit_mode_eval: False
  • —bf16: False
  • —fp16: False
  • —fp16_opt_level: O1
  • —half_precision_backend: auto
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —local_rank: 0
  • —ddp_backend: None
  • —tpu_num_cores: None
  • —tpu_metrics_debug: False
  • —debug: []
  • —dataloader_drop_last: False
  • —dataloader_num_workers: 0
  • —dataloader_prefetch_factor: None
  • —past_index: -1
  • —disable_tqdm: False
  • —remove_unused_columns: False
  • —label_names: None
  • —load_best_model_at_end: False
  • —ignore_data_skip: False
  • —fsdp: []
  • —fsdp_min_num_params: 0
  • —fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —group_by_length: False
  • —length_column_name: length
  • —project: huggingface
  • —trackio_space_id: trackio
  • —ddp_find_unused_parameters: None
  • —ddp_bucket_cap_mb: None
  • —ddp_broadcast_buffers: False
  • —dataloader_pin_memory: False
  • —dataloader_persistent_workers: False
  • —skip_memory_metrics: True
  • —use_legacy_prediction_loop: False
  • —push_to_hub: True
  • —resume_from_checkpoint: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —hub_private_repo: None
  • —hub_always_push: False
  • —hub_revision: None
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —include_inputs_for_metrics: False
  • —include_for_metrics: []
  • —eval_do_concat_batches: True
  • —fp16_backend: auto
  • —push_to_hub_model_id: None
  • —push_to_hub_organization: None
  • —mp_parameters:
  • —auto_find_batch_size: False
  • —full_determinism: False
  • —torchdynamo: None
  • —ray_scope: last
  • —ddp_timeout: 1800
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —include_tokens_per_second: False
  • —include_num_input_tokens_seen: no
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: True
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

EpochStepTraining Loss
0.000210.0006
0.000420.0009
0.000530.0008
0.000740.0005
0.000950.0006
0.001160.0005
0.001270.0005
0.001480.0009
0.001690.0009
0.0018100.0012
0.0019110.0008
0.0021120.0014
0.0023130.0006
0.0025140.0005
0.0027150.0005
0.0028160.001
0.0030170.0008
0.0032180.0006
0.0034190.0004
0.0035200.001
0.0037210.0007
0.0039220.0014
0.0041230.0009
0.0042240.0012
0.0044250.0008
0.0046260.0012
0.0048270.0006
0.0050280.0007
0.0051290.0006
0.0053300.0009
0.0055310.0009
0.0057320.0008
0.0058330.0004
0.0060340.0006
0.0062350.001
0.0064360.0003
0.0065370.0007
0.0067380.0003
0.0069390.001
0.0071400.0003
0.0073410.0005
0.0074420.0008
0.0076430.0008
0.0078440.0004
0.0080450.0008
0.0081460.0005
0.0083470.0007
0.0085480.0008
0.0087490.0007
0.0088500.001
0.0090510.0011
0.0092520.0007
0.0094530.0006
0.0096540.0009
0.0097550.001
0.0099560.0006
0.0101570.0004
0.0103580.0004
0.0104590.0005
0.0106600.0004
0.0108610.0004
0.0110620.0005
0.0111630.0009
0.0113640.0012
0.0115650.0009
0.0117660.0007
0.0119670.0012
0.0120680.0009
0.0122690.0008
0.0124700.0008
0.0126710.0006
0.0127720.0005
0.0129730.0005
0.0131740.0014
0.0133750.0009
0.0134760.0005
0.0136770.0009
0.0138780.0007
0.0140790.0011
0.0142800.0005
0.0143810.0008
0.0145820.0007
0.0147830.0006
0.0149840.0008
0.0150850.0005
0.0152860.001
0.0154870.0007
0.0156880.0004
0.0157890.0002
0.0159900.0008
0.0161910.0006
0.0163920.0006
0.0165930.0004
0.0166940.0005
0.0168950.0006
0.0170960.0007
0.0172970.0009
0.0173980.0008
0.0175990.0005
0.01771000.0004

Framework Versions

  • —Python: 3.11.14
  • —Sentence Transformers: 5.2.0
  • —Transformers: 4.57.2
  • —PyTorch: 2.9.1+cu128
  • —Accelerate: 1.12.0
  • —Datasets: 4.5.0
  • —Tokenizers: 0.22.2

Citation

BibTeX

Sentence Transformers
bibtex
@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",
}

<!--

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. -->