/ Модель

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

Контекст
262 144 токена
Параметры
1,7 млрд
Лицензия
Apache 2.0
Архитектура
qwen3_5_text · dense
Базовая модель
Qwen3.5-2B
Библиотека
sentence-transformers
Опубликована
9 ноя 2026

AbsoluteZero-nli-2b

Классификация текстаТекст → label11 профессий
107скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

Описание модели

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

Англоязычная NLI-модель, которая классифицирует связь между текстом и утверждением и подходит для тегирования, маршрутизации и проверки обоснованности ответов.

AbsoluteZero-nli-2b — англоязычная модель для вывода отношений между текстом и утверждением, разработанная dleemiller на основе Qwen/Qwen3.5-2B. Она оценивает вероятности того, что утверждение следует из текста, противоречит ему или нейтрально по отношению к нему. Модель содержит около 1,7 млрд параметров и использует плотную архитектуру классификации последовательностей; доступна в формате safetensors и рассчитана на контекст до 262 144 токенов, хотя обучение проводилось на примерах длиной до 8 тыс. токенов.

Модель поддерживает два режима: быстрый режим классифицирует пару за один проход и выдаёт калиброванные вероятности; режим Think сначала формирует короткую трассу рассуждения, после чего классифицирует пару. Её можно применять для классификации без примеров, маршрутизации запросов, проверки соответствия ответов найденным источникам и сопоставления текста с политиками. Лицензия — Apache-2.0.

Модель работает только с английским языком. В режиме Think уверенность классификатора нельзя трактовать как калиброванную; скорость этого режима заметно ниже. Точность отдельно не проверялась на документах длиннее 8 тыс. токенов, а результаты слабее на финансовой и общей юридической проверке и на состязательных задачах.

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

  • классификация тем текста по набору утверждений
  • маршрутизация запросов пользователей по намерениям
  • проверка, подтверждается ли ответ найденными фрагментами документов
  • проверка соответствия сообщения политике или правилу
  • анализ противоречий между текстом и утверждением

Ограничения

Модель поддерживает только английский язык. Режим Think работает медленнее, а его уверенности не калиброваны; качество отдельно не проверялось для документов длиннее 8 тыс. токенов и слабее на финансовых, общих юридических и состязательных задачах.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

AbsoluteZero NLI 2B

Observable NLI with think traces

Provide a text (premise) and a statement (hypothesis), and it returns calibrated probabilities that the text entails, contradicts, or is neutral to the statement. One model answers in two ways:

  • Fast mode: a single forward pass and a classifier head (similar to cross-encoders).
  • Think mode: the model writes a short reasoning trace, then the scoring head reads it and gives the verdict. Use it on the hard cases, such as multi-step logic, quantifiers and negation, long contracts and policies. Traces are short (~55 tokens on average on ANLI, ~220 on first-order-logic problems).

Benefits of observation

Typical zero-shot encoder models cannot provide information that elucidates why they chose their classification. Think traces enable users to inspect and determine how to augment hypotheses to fix or improve classification. This could be done in conjunction with automation for grouping classification failures and using an LLM to test changes to the hypothesis against a holdout set.

Examples

UseText → statementResult (fast mode)
Zero-shot classification / taggingreview → "This review is positive."92.6% (zs_meta, 18 tasks)
RAG groundingretrieved passages → generated answer85.8% (RAGTruth)
Guardrails / Moderationmessage → policy statement92.1% (CrossingGuard)
Clinical extractionclinical note → "The patient is unemployed."98.3% (SDOH-NLI)
Contract reviewcontract → "The agreement permits sharing data with third parties."92.6% (ContractNLI)

1.9B parameters · documents up to 32k tokens · #2 on the OpenNLI Skill Index (11-09-26, fast mode) · Apache-2.0

from sentence_transformers import CrossEncoder

model = CrossEncoder("dleemiller/AbsoluteZero-nli-2b", trust_remote_code=True)
text = "My card was charged twice for the same order."
labels = ["billing", "shipping", "account access"]
probs = model.predict([(text, f"This text is about {l}.") for l in labels], apply_softmax=True)
print({l: round(float(p[0]), 3) for l, p in zip(labels, probs)})  # p[0] = P(entailment)
# {'billing': 0.976, 'shipping': 0.002, 'account access': 0.002}

More in Think Mode, Recommended Applications and the 45-dataset evaluation.


Table of Contents


NLI Evaluation Results

Comparison on the OpenNLI leaderboard (v0.2.8), fast mode.

ModelParamsSkill IndexAccuracymnlimnli_mismatchedsnlianli_r1anli_r2anli_r3wanlilingnliCALThroughput (pairs/s)
dleemiller/AbsoluteZero-nli-2b1.9B59.60.82620.91300.91460.93320.78600.64700.60420.76560.87417.7353
dleemiller/AbsoluteZero-nli-4b4.2B61.80.83720.92110.92270.93660.82500.70600.65170.77180.88297.2159
dleemiller/finecat-nli-v2-xl1.03B59.50.82630.92020.91910.93560.78600.66000.60670.77100.88346.1576
dleemiller/finecat-nli-ultra-l378M58.60.82130.91270.91320.93020.79100.64000.58080.76980.87086.61,487
dleemiller/finecat-nli-v2-l396M57.80.81820.91640.91220.93290.77600.60400.57670.76640.87756.51,224
tasksource/ModernBERT-large-nli*396M37.80.72460.89810.92230.91920.72900.51300.49170.69700.849713.21,218
dleemiller/finecat-nli-l*396M37.60.72920.91550.92690.91620.74700.56800.54250.77080.874520.91,225
MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli435M27.90.67670.91230.90770.88970.79500.68200.63920.76960.881525.31,092
sileod/deberta-v3-large-tasksource-nli*435M24.80.63410.92980.94470.92110.73700.57700.49750.67860.867317.91,091

* trained on one or more OpenNLI test sets; those scores are replaced by estimates, as on the leaderboard.


Usage

Label Map:

  • entailment: 0
  • neutral: 1
  • contradiction: 2

Fast mode (Sentence Transformers)

pip install -U sentence-transformers
from sentence_transformers import CrossEncoder
import numpy as np

model = CrossEncoder("dleemiller/AbsoluteZero-nli-2b", trust_remote_code=True)
id2label = model.model.config.id2label  # {0:'entailment', 1:'neutral', 2:'contradiction'}

pairs = [
    ("The glass fell off the counter and shattered on the tile floor.",
     "The glass broke when it hit the floor."),          # E
    ("The store opens at 9 a.m. every day.",
     "The store opens at 7 a.m. on weekdays."),          # C
    ("A researcher presented results at the conference.",
     "The presentation won the best paper award."),       # N
]

logits = model.predict(pairs)  # shape: (3, 3)
for (prem, hyp), row in zip(pairs, logits):
    print(f"[{id2label[int(np.argmax(row))]}]  Premise: {prem}  |  Hypothesis: {hyp}")

The model reads each pair in its training layout (Premise: … / Hypothesis: … / <think></think> / Relation:); the tokenizer shipped with the model builds it, so pass plain (premise, hypothesis) pairs. Inputs are right-padded; the head reads each row's last token.

Scoring multiple hypotheses on one text. The model is causal and the premise comes first, so for tagging or checking many claims against one document, score_many encodes the premise once and scores every hypothesis from that cached state: the same predictions as scoring pair by pair, ~10x faster for 50 labels on a ~500-token document.

doc = "My card was charged twice for the same order, and support hasn't replied in a week."
labels = ["billing", "shipping", "account access", "customer support"]
logits = model.model.score_many(model.tokenizer, doc, [f"This text is about {l}." for l in labels])
print({l: round(p, 3) for l, p in zip(labels, logits.softmax(-1)[:, 0].tolist())})  # P(entailment) per label
# {'billing': 0.965, 'shipping': 0.002, 'account access': 0.002, 'customer support': 0.991}

Think Mode

Think mode is a method on the loaded model; it returns the verdict, its probabilities and the trace.

from sentence_transformers import CrossEncoder

model = CrossEncoder("dleemiller/AbsoluteZero-nli-2b", trust_remote_code=True)
pairs = [
    ("The glass fell off the counter and shattered on the tile floor.", "The glass broke when it hit the floor."),
    ("The store opens at 9 a.m. every day.", "The store opens at 7 a.m. on weekdays."),
    ("A researcher presented results at the conference.", "The presentation won the best paper award."),
]
for r in model.model.think(model.tokenizer, pairs):
    print(r["label"], "|", r["trace"])
entailment | Shattering on the floor means it broke upon hitting the floor, so the premise entails the hypothesis.
contradiction | The premise states the store opens at 9 a.m. daily, while the hypothesis states it opens at 7 a.m. on weekdays. These times conflict, so the premise contradicts the hypothesis.
neutral | Presenting results at a conference does not indicate whether the presentation won an award, so the premise neither guarantees nor rules out the hypothesis.

Think vs. fast (test sets: n=300 pairs each; ANLI dev: full dev splits):

DatasetFastThinkThink tokens (avg.)
anli_r2 (test)0.65000.690057
anli_r3 (test)0.59330.620057
wanli (test)0.71330.720047
vitaminc (test)0.86670.813353
control (test)0.72330.713368
fol (test)0.80670.7467225
anli_dev_r10.79110.794356
anli_dev_r20.65780.695256
anli_dev_r30.59170.592657

Both modes have comparable accuracy with some variation. Confidence is calibrated for fast mode, while adding think traces will make the classification head certain toward the think trace, so confidence cannot be used in that mode.


Recommended Applications

Frame each check as a premise (text) and hypothesis (statement), and use the entailment probability.

ApplicationExample hypothesisSupporting results
Zero-shot tagging / topic classification"This text is about billing."zs_meta, fin_topics
Routing and decisions in agent pipelines"The user wants to cancel an order."zs_meta, mnli, snli
RAG grounding / hallucination checksEach answer sentence vs. retrieved passagesragtruth, wice, vitaminc
Contract and policy review"The agreement permits sharing data with third parties."contractnli_a/b, control, docnli
Biomedical and health claim checkingClaim vs. abstract or clinical notesdoh_nli, biosift, bionli, scifact, pubhealth
Dialogue fact-checkingAssistant reply vs. knowledge sourcedialfact, vitaminc
Guardrails / policy matchingPolicy statement vs. user or model textcrossingguard
Logical reasoning (think mode)Conclusion vs. premisesfol, control, anli

Less suited: financial and general legal verification (findver, legal_domain), and adversarial reasoning (anli_r3, nope_adv).


Extended Evaluation (45 datasets)

Accuracy (fast mode) on the test splits of 45 NLI and adjacent datasets. 2-way datasets (entailed vs. not) are scored as entailment vs. any non-entailment prediction. DocNLI and VitaminC are evaluated on fixed random subsets of 5,000 and 10,000 pairs; FRANK is scored per summary. — = not on the same items.

DatasetnAbsoluteZero-nli-2bAbsoluteZero-nli-4bfinecat-nli-v2-xl
finecat180120.84120.85330.8445
mnli98150.91300.92070.9202
mnli_mismatched98300.91480.92260.9191
snli98240.93350.93670.9356
anli_r110000.78500.82600.7860
anli_r210000.64700.70600.6600
anli_r312000.60330.65420.6067
wanli50000.76620.77200.7710
lingnli73610.87390.88300.8834
glue_diagnostic11000.74640.75640.7582
med53800.78510.79410.8147
nan_nli2580.74030.74810.7171
scone_test10000.99901.00001.0000
nmonli_test2001.00001.00001.0000
conjnli6230.72550.73030.7191
nope_adv3450.51590.55070.5739
nli4ct1990.85430.85430.8141
sdoh_nli9900.98280.98180.9879
healthver2300.79570.75650.7609
scifact3000.87670.87670.8733
biosift10000.91900.92400.9200
scientsbank9710.75490.76830.7508
beetle8190.66540.66670.6422
legal_domain11630.53740.58130.4918
findver5000.69400.72400.6560
dialfact14990.83590.85120.8412
frank15720.70230.7417—
ragtruth14970.85840.86440.8544
vast15000.78200.79070.7933
zs_meta54000.92570.93410.9304
seahorse8000.84250.84130.8562
pubhealth6000.85330.86170.8500
bionli6000.91170.91670.9133
fin_topics6000.95830.97000.9767
vitaminc100000.87520.90300.9062
docnli50000.84200.8516—
contractnli_a17070.92620.92910.9279
contractnli_b20740.89920.90260.8954
control8000.71370.76750.7525
fol102770.81890.84810.8727
scitail21260.96470.96710.9661
wice9580.89770.89980.8810
sick49060.92170.92460.9317
crossingguard53970.92110.92480.9250
hans150000.86490.84680.8463

Macro average over the 45 datasets: 0.8264 (4B: 0.8383).


Training Details

This model is a fine-tune of Qwen/Qwen3.5-2B (text backbone), trained in two stages.

Stage 1: distillation. Full fine-tune (all weights) & two classifier heads, trained on the FineCat-NLI-Reason compilation relabelled by an NLI fine-tune of Qwen3.8-27B.

Stage 2: reinforcement learning on think mode (GRPO). Think mode was further trained with 32 sampled traces per prompt, reward = correctness of the verdict with a soft overlong penalty, a repetition penalty and a floor that discourages trace collapse.

Stage 2 made think mode much shorter at equal or better accuracy. On first-order-logic validation problems, accuracy 0.792 → 0.806 with traces cut from ~365 to ~217 tokens on average.

The released weights are the stage-2 GRPO LoRA merged into the stage-1 weights, stored in bfloat16.


Limitations

  • English only.
  • Throughput: ~350 pairs/s on short pairs (~90 on long documents) in fast mode; use the FineCat encoders for very high volume or tight latency. Think mode generates a trace per pair (~1-10 pairs/s with transformers, depending on trace length; vLLM is faster).
  • Trained on inputs up to 8k tokens; scored at up to 32k, but accuracy on documents longer than 8k is not separately tested.
  • Weaker on financial and general legal verification (findver, legal_domain) and adversarial reasoning (anli_r3, nope_adv).

Acknowledgments

We thank the Qwen team for making their work available. This model would not be possible without their efforts and open source contributions.

Citation

@misc{absolutezero-2026,
  title = {AbsoluteZero: Observable NLI},
  author = {Lee Miller},
  year = {2026},
  howpublished = {\url{https://huggingface.co/dleemiller/AbsoluteZero-nli-2b}}
}

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
NLIStudentForSequenceClassification
Ревизия весов
6f7e464

0 моделей