Minnow-Em1-0.6B is a compact (0.6B-parameter) multilingual text-embedding model from
KiteFish AI, adapted from Qwen/Qwen3-0.6B into a fully bidirectional encoder and
fine-tuned for general-purpose embeddings: retrieval, semantic textual similarity (STS),
classification, clustering, reranking, and bitext mining.
⚠️ Important: this model must be loaded with bidirectional attention
This model was trained with the causal attention mask removed (every token attends to every
other token). That change is applied at load time and is not baked into the saved weights, so
loading the model the ordinary way leaves it in causal mode and produces poor embeddings. Always
apply the patch below after loading.
python
1import types, torch
2from sentence_transformers import SentenceTransformer
3from transformers import PreTrainedModel
45defload_minnow(name="KiteFishAI/Minnow-Em1-0.6B", device="cuda"):6 model = SentenceTransformer(7 name,8 model_kwargs={"torch_dtype": torch.bfloat16,"attn_implementation":"sdpa"},9 device=device,10)11# --- make the backbone bidirectional (must match training) ---12 hf =None13 first = model[0]14for attr in("auto_model","model"):15 c =getattr(first, attr,None)16ifisinstance(c, PreTrainedModel):17 hf = c;break18if hf isNone:19 hf =next(m for m in first.modules()ifisinstance(m, PreTrainedModel))20for _, m in hf.named_modules():21ifhasattr(m,"is_causal"):22 m.is_causal =False23 base =getattr(hf,"model", hf)24ifhasattr(base,"_update_causal_mask"):25def_no_mask(self, attn_mask, inp,*a,**kw):26if attn_mask isNone:27returnNone28if attn_mask.dim()==2:29 dt = inp.dtype
30return(1.0- attn_mask[:,None,None,:].to(dt))* torch.finfo(dt).min31return attn_mask
32 base._update_causal_mask = types.MethodType(_no_mask, base)33 hf.config.is_decoder =False3435# sanity check: token-0 state must change when a later token changes36 tok = first.tokenizer
37with torch.no_grad():38 a = tok(["The quick brown fox"], return_tensors="pt").to(hf.device)39 b = tok(["The quick brown cat"], return_tensors="pt").to(hf.device)40 d =(hf(**a).last_hidden_state[0,0]- hf(**b).last_hidden_state[0,0]).abs().max()41assert d >1e-4,"Model is still causal — patch did not take effect."42return model
Usage
The model is instruction-aware. Prepend a task instruction to each query using the format:
1model = load_minnow()23defwith_instruction(instruction, texts):4return[f"Instruct: {instruction}\nQuery: {t}"for t in texts]56# --- retrieval example ---7queries = with_instruction(8"Given a query, retrieve documents that answer the query",9["What causes the northern lights?"],10)11docs =["Auroras are produced when charged particles from the sun excite atoms in the upper atmosphere."]1213q = model.encode(queries, normalize_embeddings=True)14d = model.encode(docs, normalize_embeddings=True)# documents: no instruction15print((q @ d.T))
Model details
Base model
Qwen/Qwen3-0.6B
Parameters
~0.6B
Attention
Bidirectional (causal mask removed)
Pooling
Mean pooling
Embedding dim
1024
Max sequence length
512
Instruction-aware
Yes (Instruct: … \nQuery: …)
Similarity
Cosine
Training
Minnow-Em1 follows the now-standard multi-stage recipe for compact LLM-based embedders
Stage 1 — weakly-supervised contrastive pre-training. Large-scale query/passage pairs,
in-batch negatives only, to adapt the bidirectional backbone to representation learning.
Stage 2 — supervised contrastive fine-tuning. Task-homogeneous batches with mined hard
negatives, InfoNCE (temperature 0.02) with focal reweighting (γ = 0.5) to emphasize hard
examples, false-negative masking, and symmetric/asymmetric instruction routing by task type.
Training data spans retrieval, STS, classification, clustering, reranking, pair classification, and
bitext-mining sources across multiple languages.
Evaluation
Evaluation on the MMTEB / MTEB task suite is being finalized with the official mteb harness; a
full results table will be added to this card in a subsequent revision. The model is optimized for
the multilingual MMTEB task mix.
Numbers will only be published once produced by the official mteb package on the complete
benchmark task set (not a partial or custom run).
Limitations and intended use
Bidirectional load required (see above) — without the patch the model is effectively causal
and underperforms badly.
In-domain training data. The training mix includes the train splits of several public
benchmark datasets (e.g. MS MARCO, HotpotQA, Natural Questions, NFCorpus, MIRACL). Scores on the
corresponding evaluation tasks should be read as in-domain, not zero-shot.
Language balance. v1's fine-tuning mix is weighted toward English question-answering
retrieval; performance on some low-resource and cross-lingual tasks is correspondingly weaker.
Rebalancing is planned for a future version.
Intended for embedding/retrieval research and applications; not a generative model.
Acknowledgements
Built on Qwen/Qwen3-0.6B. Evaluated with the MTEB / MMTEB benchmark suite.
License
Released under Apache-2.0, consistent with the Qwen/Qwen3-0.6B base model. Verify license
compatibility for your use case before redistribution.