GLiClass v4 Edge
Instruction-following zero-shot classification in a 0.4B encoder, built for CPUs and edge devices.
knowledgator/gliclass-v4-edge is the 0.4B-parameter edge release of
GLiClass v4. The labels you pass and an
optional instruction tell it what to decide at inference time. It returns a score for
every label in one forward pass and generates no text. It reaches a Decision Index public skill of 47.5 at a median
latency of 11 ms per decision, ahead of every model up to 1B parameters on the public board (the best of them scores 36.9).
Usage
Or install from source in a Python 3.10+ environment:
The following examples reuse pipeline:
For a local copy, replace the model ID with the checkpoint directory.
Multi-label classification
Each prediction contains label and score. Pass a list of texts and batch_size=8 for batched inference.
Scores are calibrated on held-out data; predictions also carry initial_score, the uncalibrated score.
Single-label decisions and scoring
Use classification_type="single-label" to pick one answer: scores are a softmax over the labels.
To score an input, use the levels of a scale as labels and read their probabilities:
Instruction following
Use prompt for the instruction, policy, or rubric. Labels are interpreted in light of it:
Few-shot examples (examples=[{"text": ..., "labels": [...]}]) and hierarchical labels
({"sentiment": ["positive", "negative"], "topic": ["product", "service"]}) are also supported.
Knowledge graph reasoning
Pass the graph as text next to the story, the question as the instruction, and the answers as labels:
The same pattern covers multi-hop questions, agent and web-browsing steps (which link, tool, or action
comes next), and NLI (entailment, neutral, contradiction).
Reranking
Serving a Jev-style decision API
Decision engines such as Jev take a state (text or JSON) and a set of typed questions, and return a
probability for every option of every question, with no generated text. GLiClass answers the same requests
directly: each question is one GLiClass pass in which the state is the text, the question's instructions
are the prompt, and every option is a label. This is the setup used for the Decision Index results below.
Probabilities are a softmax over the option logits. A JSON state is rendered as key: value lines, with string lists as - item lines.
The server below exposes POST /v1/systemone and GET /v1/models, the request and response shape of
TypeSafe's System One API, so clients written for it (for example the
WorkflowEvals runner) can point at a local GLiClass model.
It needs only gliclass, fastapi, and uvicorn:
The response has one answer per question. This one comes from gliclass-v4-edge (rounded):
Here the edge model picks the rollback but rates the incident as minor and not urgent; check judgment-style
questions such as severity on your own data before relying on them.
- Instructions matter. Put the decision rule or rubric in
instructions and give noul questions explicit true / false descriptions; bare yes / no labels are less reliable.
- Throughput. The server answers questions one at a time. For batch jobs, group questions that share a state with
pipe.prepare_inputs([text] * n, labels_per_question, same_labels=False, prompt=prompts) and run one forward pass.
- Long inputs over
MAX_LENGTH tokens are refused with HTTP 422, never truncated, as the Decision Index rules require.
- Calibration. For calibrated checkpoints
logits are the calibrated logits; uncalibrated_logits holds the raw ones.
- The Decision Index results below come from a kit engine (
gliclass_engine.GLiClassEngine) that applies exactly this mapping, run with python -m decision_index run --engine gliclass_engine:GLiClassEngine --model knowledgator/gliclass-v4-edge.
Reported evaluation results
Columns Edge 0.4B, 9B, and 27B are gliclass-v4-edge,
gliclass-v4-9b, and
gliclass-v4-27b; this card is Edge 0.4B.
Decision Index 0.3
Public part of the Decision Index 0.3 (37 benchmarks in five
areas, 140,178 requests), scored with the kit's own scorers. Skill is chance-corrected (0 = random guessing,
100 = perfect) and coverage-adjusted (unanswered = wrong); the public index weighs the areas 25.8 / 25.8 / 20.0 /
18.3 / 10.0%.
GLiClass models: one pass per question through the Jev-style mapping above, on one RTX PRO 6000
(this model: bf16, max_length=16384, batch size 8). Edge 0.4B, 9B, and 27B take a median of 11.0, 34.0, and 73.7 ms per request. Other models: the per-benchmark public results in the kit's board snapshot, with area scores recomputed using the kit's aggregation, which reproduces each published index
exactly. The main board ranking (the Full score) also includes private tests; this table covers the public
part only.
Every benchmark, as skill (★ = gold benchmark, weight 1.2 inside its area):
Per-benchmark Decision Index results
Knowledge & Reasoning
Language Understanding
Retrieval & Classification
Tools & Automation
Arts & Human Taste
Models up to 1B parameters
Edge 0.4B against the sub-1B entries of the live board (the jev-decision-index Space, data generated 2026-10-15): the
eight highest-scoring ones, plus LiquidAI d1-omni-600M and GLiNER2.5-Decide. Sizes are the board's served
parameters; models over 1B served parameters are excluded even when their name says 0.8B. Board rank is the
position on the public index among the 168 board entries plus Edge 0.4B. Area scores are recomputed from each model's
per-benchmark public results with the kit's aggregation and match every published index.
Per-benchmark Decision Index results, models up to 1B
Knowledge & Reasoning (models up to 1B)
Language Understanding (models up to 1B)
Retrieval & Classification (models up to 1B)
Tools & Automation (models up to 1B)
Arts & Human Taste (models up to 1B)
KGJevBench
Decision tasks from the GLiClass benchmark suite (KGJevBench): policy decisions, instruction following,
knowledge-graph walking, tool calling and routing, judging, and typed Jev-style decisions. GLiClass models were run
with the suite's run_sample_500.sh (up to 500 examples per task, bf16); the 12-relations row uses
eval_kg_reasoning.py --mode stepwise --pad-relations 12. The other columns are the KGJevBench comparison results for
those models on the same tasks and metrics; they were not re-run here. All values ×100; the best value in each row is bold.
Averages are recomputed from the cells shown, so the reference columns can differ by up to 0.3 from averages computed
on unrounded scores.
Several KGJevBench sets are written in the formats GLiClass is trained on (for example triple relevance, task
routing, and tool calling), and tasksource-Jev overlaps the training data; read those rows with that in mind.
Training and intended use
Training had three stages:
- Large-scale supervised training on a mixture that recasts classification, NLI, QA, reranking,
extraction, tool calling, moderation, judging, and reasoning data as decisions over candidate labels,
with instructions, label descriptions where available. Single-label, multi-label, and scoring examples are mixed
in one run with a focal loss.
- Reinforcement learning with a PPO-style objective whose actions are the label decisions. Rewards
are task metrics (F1, accuracy, recall), with a value baseline, a clipped ratio, and optional KL and entropy terms.
- Calibration: with the backbone frozen, a small calibrator reads the text and label representations and logit statistics and predicts a per-pair temperature and bias, fitted by negative log-likelihood on held-out decision data.
Use this model for zero-shot and instruction-following classification, scoring, reranking, natural language
inference, knowledge graph and multi-step reasoning, guardrails, policy moderation, routing, and LLM-output
judging. It returns label probabilities and does not generate text.
Limitations
- Label wording, instructions, domain, input length, and thresholds affect predictions.
- Knowledge-heavy and multi-step reasoning tasks are the main gap to the larger models: multi-step arithmetic (GSM8K), hard science and exam questions (GPQA, HLE, MMLU-Pro, MedMCQA), logic puzzles, and long agent-trace judging remain weak spots.
- Results are strongest in English; quality on other languages is lower.
- Calibrated scores are fitted on held-out data and can drift on domains far from training.
- Treat outputs used for safety, moderation, legal, or medical decisions as signals for review, not final verdicts.
Citation