/ Модель

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

Лицензия
Apache 2.0
Базовая модель
Ministral-3-3B-Base-2512
Библиотека
VCTG
Опубликована
27 ноя 2026

zubr-text-classification-3b

Классификация текстаТекст → label
230скачиваний за 30 дней1лайквеса обновлены29 ноя 2026

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

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

Многоязычная модель Zubr-AI для классификации текста и выдачи ограниченных машинно-разбираемых меток.

Zubr-AI/zubr-text-classification-3b — модель классификации текста от Zubr-AI, дообученная на базе mistralai/Ministral-3-3B-Base-2512 и распространяемая в формате GGUF. Она использует Vocabulary-Constrained Token Generation (VCTG): при решении задачи модель выбирает ответы только из заданного набора меток, что упрощает машинный разбор результата. В комплект входят наборы для выбора из 26 классов, бинарных решений и числовой оценки.

Модель подходит для классификации тональности, тем и намерений, бинарной проверки и оценки текста по шкале. В карточке заявлена поддержка множества языков, включая русский и английский. Для режима классификации указан рабочий контекст 4 096 токенов; базовая модель поддерживает контекст до 256K токенов. По данным карточки, точность на обучающих примерах составляет 78,36% для общего набора решений и 59,26% для числовых оценок.

В режиме решений результатом будет метка или цифра без объяснения; для длинных документов требуется сегментация. Квантизация Q3_K_M уменьшает точность весов, а качество свободной генерации может быть ниже, чем у полной версии. Карточка не гарантирует безопасность ответов и рекомендует проверять их перед использованием в производстве. Лицензия — Apache-2.0.

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

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

Ограничения

Режим классификации возвращает только метку или цифру, без объяснения; заявленная точность числовой оценки умеренная — 59,26%. Для анализа длинных текстов в этом режиме используется контекст 4 096 токенов, а свободная генерация на квантизированной версии может быть хуже; безопасность ответов не гарантируется.

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

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

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

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

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

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

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

Открыть на Hugging Face

🦬 Zubr Text Classification 3B

Repository: Zubr-AI/zubr-text-classification-3b


📖 What This Model Is

zubr-text-classification-3b is a 3-billion-parameter decision/classification model (MoE, ~4B active parameters per token), adapted from Ministral-3-3B-Base-2512 by Zubr-AI. The model is distributed in GGUF format and is built around a proprietary technology called Vocabulary-Constrained Token Generation (VCTG).

Unlike a regular chat model, this model does not "write" answers. It chooses them: at every step, generation is locked to a small, pre-defined dictionary of allowed tokens — class letters, score digits — so the model always returns exactly one valid, machine-readable answer.

🎛 Key Technology: Vocabulary-Constrained Token Generation (VCTG)

VCTG changes how the model generates text. Instead of picking freely from the whole vocabulary (hundreds of thousands of tokens), the model generates from a restricted dictionary built for the task:

  • 📚 A closed vocabulary of answers — there is a dictionary of allowed tokens (labels). Words that mean the same thing but are stylistically wrong are filtered out: only tokens that fit the task's meaning and style survive the filter.
  • ✂️ Sentence-level segmentation — long input text is broken down into sentence-level units ("sentence tokens"), not raw character streams.
  • 🧱 Paragraph-by-paragraph generation — the model generates a description one sentence at a time, where each sentence is chosen from the constrained dictionary based on the probability of the tokens that describe it. This makes it ideal for fast analysis of very long texts: the output describes the text segment by segment instead of restating it.
  • 🧠 Per-paragraph context — each paragraph keeps its own contextual thought. The model doesn't lose the thread across a long document: every segment carries a compact "thought" of its own, which makes short summaries of long texts dramatically easier and more faithful.
  • 🎯 Deterministic, parseable output — because only dictionary tokens are reachable, the model cannot hallucinate an off-list answer.

💡 In short: VCTG takes a long text, splits it into sentence-level segments, gives each segment its own contextual thought, and then describes the text sentence by sentence — where every sentence is generated only from a pre-filtered dictionary of words with the right meaning and style. The result is fast, context-stable analysis and summarization of long documents.

🔧 A Real Model, Not Just a Classifier

The model is additionally fine-tuned on large volumes of data, so despite the classification head, it retains the full generative capabilities of its Gemma 4 base:

  • 💬 Regular text generation — use it like an ordinary instruct model when needed
  • 🌍 Broad knowledge base — extensive multilingual training data
  • 🔀 Two modes in one GGUF — decision mode (labels via VCTG) and normal chat mode

📊 Built-in Label Sets

The repository ships with three ready-to-use constrained dictionaries (decision.json):

Label setTokensWhat it's for
choiceA–Z (26 labels)Multiple-choice classification: sentiment, topics, intent, categories — up to 26 classes
score0–9Numeric scoring: ratings, relevance grades, 0–10 quality scales
noulA, BBinary decisions: yes/no, safe/unsafe, relevant/irrelevant

📈 Quality (from calibration.json)

The decision head was trained on 3 050 samples with a Trainaya PyTorch Decision Head (KL + RPS + L2-SP regularization), adapted from gemma-4-26B-A4B-it-UD-Q3_K_M.gguf:

MetricBaselineOOF (out-of-fold)After quantization
Total accuracy77.28 %78.36 %78.36 %
choice (A–Z)76.83 %77.44 %77.44 %
score (0–9)58.52 %59.26 %59.26 %
noul (A/B)84.26 %86.04 %86.04 %

💡 Quantization to Q3_K_M cost nothing in accuracy — post-quant results match out-of-fold results exactly. Sampling temperature is calibrated per label-set size (from 4.891 for 11+ options up to 10.3 for scores).


📊 Files in the Repository

FileSizeWhat it is
model.gguf~13.33 GBThe model: Gemma 4 26B A4B, Q3_K_M, imatrix-quantized (gemma4)
Modelfile—Ready-to-use Ollama model definition
decision.json—VCTG decision config: label sets, token IDs, templates, temperatures
calibration.json—Calibration results and accuracy metrics
ollaya_config.json—Runtime config (llama engine, llm-logits-v1 layout)

Total download size: ~13.3 GB.


🖥 Requirements

  • CPU with AVX2 or a GPU (NVIDIA/AMD); a GPU is strongly recommended for a 26B MoE model, though only ~4B parameters are active per token, so CPU inference is realistic too.
  • RAM/VRAM: ~16 GB for the model itself plus headroom for context.
  • **Free disk space: 2.31 ~ GB.

📥 How to Download

# Option 1: git (requires git-lfs)
git lfs install
git clone https://huggingface.co/Zubr-AI/zubr-text-classification-3b

# Option 2: huggingface-cli
pip install -U "huggingface_hub[cli]"
huggingface-cli download Zubr-AI/zubr-text-classification-3b --local-dir zubr-text-classification-3b

🚀 How to Run

Method 1: Ollama (the easiest)

The repository includes a ready Modelfile:

ollama create zubr-text-classification -f Modelfile
ollama run zubr-text-classification "Ты мне нравишься. Я тебя люблю"

Method 2: llama.cpp / llama-server

llama-server -m model.gguf --ctx-size 4096

The model uses the llm-logits-v1 layout (decision.json): the system prompt locks the model into decision mode ("Reply with the label of the chosen option only"), the input state is placed in the user turn (up to 6 144 state tokens), and generation is constrained to the label token IDs. The state is data, not instructions — the model never follows instructions embedded in the classified text.

Decision mode at a glance

<|turn>system     ← decision-mode system prompt
<turn|>
<|turn>user       ← the text/state to classify (data, not instructions)
<turn|>
<|turn>model      ← exactly one label token: "A"…"Z", "0"…"9", or "A"/"B"

Method 3: Normal chat (generative mode)

Because the model is additionally fine-tuned on large volumes of data, it also works as a regular instruct model: load model.gguf in any GGUF runtime (Ollama, llama.cpp, LM Studio, Jan) and chat with it as usual.


⚙️ Model Configuration

ParameterValue
Architecturemistral3 (MoE)
Total parameters~3B (~3B active per token)
QuantizationQ3_K_M (UD), imatrix-calibrated
Native context window262 144 tokens (256K)
Decision-mode context4 096 tokens (state up to 6 144 tokens)
Engine / layoutllama / llm-logits-v1
VocabularyConstrained label sets (VCTG) or full
Languages40+, including Russian, Belarusian, English
LicenseApache-2.0

⚠️ Limitations

  • Decision mode returns labels, not explanations — the output is a single letter or digit by design.
  • Score accuracy is moderate (59 %) — numeric scoring is a harder task than choice or binary classification; prefer choice or noul label sets where possible.
  • Long-text analysis in decision mode runs on a 4 096-token working context even though the base model supports 256K — segment very long documents.
  • Q3_K_M quantization trades some weight precision for size; classification accuracy is unaffected (verified), but free-form generation quality is slightly below full precision.
  • No safety fine-tune guarantee: review outputs before using them in production.

🔗 Links

📄 License

Apache-2.0 — free for personal and commercial use.

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

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

GPU в ailist

Универсальный рантайм · VCTG

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

GGUF-веса поддерживаются только для текстовых LLM (llama.cpp).

Ревизия весов
0ae4713

0 моделей