A roleplay-first embedding model for LettuceAI's on-device memory layer.
lettuce-emb-768d-v4 is built for one job: retrieve the right memory from a long, messy roleplay conversation history. v3 failed at this (recall@1 = 0.020). v4 hits recall@1 = 0.924 while keeping general semantic quality intact (STSBenchmark = 0.819).
It also works fine as a general retrieval embedder. It just was not optimized for that as the first priority.
(Numbers from the 144k-passage extreme retrieval benchmark. Full benchmark in the release post.)
Going from 768d to 64d costs ~17% of recall@1 in exchange for 12x smaller vectors. Even at 64d, v4 is well above v3's 768d performance.
Training
Three-stage curriculum, ~285k pairs/triplets across roleplay/persona, long-form narrative, and general retrieval data, with BGE-M3 hard negatives refreshed per epoch.
Stage
Seq len
Batch
Negatives
Losses
1 warmup
512
128 pairs
in-batch
MNR
2 main
2048
16 triplets
hard negatives
MNR + Cosine distillation
3 refinement
4096
8 triplets
refreshed hard negatives
MNR + Cosine + MarginMSE + STS replay
Released checkpoint is best_release (step 34400): the highest-recall checkpoint that still passes the STSBenchmark release floor. It is not the final training step. See the engineering postmortem on the LettuceAI blog for why.
Intended use
Memory retrieval over multi-turn roleplay / persona conversations (primary).
General sentence similarity and retrieval over short and long documents.
On-device embedding via INT8 ONNX for resource-constrained hardware.
Out of scope
Cross-lingual retrieval. Trained on English data.
Code retrieval. Not in the training mix.
Reranking. Use a dedicated cross-encoder for that.
Limitations
Benchmarks reported here are in-distribution for v4 (sources it saw during training). v3 was tested on the same set so the relative comparison is fair, but absolute generalization on completely held-out corpora may differ.
Tuned for roleplay-style memory retrieval. On clean-QA benchmarks like MS MARCO, dedicated retrieval models will likely outperform it.
4096-token context is real but works best when the embedded passage is genuinely long. Short passages do not need it.
Citation
bibtex
1@misc{lettuceemb_v4_2026,
2 author = {Zeolit and LettuceAI},
3 title = {lettuce-emb-768d-v4: a roleplay-first embedding model},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/Zeolit/lettuce-emb-768d-v4}}
7}
BAAI/bge-m3 for hard-negative mining and teacher cosine scores.
cross-encoder/ms-marco-MiniLM-L-6-v2 for false-negative filtering during data prep.
google/gemma-4-26b-a4b-it for synthetic query generation.
Training data sources: google/Synthetic-Persona-Chat, nazlicanto/persona-based-chat, kmfoda/booksum, deepmind/narrativeqa, and the sentence-transformers mirrors of HotpotQA, GooAQ, NQ, AllNLI.