/ Модель

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

Лицензия
Apache 2.0
Архитектура
GLiClass · dense
Опубликована
17 фев 2026

gliclass-instruct-base-v1.0

Классификация текстаТекст → label15 профессий

Компактная GLiClass-модель для быстрой классификации текстов по пользовательским меткам в zero-shot и few-shot сценариях.

1 197скачиваний за 30 дней9лайковвеса обновлены21 мая 2026

Бенчмарки

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

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

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

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

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

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

knowledgator/gliclass-instruct-base-v1.0 — компактная плотная модель семейства GLiClass от Knowledgator для классификации текста по заданным меткам. Она поддерживает zero-shot и few-shot сценарии: метки можно задавать под конкретную задачу, добавлять к ним описания и примеры, группировать и направлять классификацию инструкцией. Модель рассчитана на тематическую и тональную классификацию, определение намерений, проверку следования правилам и безопасности, выявление галлюцинаций, вывод по естественному языку и оценку релевантности текстов.

Модель принимает текст и возвращает оценки классов. В README отмечено, что для вывода по естественному языку лучше проверять по одной гипотезе за раз. Приведённые в карточке результаты показывают качество на отдельных наборах для классификации тональности и тем, но сами по себе не гарантируют точность на пользовательских данных. Модель распространяется по лицензии Apache-2.0.

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

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

Ограничения

В README указано, что для вывода по естественному языку модель лучше использовать с одной гипотезой за раз. Приведённые benchmark-результаты относятся к отдельным наборам данных и не гарантируют качество на других доменах.

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

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

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

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

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

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

Открыть на Hugging Face

image/png

GLiClass-multitask: Efficient zero-shot and few-shot multi-task model via sequence classification

GLiClass is an efficient zero-shot sequence classification model designed to achieve SoTA performance while being much faster than cross-encoders and LLMs, while preserving strong generalization capabilities.

The model supports text classification with any labels and can be used for the following tasks:

  • Topic Classification
  • Sentiment Analysis
  • Intent Classification
  • Reranking
  • Hallucination Detection
  • Rule-following Verification
  • LLM-safety Classification
  • Natural Language Inference

✨ What's New in V3

  • Hierarchical Labels — Organize labels into groups using dot notation or dictionaries (e.g., sentiment.positive, topic.product).
  • Few-Shot Examples — Provide in-context examples to boost accuracy on your specific task.
  • Label Descriptions — Add natural-language descriptions to labels for more precise classification.
  • Task Prompts — Prepend a custom prompt to guide the model's classification behavior.

See the GLiClass library README for full details on these features.

Installation

pip install gliclass

Quick Start

from gliclass import GLiClassModel, ZeroShotClassificationPipeline
from transformers import AutoTokenizer

model = GLiClassModel.from_pretrained("knowledgator/gliclass-instruct-base-v1.0")
tokenizer = AutoTokenizer.from_pretrained("knowledgator/gliclass-instruct-base-v1.0")
pipeline = ZeroShotClassificationPipeline(model, tokenizer, classification_type='multi-label', device='cuda:0')

Task Examples

1. Topic Classification

text = "NASA launched a new Mars rover to search for signs of ancient life."
labels = ["space", "politics", "sports", "technology", "health"]

results = pipeline(text, labels, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])

With hierarchical labels

hierarchical_labels = {
    "science": ["space", "biology", "physics"],
    "society": ["politics", "economics", "culture"]
}

results = pipeline(text, hierarchical_labels, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])
# e.g. science.space => 0.95

2. Sentiment Analysis

text = "The food was excellent but the service was painfully slow."
labels = ["positive", "negative", "neutral"]

results = pipeline(text, labels, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])

With a task prompt

results = pipeline(
    text, labels,
    prompt="Classify the sentiment of this restaurant review:",
    threshold=0.5
)[0]

3. Intent Classification

text = "Can you set an alarm for 7am tomorrow?"
labels = ["set_alarm", "play_music", "get_weather", "send_message", "set_reminder"]

results = pipeline(text, labels, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])

With few-shot examples

examples = [
    {"text": "Wake me up at 6:30.", "labels": ["set_alarm"]},
    {"text": "Play some jazz.", "labels": ["play_music"]},
]

results = pipeline(text, labels, examples=examples, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])

4. Natural Language Inference

Represent your premise as the text and the hypothesis as a label. The model works best with a single hypothesis at a time.

text = "The cat slept on the windowsill all afternoon."
labels = ["The cat was awake and playing outside."]

results = pipeline(text, labels, threshold=0.0)[0]
print(results)
# Low score → contradiction

5. Reranking

Score query–passage relevance by treating passages as texts and the query as the label:

query = "How to train a neural network?"
passages = [
    "Backpropagation is the key algorithm for training deep neural networks.",
    "The stock market rallied on strong earnings reports.",
    "Gradient descent optimizes model weights during training.",
]

for passage in passages:
    score = pipeline(passage, [query], threshold=0.0)[0][0]["score"]
    print(f"{score:.3f}  {passage[:60]}")

6. Hallucination Detection

Concatenate context, question, and answer into the text field:

text = (
    "Context: The Eiffel Tower was built from 1887 to 1889 and is 330 m tall. "
    "It was the tallest structure until the Chrysler Building in 1930.\n"
    "Question: When was the Eiffel Tower built and how tall is it?\n"
    "Answer: It was built 1887–1889, stands 330 m tall, and was the tallest "
    "structure until the Empire State Building in 1931."
)
labels = ["hallucinated", "correct"]

results = pipeline(text, labels, threshold=0.0)[0]
for r in results:
    print(r["label"], "=>", r["score"])
# "hallucinated" should score higher (Empire State Building & 1931 are wrong)

7. Rule-following Verification

Include the domain and rules as part of the text:

text = (
    "Domain: e-commerce product reviews\n"
    "Rule: No promotion of illegal activity.\n"
    "Text: The software is okay, but search for 'productname_patch_v2.zip' "
    "to unlock all features for free."
)
labels = ["follows_guidelines", "violates_guidelines"]

results = pipeline(text, labels, threshold=0.0)[0]
for r in results:
    print(r["label"], "=>", r["score"])

8. LLM-safety Classification

text = "I'm looking for a good Italian restaurant near downtown Chicago, budget ~$50/person."
labels = [
    "benign request",
    "prompt injection",
    "system prompt extraction",
    "jailbreak attempt",
    "harmful content request",
    "social engineering",
    "data exfiltration",
]

results = pipeline(text, labels, threshold=0.5)[0]
for r in results:
    print(r["label"], "=>", r["score"])

Benchmarks

F1 scores on zero-shot text classification (no fine-tuning on these datasets):

GLiClass-V1 Multitask:

Datasetlarge‑v1.0base‑v1.0edge‑v1.0
CR0.90660.89220.7933
sst20.91540.91980.7577
sst50.33870.22660.2163
20_newsgroups0.55770.51890.2555
spam0.97900.93800.7609
financial_phrasebank0.82890.52170.3905
imdb0.93970.93640.8159
ag_news0.75210.69780.6043
emotion0.44730.44540.2941
cap_sotu0.43270.45790.2380
rotten_tomatoes0.84910.84580.5455
massive0.58240.47570.2090
banking0.69870.60720.4635
snips0.85090.65150.5461
AVERAGE0.71990.65250.4922

GLiClass-V3:

Datasetlarge‑v3.0base‑v3.0modern‑large‑v3.0modern‑base‑v3.0edge‑v3.0
CR0.93980.91270.89520.89020.8215
sst20.91920.89590.93300.89590.8199
sst50.46060.33760.46190.27560.2823
20_newsgroups0.59580.47590.39050.34330.2217
spam0.75840.67600.58130.63980.5623
financial_phrasebank0.90000.89710.59290.42000.5004
imdb0.93660.92510.94020.91580.8485
ag_news0.71810.72790.72690.66630.6645
emotion0.45060.44470.45170.42540.3851
cap_sotu0.45890.46140.40720.36250.2583
rotten_tomatoes0.84110.79430.76640.70700.7024
massive0.56490.50400.39050.34420.2414
banking0.55740.46980.36830.35610.0272
snips0.96920.94740.77070.56630.5257
AVERAGE0.71930.67640.61970.55770.4900

Citation

@misc{stepanov2025gliclassgeneralistlightweightmodel,
      title={GLiClass: Generalist Lightweight Model for Sequence Classification Tasks}, 
      author={Ihor Stepanov and Mykhailo Shtopko and Dmytro Vodianytskyi and Oleksandr Lukashov and Alexander Yavorskyi and Mykyta Yaroshenko},
      year={2025},
      eprint={2508.07662},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2508.07662}, 
}

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

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

GPU в ailist

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

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

Архитектура GLiClass неизвестна transformers в образе рантайма.

Класс архитектуры
GLiClassModel
Ревизия весов
4f6a108

0 моделей