Prototype: votes, saves, and profiles aren't stored on this hosted preview yet. No real accounts, and no emails or texts. Privacy

Recipes / Customer-support chat

Tune a Qwen3 embedding model for your own documents (Unsloth)

Qwen3-Embedding-0.6B fine-tuned so search returns the right passages for your documents.

  • No license flags found

Source: Unsloth notebooks ↗ · by Unsloth · last updated Oct 7, 2026

What a local business could build with it

Search that finds the right answer in your price list, policies or manuals, so a chat assistant can quote them instead of guessing.

How to run it

Commands are copied from the source, unchanged except where a notebook cell is cut at 40 lines (marked in the code). Placeholders like <you> are the source's own. Credit goes to the authors named on each block.

Install (as written in the notebook)

%%capture import os, re if "COLAB_" not in "".join(os.environ.keys()): !pip install unsloth # Do this in local & cloud setups else: !pip install sentencepiece protobuf "datasets==4.3.0" "huggingface_hub>=0.34.0" hf_transfer !pip install --no-deps unsloth_zoo bitsandbytes accelerate peft trl triton unsloth !unsloth install-kernels !pip install --no-deps --upgrade "torchao>=0.16.0" !pip install transformers==4.57.6 !pip install --no-deps trl==0.22.2

From Unsloth notebook, Qwen3_Embedding_(0_6B) ↗

Load the base model

from unsloth import FastSentenceTransformer fourbit_models = [ "unsloth/all-MiniLM-L6-v2", "unsloth/embeddinggemma-300m", "unsloth/Qwen3-Embedding-4B", "unsloth/Qwen3-Embedding-0.6B", "unsloth/all-mpnet-base-v2", "unsloth/gte-modernbert-base", "unsloth/bge-m3" ] # More models at https://huggingface.co/unsloth model = FastSentenceTransformer.from_pretrained( model_name = "unsloth/Qwen3-Embedding-0.6B", max_seq_length = 512, # Choose any for long context! full_finetuning = False, # [NEW!] We have full finetuning now! )

From Unsloth notebook, Qwen3_Embedding_(0_6B) ↗

Set up training

from sentence_transformers import ( SentenceTransformerTrainer, SentenceTransformerTrainingArguments, losses ) from sentence_transformers.training_args import BatchSamplers from unsloth import is_bf16_supported # This will use other positives in the same batch as negative examples loss = losses.MultipleNegativesRankingLoss(model) trainer = SentenceTransformerTrainer( model = model, train_dataset = dataset, loss = loss, args = SentenceTransformerTrainingArguments( output_dir = "output", num_train_epochs = 2, per_device_train_batch_size = 256, gradient_accumulation_steps = 1, # Use GA to mimic batch size! learning_rate = 3e-5, fp16 = not is_bf16_supported(), bf16 = is_bf16_supported(), logging_steps = 50, warmup_ratio = 0.03, report_to = "none", lr_scheduler_type = "constant_with_warmup", # Because we have duplicate anchors in the dataset, we don't want # to accidentally use them for negative examples batch_sampler = BatchSamplers.NO_DUPLICATES, ), )

From Unsloth notebook, Qwen3_Embedding_(0_6B) ↗

Train

trainer_stats = trainer.train()

From Unsloth notebook, Qwen3_Embedding_(0_6B) ↗

Licenses

No flags: every license we found for this recipe is permissive (Apache-2.0, MIT, BSD, CC BY or similar). Still read each one.

PartLicense, as the source or Hub states it
CodeLGPL-3.0 (Unsloth notebooks)
Base modelApache-2.0
DatasetBSD-3-Clause

Checked against the Hugging Face API and each repo on December 4, 2026. A grouping like “$10M revenue cap” is our shorthand, not legal advice.