Skip to content

gliclass

2 TagsUpdated Apache-2.0by Knowledgator

Instruction-following zero-shot classifier by Knowledgator: all options of a question are scored in one pass, so cost barely grows with the number of options.

zero-shot439m
ollaya run gliclass --preset triage "I was charged twice for my subscription this month and want a refund."

Models

View all
Name
gliclasslatest1.8 GB · 1024 ctx · English
gliclass:large1.8 GB · 1024 ctx · English

Each model carries fp16 and fp32 graphs over one weights file, and loads fp16 on a CUDA GPU and fp32 on CPU.

Readme

GLiClass is an instruction-following zero-shot classifier 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. The cost therefore barely grows with the number of options.

Models

TagBackboneParamsLicenseTyped-decisions accuracy
gliclass:latest, gliclass:largeDeBERTa-v3-large439MApache-2.00.477

Accuracy is the argmax against the majority label on all 400 typed-decisions states. For comparison, nli scores 0.548 and laya:en 0.361.

Usage

ollaya run gliclass --preset triage "I was charged twice for my subscription this month and want a refund."

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's span and scores it against the text.
  • 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 exactly on CPU and CUDA.

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.
  • Uncalibrated. The model is not calibrated. Fit a CALIBRATION layer before you rely on thresholds.