SentenceTransformer based on Qwen/Qwen3-Embedding-0.6B

This is a sentence-transformers model finetuned from Qwen/Qwen3-Embedding-0.6B. 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
  • Maximum Sequence Length: 32768 tokens
  • Output Dimensionality: 1024 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 32768, 'do_lower_case': False, 'architecture': 'Qwen3Model'})
  (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:

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
queries = [
    "hyperswitch router utility functions error handling",
]
documents = [
    '// PATH: data/code_corpus_hyperswitch/crates__router__src__utils.rs\n// MODULE: data::code_corpus_hyperswitch::crates__router__src__utils.rs\n// SYMBOL: get_error_response\n    fn get_error_response(self) -> RouterResult<types::Response> {\n        self.map_err(|error| error.change_context(errors::ApiErrorResponse::InternalServerError))\n            .attach_printable("Error while receiving response")\n            .and_then(|inner| match inner {\n                Ok(res) => {\n                    logger::error!(response=?res);\n                    Err(errors::ApiErrorResponse::InternalServerError).attach_printable(format!(\n                        "Expecting error response, received response: {res:?}"\n                    ))\n                }\n                Err(err_res) => Ok(err_res),\n            })\n    }',
    '// PATH: data/code_corpus_hyperswitch/crates__hyperswitch_domain_models__src__router_data.rs\n// MODULE: data::code_corpus_hyperswitch::crates__hyperswitch_domain_models__src__router_data.rs\n// SYMBOL: CustomerInfo\npub struct CustomerInfo {\n    pub customer_id: Option<id_type::CustomerId>,\n    pub customer_email: Option<common_utils::pii::Email>,\n    pub customer_name: Option<Secret<String>>,\n    pub customer_phone_number: Option<Secret<String>>,\n    pub customer_phone_country_code: Option<String>,\n}\n#[derive(Debug, Clone, Serialize, Deserialize)]',
    '// PATH: data/code_corpus_hyperswitch/crates__hyperswitch_connectors__src__connectors__zift.rs\n// MODULE: data::code_corpus_hyperswitch::crates__hyperswitch_connectors__src__connectors__zift.rs\n// SYMBOL: build_request\n    fn build_request(\n        &self,\n        req: &SetupMandateRouterData,\n        connectors: &Connectors,\n    ) -> CustomResult<Option<Request>, errors::ConnectorError> {\n        Ok(Some(\n            RequestBuilder::new()\n                .method(Method::Post)\n                .url(&types::SetupMandateType::get_url(self, req, connectors)?)\n                .attach_default_headers()\n                .headers(types::SetupMandateType::get_headers(self, req, connectors)?)\n                .set_body(types::SetupMandateType::get_request_body(\n                    self, req, connectors,\n                )?)\n                .build(),\n        ))\n    }',
]
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.4434, -0.0422, -0.0713]], dtype=torch.bfloat16)

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,736 training samples
  • Columns: sentence_0 and sentence_1
  • Approximate statistics based on the first 1000 samples:
    sentence_0 sentence_1
    type string string
    details
    • min: 6 tokens
    • mean: 10.85 tokens
    • max: 18 tokens
    • min: 100 tokens
    • mean: 225.13 tokens
    • max: 854 tokens
  • Samples:
    sentence_0 sentence_1
    how to override proxy settings in session state // PATH: data/code_corpus_hyperswitch/crates__router__src__core__unified_connector_service.rs
    // MODULE: data::code_corpus_hyperswitch::crates__router__src__core__unified_connector_service.rs
    // SYMBOL: create_updated_session_state_with_proxy
    fn create_updated_session_state_with_proxy(
    state: SessionState,
    proxy_override: &ProxyOverride,
    ) -> SessionState {
    let mut updated_state = state;

    // Create updated configuration with proxy overrides
    let mut updated_conf = (*updated_state.conf).clone();

    // Update proxy URLs with overrides, falling back to existing values
    if let Some(ref http_url) = proxy_override.http_url {
    updated_conf.proxy.http_url = Some(http_url.clone());
    }
    if let Some(ref https_url) = proxy_override.https_url {
    updated_conf.proxy.https_url = Some(https_url.clone());
    }

    updated_state.conf = std::sync::Arc::new(updated_conf);

    updated_state
    }
    rust hyperswitch analytics clip_to_start time bucket function // PATH: data/code_corpus_hyperswitch/crates__analytics__src__query.rs
    // MODULE: data::code_corpus_hyperswitch::crates__analytics__src__query.rs
    // SYMBOL: clip_to_start
    fn clip_to_start(
    &self,
    value: Self::SeriesType,
    ) -> error_stack::Result {
    let clip_start = |value: u8, modulo: u8| -> u8 { value - value % modulo };

    let clipped_time = match (
    self.get_lowest_common_granularity_level(),
    self.get_bucket_size(),
    ) {
    (TimeGranularityLevel::Minute, i) => time::Time::MIDNIGHT
    .replace_second(clip_start(value.second(), i))
    .and_then(|t| t.replace_minute(value.minute()))
    .and_then(|t| t.replace_hour(value.hour())),
    (TimeGranularityLevel::Hour, i) => time::Time::MIDNIGHT
    .replace_minute(clip_start(value.minute(), i))
    .and_then(|t| t.replace_hour(value.hour())),
    (Tim...
    rust function to get payment method type from domain models // PATH: data/code_corpus_hyperswitch/crates__hyperswitch_domain_models__src__payment_method_data.rs
    // MODULE: data::code_corpus_hyperswitch::crates__hyperswitch_domain_models__src__payment_method_data.rs
    // SYMBOL: get_payment_method
    pub fn get_payment_method(&self) -> Option {
    match self {
    Self::Card()
    | Self::NetworkToken(
    )
    | Self::CardDetailsForNetworkTransactionId()
    | Self::NetworkTokenDetailsForNetworkTransactionId(
    )
    | Self::DecryptedWalletTokenDetailsForNetworkTransactionId()
    | Self::CardWithLimitedDetails(
    ) => Some(common_enums::PaymentMethod::Card),
    Self::CardRedirect() => Some(common_enums::PaymentMethod::CardRedirect),
    Self::Wallet(
    ) => Some(common_enums::PaymentMethod::Wallet),
    Self::PayLater() => Some(common_enums::PaymentMethod::PayLater),
    Self::BankRedirect(
    ) => Some(common_enums::PaymentMethod::BankRe...
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • per_device_train_batch_size: 8
  • num_train_epochs: 3
  • max_steps: -1
  • learning_rate: 5e-05
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_steps: 0
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 1
  • average_tokens_across_devices: True
  • max_grad_norm: 1
  • label_smoothing_factor: 0.0
  • bf16: False
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: trackio
  • eval_strategy: no
  • per_device_eval_batch_size: 8
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • warmup_ratio: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

Epoch Step Training Loss
2.3041 500 0.0380

Framework Versions

  • Python: 3.12.3
  • Sentence Transformers: 5.2.3
  • Transformers: 5.2.0
  • PyTorch: 2.10.0+cu128
  • Accelerate: 1.12.0
  • Datasets: 4.5.0
  • 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",
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}
Downloads last month
18
Safetensors
Model size
0.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for archit11/assesment_qwen3_embedding_06b_e3

Finetuned
(127)
this model

Papers for archit11/assesment_qwen3_embedding_06b_e3