Rezaq234r3/qwen3-emb-bn-physics
Qwen3-Emb-0.6B Bangla Physics (QLoRA)
This is a sentence-transformers model finetuned from Qwen/Qwen3-Embedding-0.6B. It maps inputs 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: Qwen/Qwen3-Embedding-0.6B <!-- at revision 97b0c614be4d77ee51c0cef4e5f07c00f9eb65b3 -->
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text <!-- - Training Dataset: Unknown -->
- Language: bn
- License: apache-2.0
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': 'Qwen3Model'})
(1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'lasttoken', 'include_prompt': True})
(2): Normalize({'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
)Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("Rezaq234r3/qwen3-emb-bn-physics")
# Run inference
queries = [
'(1) এখন আমরা দেখি বস্তুটি যদি ফোকাস দূরত্বের দ্বিগুণ দূরত্বের বাইরে মি _& কোথায় তৈরি হয়।',
]
documents = [
'(৪) ফোকাস দূরত্বের দ্বিগুণ দূরত্বে অবস্থিত; (০) বাস্তব; (০) উল্টো, এবং (9) বস্তুর সমান আকারের । es, Ah এই প্রতিবিষ্বটি আঁকার পদ্ধতি ঠিক রে | oo আগেরটির মতো শুধু (চিত্র ৯২৬) বৃ বস্তুটিকে বসাতে হবে ফোকাস দূরত্বের রি দ্বিগুণ দূরত্বের বাইরে।',
'= NU, ৮.২৪ চিত্রে হুবহু একই বিষয় দেখানো রর - হয়েছে। শুধু »% বস্তুটি ফোকাস দূরত্বের দ্বিগুণ থেকে বেশি দূরত্বে রাখা হয়েছে। হতো এই একই বিন্দুতে, ৮.২৫ চিত্রে যেমন দেখানো হয়েছে। শুধু তাই নয়, প্রতিবিষ্বটির আকার হতো ঠিক বস্তুটির সমান।',
'(9) অবতল আয়নায় ফোকাস দূরত্বের ভেতরে রাখা একটি বস্তু। ১ বস্তুটির জন্য (চিত্র ৮.২৯) আলোক রশ্মিগুলো এঁকে প্রতিবিষ্ব কোথায় হবে দেখাও। ¥ o F a ¥ 12) tb) চিত্র ৮.৩০:(৪) অবতল আয়নায় ফোকাস দূরত্বের বাইরে রাখা একটি বস্তু। ১ বস্তুটির জন্য চিত্র ৮.৩০) আলোক রশ্মিগুলো এঁকে প্রতিবিস্ব কোথায় হবে দেখাও।',
]
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.8134, 0.7408, 0.7429]])<!--
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. -->
Evaluation
Metrics
Information Retrieval
- Datasets:
valandtest - Evaluated with <code>InformationRetrievalEvaluator</code> with these parameters:
{
"query_prompt": "Instruct: Given a Bengali physics question, retrieve the relevant textbook passage that answers it\nQuery: "
}<!--
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
Unnamed Dataset
- Size: 1,264 training samples
- Columns: <code>anchor</code>, <code>positive</code>, <code>negative1</code>, <code>negative2</code>, and <code>negative_3</code>
- Approximate statistics based on the first 100 samples: | | anchor | positive | negative1 | negative2 | negative_3 | |:---------|:-------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------| | type | string | string | string | string | string | | modality | text | text | text | text | text | | details | <ul><li>min: 26 tokens</li><li>mean: 100.63 tokens</li><li>max: 311 tokens</li></ul> | <ul><li>min: 138 tokens</li><li>mean: 365.46 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 162 tokens</li><li>mean: 392.62 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 134 tokens</li><li>mean: 387.3 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 152 tokens</li><li>mean: 384.95 tokens</li><li>max: 512 tokens</li></ul> |
- Samples: | anchor | positive | negative1 | negative2 | negative3 | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>আলফা রশি কীভাবে কাজ করে?</code> | <code>জিংক সালফাইড পর্দায় এটি অনুপ্রভা (phosphorescence) AS করে। আলফা কণা যাত্রাপথে অসংখ্য অণু-পরমাণুকে অনুপ্রভা করে মুন্ত ইলেকট্রন তৈরি করে সেগুলোকে সংগ্রহ করে সহজেই তার উপস্থিতি নির্ণয় করা যায় কিংবা তার শন্তি পরিমাপ করা যায়। ০ আলফা কণা যেহেতু দুটি প্রোটন এবং দুটি নিউট্রন দিয়ে তৈরি, তাই যখন একটি নিউক্লিয়াসের ভেতর & থেকে বের হয়ে আসে, তখন সেই নিউক্লিয়াসের পারমাণবিক সংখ্যা কমে দুই ঘর এবং নিউক্লিওন সংখ্যা কমে চার ঘর।</code> | <code>() আলোকরশ্মি কেন্দ্রমুখী হলে (চিত্র ৯.২০, %০ কিংবা %0 রশ্মি) সেটি প্রতিসরণের পর সোজাসুজি চলে যায়। ( প্রধান অক্ষের সমান্তরাল (চিত্র ৯.২০, »0) রশ্মিটি প্রতিসরণের পর মনে হবে যেন রশ্মিটি (০5) ফোকাস বিন্দু ) থেকে আসছে। (1) আলোকরশ্মির দিক পরিবর্তন করা হলে এটি যেদিক থেকে এসেছে ঠিক সেদিক দিয়ে ফিরে যায়। কাজেই কোনো আলোকরশ্মি (চিত্র ৯.২০, 5৮) ফোকাস অভিমুখী হলে সেটি প্রধান অক্ষের সাথে সমান্তরাল হয়ে (0 প্রতিসরিত হবে।</code> | <code>(1) প্রধান অক্ষের সমান্তরাল (চিত্র ৮.১৯, ১0১) রশ্মিটি প্রতিফলনের পর মনে হবে যেন রশ্মিটি ০০) ফোকাস বিন্দু (6) থেকে ছড়িয়ে যাচ্ছে। (1) আলোক রশ্মির দিক পরিবর্তন করা হলে এটি যেদিক থেকে এসেছে ঠিক সেদিক দিয়ে ফিরে যায়। আমরা এখন এই তিনটি নিয়ম ব্যবহার করে প্রতিবিম্ব তৈরি করতে পারব।</code> | <code>একটি অবতল আয়নায় সমান্তরাল আলো ফেলা eae হলে আলোর রশ্মিগুলো প্রতিফলনের পর এক 5 বিন্দুতে মিলিত হবে (চিত্র ৮.২১)। আলোর রশ্মির তো আর থেমে লি থাকার উপায় নেই কাজেই এক বিন্দুতে মিলিত টে হবার পরও সেটা সোজা সামনের দিকে এগোতে Wee" = থাকবে এবং দেখা যাবে সেই বিন্দু থেকে আলোক রশ্মি গুলো ছড়িয়ে পড়ছে।</code> | | <code>আলফা রশি কীভাবে কাজ করে?</code> | <code>নী. &. = a 7 তা সারার (3-5 mm) (3-5 cm) চিত্র ১৩.০১: আলফা রশ্মি খুব বেশি আয়নিত করে শস্তি ক্ষয় করতে পারে বলে একটা কাগজের পৃষ্ঠা দিয়েই এটাকে থামানো সম্ভব। বিটা রশ্মি বা ইলেকট্রনকে থামাতে কয়েক মিলিমিটার পুরু আযালুমিনিয়াম দরকার হয়। গামা রশ্মির চার্জ নেই বলে এটিকে থামাতে পুরু সিসার পাতের দরকার হয়।</code> | <code>() আলোকরশ্মি কেন্দ্রমুখী হলে (চিত্র ৯.২০, %০ কিংবা %0 রশ্মি) সেটি প্রতিসরণের পর সোজাসুজি চলে যায়। ( প্রধান অক্ষের সমান্তরাল (চিত্র ৯.২০, »0) রশ্মিটি প্রতিসরণের পর মনে হবে যেন রশ্মিটি (০5) ফোকাস বিন্দু ) থেকে আসছে। (1) আলোকরশ্মির দিক পরিবর্তন করা হলে এটি যেদিক থেকে এসেছে ঠিক সেদিক দিয়ে ফিরে যায়। কাজেই কোনো আলোকরশ্মি (চিত্র ৯.২০, 5৮) ফোকাস অভিমুখী হলে সেটি প্রধান অক্ষের সাথে সমান্তরাল হয়ে (0 প্রতিসরিত হবে।</code> | <code>(1) প্রধান অক্ষের সমান্তরাল (চিত্র ৮.১৯, ১0১) রশ্মিটি প্রতিফলনের পর মনে হবে যেন রশ্মিটি ০০) ফোকাস বিন্দু (6) থেকে ছড়িয়ে যাচ্ছে। (1) আলোক রশ্মির দিক পরিবর্তন করা হলে এটি যেদিক থেকে এসেছে ঠিক সেদিক দিয়ে ফিরে যায়। আমরা এখন এই তিনটি নিয়ম ব্যবহার করে প্রতিবিম্ব তৈরি করতে পারব।</code> | <code>একটি অবতল আয়নায় সমান্তরাল আলো ফেলা eae হলে আলোর রশ্মিগুলো প্রতিফলনের পর এক 5 বিন্দুতে মিলিত হবে (চিত্র ৮.২১)। আলোর রশ্মির তো আর থেমে লি থাকার উপায় নেই কাজেই এক বিন্দুতে মিলিত টে হবার পরও সেটা সোজা সামনের দিকে এগোতে Wee" = থাকবে এবং দেখা যাবে সেই বিন্দু থেকে আলোক রশ্মি গুলো ছড়িয়ে পড়ছে।</code> | | <code>লোহার কোরের অন্য পাশেও তার প্যাঁচানো আছে (অবশ্যই অপরিবাহী আবরণে ঢাকা) সেই কয়েলের মাঝে লোহার কোরের ভেতর দিয়ে চৌম্বক ক্ষেত্রটির ক্রমাগত পরিবর্তন হতে থাকবে এবং এই পরিবর্তন ডান পাশের কয়েলে একটা তড়িচ্চালক শন্তি বা EMF Colt করবে একটা ভোল্টমিটারে আমরা সেটা ইচ্ছে করলে পরিমাপ করতে পারব।</code> | <code>লোহার কোরের অন্য পাশেও তার প্যাঁচানো আছে (অবশ্যই অপরিবাহী আবরণে ঢাকা) সেই কয়েলের মাঝে লোহার কোরের ভেতর দিয়ে চৌম্বক ক্ষেত্রটির ক্রমাগত পরিবর্তন হতে থাকবে এবং এই পরিবর্তন ডান পাশের কয়েলে একটা তড়িচ্চালক শন্তি বা EMF Colt করবে_ একটা ভোল্টমিটারে আমরা সেটা ইচ্ছে করলে পরিমাপ করতে পারব। এই পদ্ধতিতে সরাসরি .বৈদ্যুতিক সংযোগ ছাড়াই একটি কয়েল থেকে অন্য কয়েলে বিদ্যুৎ পাঠানো যায়। যে যন্ত্রের মাধ্যমে এই কাজ করা হয় তাকে ট্রা্সফর্মার বলে।</code> | <code>একটা তার যদি সোজা থাকে এবং সঠিক? তার ভেতর দিয়ে বিদ্যুৎ্প্রবাহ হলে চৌম্বক বলরেখা কেমন হয় সেটা ১২.০৩ চিত্রে দেখানো হয়েছিল। যদি তারটা সোজা না হয়ে বৃত্তাকার হয় তাহলে চৌম্বক বলরেখা কেমন হবে? ১২.০৫ চিত্রে সেটা দেখানো হয়েছে। বুঝতেই পারছ বিদ্যুৎ্প্রবাহ যত বেশি হবে, চৌম্বক ক্ষেত্রটি তত শন্তিশালী হবে। একটা তারের ভেতর দিয়ে কতখানি বিদ্যুৎ প্রবাহিত করা যায় তার একটা সীমা আছে, তারটা [খং</code> | <code>তোমরা জান একটি চুম্বক দিয়ে অন্য চুম্বকের উপর বল প্রয়োগ করা যায়। অন্যভাবে আমরা বলতে পারি একটি চৌম্বক ক্ষেত্র দিয়ে অন্য একটি চুম্বক বা বিদ্যুৎপ্রবাহী তারের উপর বল প্রয়োগ করা যায়। একটি তারের ভেতর দিয়ে খুব বেশি বিদ্যুৎ প্রবাহিত করা যায় না, তাই সেটি খুব বড় চৌম্বক ক্ষেত্র তৈরি করতে পারে না। কাজেই অন্য একটি চৌম্বক ক্ষেত্র দিয়ে তার ওপর শন্তিশালী বল প্রয়োগ করা যায় না।</code> | <code>(খ) কাগজটির উপর লোহার গুঁড়া কীভাবে সজ্জিত হবে? (গ) তারটির গঠনে কী পরিবর্তন আনলে এর দ্বারা তৈরি চৌম্বকক্ষেত্রের প্রাবল্য বাড়বে ব্যাখ্যা করো। (ঘ) তারটিকে একটি লোহার তারকাঁটার উপর পেঁচিয়ে তারকাঁটার এক মাথা লোহার গুঁড়ার কাছাকাছি নিলে যা ঘটবে তা বিশ্লেষণ করো? সংক্ষিপ্ত উত্তর প্রশ্ন ১. জেনারেটর ও তড়িৎ মোটরের মধ্যে পার্থক্য ব্যাখ্যা করো।</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
512,
256,
128
],
"matryoshka_weights": [
1,
1,
1,
1
],
"n_dims_per_step": -1
}Training Hyperparameters
Non-Default Hyperparameters
num_train_epochs: 2learning_rate: 0.0001lr_scheduler_type: cosinewarmup_steps: 0.1optim: pagedadamw8bitweight_decay: 0.01gradient_accumulation_steps: 2load_best_model_at_end: Trueprompts: {'anchor': 'Instruct: Given a Bengali physics question, retrieve the relevant textbook passage that answers it\nQuery: '}batch_sampler: no_duplicates
All Hyperparameters
<details><summary>Click to expand</summary>
per_device_train_batch_size: 8num_train_epochs: 2max_steps: -1learning_rate: 0.0001lr_scheduler_type: cosinelr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: pagedadamw8bitoptim_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: 8prediction_loss_only: Trueeval_on_start: Falseeval_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: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': 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: {'anchor': 'Instruct: Given a Bengali physics question, retrieve the relevant textbook passage that answers it\nQuery: '}batch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}warmup_ratio: None
</details>
Training Logs
- The bold row denotes the saved checkpoint.
Training Time
- Training: 30.7 minutes
Framework Versions
- Python: 3.13.15
- Sentence Transformers: 6.0.0
- Transformers: 5.16.1
- PyTorch: 2.11.0+cu128
- Accelerate: 1.14.0
- Datasets: 5.0.1
- Tokenizers: 0.23.1
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",
}MatryoshkaLoss
@misc{kusupati2024matryoshka,
title={Matryoshka Representation Learning},
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
year={2024},
eprint={2205.13147},
archivePrefix={arXiv},
primaryClass={cs.LG}
}MultipleNegativesRankingLoss
@misc{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}<!--
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. -->
