/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
261 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
granite-embedding-311m-multilingual-r2
Библиотека
sentence-transformers
Опубликована
21 сен 2026

lettuce-eidos-768d-v5

ЭмбеддингиТекст → embedding7 профессий

Многоязычная модель эмбеддингов для поиска коротких воспоминаний и фрагментов в истории диалогов, заметках и ролевых чатах.

1 860скачиваний за 30 дней0лайковвеса обновлены21 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Zeolit разработала lettuce-eidos-768d-v5 — многоязычную модель эмбеддингов для поиска коротких воспоминаний в истории диалогов, заметках и ролевых чатах. Она предназначена для извлечения релевантных фрагментов по запросу, в том числе когда запрос и воспоминание написаны на разных языках, и рассчитана на запуск на устройстве или CPU.

Модель основана на IBM Granite Embedding 311M Multilingual R2 и дообучена методом дистилляции после сокращения ModernBERT с 22 до 12 слоёв. Всего в модели около 262 млн параметров, размерность эмбеддинга — 768 с поддержкой Matryoshka-сокращения до 64 измерений. В репозитории есть веса Safetensors и экспорты ONNX, включая динамически квантованный int8-вариант. README сообщает контекст 4096 токенов, тогда как метаданные указывают нативный контекст 32768 токенов. Заявлена поддержка 15 языков: арабского, немецкого, английского, испанского, французского, хинди, итальянского, японского, корейского, нидерландского, польского, португальского, русского, турецкого и китайского. Лицензия — Apache-2.0.

Модель показывает хорошие результаты на собственных тестах поиска разговорных воспоминаний, но эти тесты основаны на обучающих данных и не подтверждают качество на независимых наборах. Она слабее подходит для поиска по длинным документам и оценки семантического сходства, чем предыдущая версия; многоязычный поиск близких воспоминаний часто не находит верный фрагмент с первой попытки. Косинусные оценки высоки даже для нерелевантных текстов, поэтому пороги сходства от других моделей применять нельзя; для калибровки README рекомендует файл calibration.json.

Сценарии применения

  • Поиск нужного факта в истории переписки
  • Извлечение воспоминаний персонажей из ролевого чата
  • Поиск заметок по краткому вопросу
  • Многоязычный поиск по сообщениям, когда запрос и текст написаны на разных языках

Ограничения

Модель настроена на короткие разговорные воспоминания и хуже ищет по длинным документам; результаты её собственных тестов получены на данных, близких к обучающим. Косинусные оценки завышены для нерелевантных текстов, поэтому пороги сходства нужно калибровать отдельно.

Для каких профессий подходит7

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

lettuce-eidos-768d-v5

Multilingual embedding model for conversational memory retrieval in 15 languages. 768-dimensional output with Matryoshka truncation to 64, 4,096-token context, 60M active parameters per token, 262 MB as int8 ONNX.

It is the memory model of LettuceAI and succeeds Zeolit/lettuce-emb-768d-v4.

Eidos (εἶδος) is the Greek word for form: the shape of a thing that remains recognisable however it is described.

Model description

A 12-layer student pruned from ibm-granite/granite-embedding-311m-multilingual-r2 (22 layers) and trained by self-distillation from the unpruned model, together with contrastive retrieval objectives on general and roleplay data.

ArchitectureModernBERT, 12 layers (6 global attention, 6 sliding window 128), 768 hidden, 12 heads, FFN 1152
Layers kept from base0, 1, 2, 5, 6, 9, 10, 15, 16, 18, 19, 21
Parameters262M total: 201M vocabulary table, 60M transformer
Vocabulary262,152 tokens (granite multilingual r2 tokenizer)
PoolingCLS token, L2 normalized
Output768 dimensions; Matryoshka 512 / 384 / 256 / 128 / 64
Context4,096 tokens (trained); base supports 32K
Promptsnone; queries and documents are encoded the same way
Files262 MB int8 ONNX, 1,046 MB fp32 ONNX

Intended uses and limitations

Retrieval of short conversational memories (chat turns, roleplay events, notes) from a user's own history, on device or on CPU. Works for queries and memories in different languages.

Raw cosine similarities are high for this model, including for unrelated text. Ranking is unaffected, but do not apply fixed thresholds tuned for other models; use calibration.json (see Score calibration).

Known weaknesses are listed under Limitations.

How to use

Sentence Transformers

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Zeolit/lettuce-eidos-768d-v5")
# model = SentenceTransformer("Zeolit/lettuce-eidos-768d-v5", truncate_dim=256)

query = "Aria: The mill looks quiet tonight.\nUser: Do you remember where you hid the sword?"
memories = [
    "Elara hid the sword in the old stone well behind the mill, under a loose slab.",
    "Elara took her sword to the village blacksmith to have it sharpened.",
    "Apple prices at the market went up again this week.",
]
q = model.encode(query)
m = model.encode(memories)
print(model.similarity(q, m))

Requires a transformers release with ModernBERT layer_types support (the checkpoint was saved with transformers 5.17).

ONNX Runtime

Pooling and normalization are inside the graph; the output embedding is the final 768-dimensional unit vector.

import json, numpy as np, onnxruntime as ort
from tokenizers import Tokenizer

tok = Tokenizer.from_file("tokenizer.json")
tok.enable_truncation(4096)
tok.enable_padding()
sess = ort.InferenceSession("onnx/model_quantized.onnx", providers=["CPUExecutionProvider"])
cal = json.load(open("calibration.json"))

def embed(texts, dim=768):
    enc = tok.encode_batch(texts)
    e = sess.run(None, {
        "input_ids": np.array([x.ids for x in enc], dtype=np.int64),
        "attention_mask": np.array([x.attention_mask for x in enc], dtype=np.int64),
    })[0][:, :dim]
    return e / np.linalg.norm(e, axis=1, keepdims=True)   # re-normalize after truncation

def shown_score(cosine, dim=768):
    c = cal["dims"][str(dim)]
    return np.clip(c["a"] * cosine + c["b"], 0.0, 1.0)

q = embed([query])
m = embed(memories)
scores = shown_score(m @ q[0])
keep = scores >= cal["default_threshold"]

Repository layout:

config.json                 ModernBERT config (12 layers)
model.safetensors           PyTorch weights, fp32
tokenizer.json              tokenizer
modules.json, 1_Pooling/    Sentence Transformers config (CLS pooling + normalize)
onnx/model.onnx             fp32 export, pooling + normalization in graph
onnx/model_quantized.onnx   int8 export (dynamic quantization)
calibration.json            per-dimension score mapping and thresholds
evaluation/results.json     every number in this card

Training data

All general-purpose training data is under licences that permit commercial use and derivative works (CC-BY, CC-BY-SA, Apache-2.0, MIT, or free of copyright restrictions). Non-commercial and no-derivatives datasets, web-scraped third-party content, and outputs of models whose terms restrict training were excluded.

General retrieval, 11.06M pairs after filtering, 18 sources:

SourceLicenceContentLanguages
hotchpotch/wikipedia-multilingual-synthetic-ir-queryCC-BY-SA 4.0query → Wikipedia passage / long document11
nthakur/swim-ir-cross-lingual, swim-ir-monolingualCC-BY-SA 4.0question → passage, incl. cross-lingual10
HuggingFaceFW/finewiki (own pairs)CC-BY-SA 4.0title → lead, paragraph pairs, long articles15
parallel-sentences-wikimatrix / -tatoeba / -europarlCC-BY-SA / CC-BY 2.0 FR / no copyright restrictionen ↔ xx parallel sentences14 pairs
stackexchange_title_body_jsonlCC-BY-SA 4.0forum title → bodyen
Natural Questions (hard negatives), HotpotQA, SQuADCC-BY-SAhuman-labelled question → passageen
MIRACL, Mr. TyDiApache-2.0human-labelled, with negatives9
JaQuAD, GermanQuAD, GermanDPR, SQAC, PolQACC-BY-SA 3.0/4.0, CC-BY 4.0human-written question → paragraphja, de, es, pl
Aya dataset, OASST2Apache-2.0human-written request → answer15
Simple Wiki, NarrativeQACC-BY-SA, Apache-2.0paraphrase, question → summaryen
bekko-embedding-hard-negatives (Wikipedia subsets only)CC-BY-SAquery + 15 hard negatives11

Roleplay and chat memory, ~580k pairs:

  • Generated with google/gemma-4-26B-A4B-it: 10,000 scenarios per language, 150,000 in total, built from independent axes (relationship, concern, memory type, voice, setting). Each scenario yields two memories about the same two characters describing different events (each the other's hard negative), a direct recall question per memory, and a context-enriched query per memory (previous character message + user message). 30% of non-English scenarios are cross-lingual (query in the target language, memory in English). Outputs are validated for structure, length, script and language. 5% of scenarios are held out as whole units for evaluation.
  • 60,000 English pairs cut without a model from the persona dialogues used for v4 (opening → passage, passage with two turns removed → rest). Passages used as answers in the evaluation benchmark are excluded.

Training procedure

Pruning. Greedy backward layer elimination on the base model: remove one layer at a time, choosing the layer whose removal best preserves the cosine between the pruned and full model's embeddings, with at least 6 global-attention layers kept. Cosine to the full model before training: 0.936.

Teacher pass. The full base model scores every pair. Inconsistent pairs are dropped, the easiest 30% are thinned, and hard negatives are mined per query with a scale-free false-negative guard (a candidate is rejected if it scores within 25% of the positive–background gap of the positive), then sieved with BAAI/bge-reranker-v2-m3. Negatives are re-mined with the stage-1 model before stage 2.

Losses. InfoNCE with GradCache and teacher-guided false-negative masking; self-distillation to the teacher's embeddings and in-batch similarity matrix; listwise KL to teacher scores over mined negatives (stages 2–3). All losses are applied at every Matryoshka dimension. Distillation weight 15 on general data, 3 on roleplay data.

StageStepsMax lengthBatchRoleplay share
14,0002561,02430%
23,000512192, 7 hard negatives25%
31,5004,09632 long / 512 short replay20%

Learning rates 5e-5 / 2e-5 / 1e-5, temperature 0.03, warmup 5%. The release is the last stage-3 checkpoint.

Quantization. ONNX Runtime dynamic int8 quantization. On a 500-query roleplay eval, recall@1 goes from 0.972 (fp32) to 0.958 (int8) at 768 dimensions and from 0.964 to 0.940 at 64; mean cosine between int8 and fp32 embeddings is 0.991.

Evaluation

Four models under one protocol: this model, v4, hotchpotch/bekko-embedding-v1-a25m and the unpruned base ibm-granite/granite-embedding-311m-multilingual-r2. PyTorch fp32 unless stated. Raw numbers are in evaluation/results.json.

Roleplay memory (v4 benchmark)

5,000 deterministic queries. Persona-prefix queries (the opening 30% of a dialogue window retrieves the window) and summary queries. v4's published numbers reproduce (Tier B recall@1 0.513 against 0.512 published).

Model500 passages R@1R@5144k passages R@1R@5
lettuce-eidos-768d-v50.9260.9860.7250.903
lettuce-emb-768d-v40.9020.9480.5130.769
bekko-embedding-v1-a25m0.9160.9740.5350.763
granite-311m-multilingual-r20.8640.9620.4600.669

Persona-prefix subset of the 144k haystack: v5 0.866, v4 0.245.

Both v4 and v5 were trained on the persona corpus this benchmark is built from (v5 with benchmark answers excluded). Read it as in-distribution.

Matryoshka (144k haystack, recall@1)

Dimensions64128256384512768
v50.6610.7090.7170.7240.7240.725
v40.4250.4870.5040.5090.513

Multilingual chat memory (held-out, recall@1)

25,364 queries (direct questions and context-enriched queries) over 12,682 memories from the held-out 5% of generated scenarios. Every scenario contains two memories about the same characters, so the best wrong answer is a deliberate near-duplicate.

Modelallardeenesfrhiitjakonlplptrutrzh
v50.2320.2400.2070.2600.2380.2180.2280.2020.2720.3010.2260.1710.2390.1910.2280.269
v40.0250.0100.0380.0790.0380.0180.0140.0190.0260.0130.0340.0080.0300.0060.0320.018
bekko-a25m0.0950.1010.1030.0920.0920.0700.1020.0740.1330.1520.0960.0480.0940.0560.1010.129
granite-311m0.0810.1090.0570.0950.0710.0500.1060.0440.1380.1170.0610.0440.0730.0520.0980.119

This test comes from the same generator as the roleplay training data (different scenarios), so it is also in-distribution for v5.

STSBenchmark

Spearman 0.784 (v4: 0.819).

Score calibration

Unrelated text scores a median raw cosine of about 0.65 with this model. calibration.json gives, per Matryoshka dimension, a linear map

shown = clamp(a * cosine + b, 0, 1)

fitted on the held-out multilingual chat-memory test so that the median unrelated memory maps to 0.20 and the point where 2% of unrelated memories pass maps to 0.50. After mapping, use 0.50 as the default threshold and 0.35 as a permissive fallback (about 10% of unrelated memories pass).

Dimensionabcorrect memories kept at 0.50at 0.35
7682.3810−1.381092.5%99.1%
5122.2901−1.286392.6%99.2%
3842.2556−1.254992.6%99.1%
2562.2388−1.244092.4%99.1%
1282.2388−1.266491.8%98.9%
641.9481−1.005889.0%98.0%

Thresholds only remove unrelated memories. Near-duplicates of the correct memory score as high as the correct one and are separated by ranking, not by threshold.

Limitations

  • Tuned for short conversational memories. Retrieval of book-length documents is weaker than v4.
  • Sentence-similarity grading (STS) is lower than v4.
  • Multilingual chat-memory recall@1 of 0.232 leaves most near-duplicate cases unresolved on the first result.
  • All benchmarks above were built by us and are in-distribution. No public retrieval benchmark (e.g. MMTEB) has been run yet.
  • The int8 file is larger than v4's (262 MB vs 138 MB) because of the multilingual vocabulary; compute per token is about half of v4's.

License

Apache-2.0. The base model is Apache-2.0. Training data licences are listed above; CC-BY and CC-BY-SA sources are credited here as required.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertModel
Ревизия весов
f14e5de

0 моделей