Skip to content

gliclass

3 TagsUpdated Apache-2.0by Knowledgator

Instruction-following zero-shot classifiers by Knowledgator: all options of a question are scored in one pass, so on a GPU the cost barely grows with the number of options; on a CPU it grows with them.

zero-shot439m440m
ollaya run gliclass --preset triage "I was charged twice for my subscription this month and want a refund."
NameAccuracyLatency
Most accurateHighest typed-decisions accuracy of the family.
gliclass:v4-edgeGLiClass v4 Edge (DeBERTa-v3-large backbone, a calibrator on every label's score), Apache-2.0: 0.506 on typed decisions.0.50616 ms
FasterFastest first; accuracy as measured on the bench.
gliclass:largeGLiClass instruct large v1.0 (DeBERTa-v3-large backbone), Apache-2.0.0.47714 ms
gliclasslatestSame as gliclass:large.0.47714 ms

Accuracy: typed-decisions, argmax against the majority label on 400 states (left out for a tag trained on that data). Latency: the median five-question request on an RTX 5090, Ollaya Bench.

Readme

GLiClass is a family of instruction-following zero-shot classifiers by Knowledgator. Ollaya writes a question's options as labels and its instructions as the task prompt, and the model scores all the labels in a single pass, so a question takes one pass however many options it has. Each label adds tokens to that pass, though, so a question with dozens of options takes many times as long as a yes/no one.

Models

TagBackboneParamsLicenseTyped-decisions accuracy
gliclass:latest, gliclass:largeDeBERTa-v3-large439MApache-2.00.477
gliclass:v4-edgeDeBERTa-v3-large, with a calibrator440MApache-2.00.506

Accuracy is the argmax against the majority label on all 400 typed-decisions states. gliclass:v4-edge is Knowledgator's GLiClass v4 Edge, released in October 2026: it reads each label at its own marker and rescales every label's score with a small calibrator network. Its download is half the size of large's (0.88 GB, bf16). For comparison, nli scores 0.536 and laya:en 0.357.

Usage

ollaya run gliclass --preset triage "Your app crashed during checkout and I was charged twice. Please refund one of the charges."

How it works

  • One sequence per question. Label markers go first, then the task prompt, then the state, up to 1,024 tokens.
  • Scoring. The graph pools every label (large: its span; v4-edge: its marker token) and scores it against the text. v4-edge's calibrator then rescales each label's score, as Knowledgator's own pipeline does.
  • Mapping to question types. The mapping of choice, score and noul onto labels is Ollaya's, chosen by testing on typed-decisions.
  • Weights. They are Knowledgator's own model.safetensors, downloaded from Hugging Face, pinned to a commit and verified by sha256.
  • Parity. Ollaya's Rust runtime matches the Python reference on CPU and CUDA: the same decision on every test question.
  • Apple silicon. large runs on the GPU through MLX; v4-edge runs on the CPU.

Limits

  • Yes/no questions without criteria are its weakest point. Such a question is scored as one label with a sigmoid, and it can be confidently wrong. Give noul questions criteria with both true and false descriptions, or use nli for them.
  • Option count. A question with more options than fit in 1,024 tokens is rejected with TOO_MANY_OPTIONS.
  • Calibration. large is not calibrated. v4-edge's calibrator was trained by Knowledgator; its calibration error on typed decisions is 0.188, against 0.219 for large. Fit a CALIBRATION layer before you rely on thresholds.

Badge

Run on Ollaya

For the model card or a README. Day-0 support for a new model

[![Run on Ollaya](https://ollaya.dev/badge/run-on-ollaya.svg)](https://ollaya.dev/library/gliclass)