A 1.7B reasoning model with ternary weights (−1, 0, +1) that runs entirely in your browser: 355 MB, no server, works offline, 20.7 tokens/s on an iPhone 11.
Try it in your browser · Article (English) · Article (français) · Source code (engine and page) · Technical details
Triolet 1.7B is LiquidAI/LFM3-1.7B distilled into ternary weights at LISN (Université Paris-Saclay). It keeps most of its teacher's quality at about a tenth of its size, and scores higher than the larger Ternary-Bonsai-2-2B on all ten benchmarks we ran (on two of them, by less than one standard error), and far above Ternary-Bonsai-1.7B and BitNet b1.58 2B.
Same protocol for every model: EvalScope + vLLM, thinking on, temperature 0.6, top-p 0.95, up to 32,768 generated tokens, final answer graded. Standard errors in parentheses.
| Benchmark | Triolet 1.7B | Ternary-Bonsai-2-2B | Ternary-Bonsai-1.7B | BitNet b1.58 2B ² | LFM3-1.7B (BF16) |
|---|---|---|---|---|---|
| IFEval | 92.1 (1.2) | 87.4 | 73.0 | 53.0 | 94.6 |
| IFBench | 55.7 (3.0) | 48.2 | 19.1 | 12.4 | 68.4 |
| Multi-IF (turn 1, strict) | 88.1 (0.5) | 82.8 | 64.6 | n/a | 91.7 |
| GSM8K | 90.1 (0.8) | 81.7 | 65.3 | 70.4 | 93.5 |
| MATH-500 | 83.6 (1.7) | 78.4 | 51.6 | 42.6 | 97.0 |
| MMLU-Redux | 70.3 (0.6) | 67.9 | 53.7 | 46.1 | 79.8 |
| MuSR | 59.7 (1.8) | 59.0 | 47.8 | 37.8 | 61.2 |
| GPQA Diamond | 38.9 (3.5) | 36.9 | 30.3 | 23.2 | 61.1 |
| LiveCodeBench v6 | 27.4 (3.4) | 18.3 | 9.1 | 3.4 | 54.9 |
| Mean of the nine | 67.3 | 62.3 | 46.1 | 36.2² | 78.0 |
| HumanEval+ ¹ | 89.0 (2.4) | 51.8 | 44.5 | 34.1 | 91.5 |
¹ Scored with the same script for all models and kept out of the mean: our audit found fragments of 7 HumanEval+ reference solutions in training prompts. Browser engine check: on 304 GSM8K, MATH-500 and IFEval questions put to both, the int8 browser engine solves as many as the BF16 reference (265 each; −5.5 / +6.3 / +2.1 points, none significant). Contamination audit, second-seed run and browser-engine fidelity are in TECHNICAL.md.
² BitNet b1.58 2B was run with llama.cpp at its native 4,096-token context without thinking; Multi-IF dialogues do not fit, so its mean covers eight benchmarks. Ternary-Bonsai-1.7B was capped at 30,720 generated tokens (32,768-token context). Chart sizes are the authors' distributed files (Q2_0 for Bonsai, i2_s for BitNet); accuracy is the BF16 reference checkpoint for Triolet.
| File | Size | Use |
|---|---|---|
model.safetensors |
3.46 GB | Dense BF16, Transformers / vLLM |
engine/Triolet-1.7B-QW35.bin + engine/tokenizer-lfm3-80k.bin |
354.5 MB + 3.9 MB | C/WebAssembly browser engine, int8 activations (guide) |
GGUF/ |
0.86–3.47 GB | llama.cpp: BF16, Q2_0 and PTQ1_0 (guide) |
MLX/ |
0.92 GB | Apple MLX (guide) |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Zual/Triolet-1.7B"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16)
messages = [{"role": "user", "content": "What is a triangle? Answer in one sentence."}]
inputs = tokenizer.apply_chat_template(messages, return_dict=True, return_tensors="pt",
add_generation_prompt=True, enable_thinking=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(output[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
vllm serve Zual/Triolet-1.7B --trust-remote-code --dtype bfloat16 # vLLM ≥ 0.34
For reasoning tasks, set enable_thinking=True and allow a few thousand new tokens.
Quantization-aware distillation in four stages. Three adaptation stages on 2,048-token sequences (short teacher answers to about 1.3 million public prompts, web text, then a short on-policy stage) are followed by the main one: the ternary student learns to match LFM3-1.7B's next-token distribution over its complete long reasoning traces, with simulated int8 activations, on 900,000 prompts (code, maths, science, instructions, long documents; training splits only), 18.4 billion tokens, 16 H100 GPUs on the Jean Zay supercomputer (IDRIS, GENCI). Each projection is stored as trits with one FP16 scale per 128 weights, behind a block Hadamard rotation; the tied embedding is ternary too.
This work was granted access to the HPC resources of IDRIS under the allocation 2026-A0201017402 made by GENCI. Luc Pommeret's PhD is funded by SCIAM under a CIFRE agreement (ANRT).
Weights under the LFM Open License v1.0 inherited from LFM3-1.7B: open weights, not an open-source license; commercial use is limited to entities under USD 10 million in annual revenue. LFM3-1.7B was created by Liquid AI, Inc.; the ternary training, vocabulary pruning and release formats are modifications by LISN, described in NOTICE.
@misc{pommeret2026triolet,
title = {Triolet 1.7B: a ternary language model that runs in the browser},
author = {Pommeret, Luc},
year = {2026},
organization = {LISN, Universit{\'e} Paris-Saclay},
howpublished = {\url{https://huggingface.co/Zual/Triolet-1.7B}}
}
model.safetensors 3.5 GBMLX/model.safetensors 917 MBengine/Triolet-1.7B-QW35.bin 355 MBengine/tokenizer-lfm3-80k.bin 4 MBLiquidAI/LFM3-1.7B