How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf Zual/Triolet-1.7B:BF16
# Run inference directly in the terminal:
llama cli -hf Zual/Triolet-1.7B:BF16
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf Zual/Triolet-1.7B:BF16
# Run inference directly in the terminal:
llama cli -hf Zual/Triolet-1.7B:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf Zual/Triolet-1.7B:BF16
# Run inference directly in the terminal:
./build/bin/llama cli -hf Zual/Triolet-1.7B:BF16
Use Docker
docker model run hf.co/Zual/Triolet-1.7B:BF16
Quick Links

Triolet 1.7B

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, CNRS). 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.

Mean score against deployed weight file size: Triolet 1.7B 67.3% at 354.5 MB, Ternary-Bonsai-2-2B 62.3% at 546.7 MB, Ternary-Bonsai-1.7B 46.1% at 463.3 MB, BitNet b1.58 2B 36.2% (8 benchmarks) at 1,187.8 MB, LFM3-1.7B BF16 78.0% at 3,457.6 MB.

Results

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.

Files

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)

Quick start

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.

Frugal by design

  • To run: one 355 MB download, about 500 MB of memory in the browser, no server. It runs on a laptop or a phone — 20.7 tokens/s on an iPhone 11 (2019) — and keeps working offline.
  • To train: 572 H100 GPU-hours for the final recipe (89 to generate the teacher's answers, 483 for the ternary distillation on 16 GPUs for about 30 hours); about 1,440 including preliminary experiments and evaluations. That is at most 0.4 MWh for the GPUs (700 W each), roughly 20 kg CO2e on the French grid, or 1,100–1,700 USD at public cloud prices. Pre-training of the base model by Liquid AI is not included.

How it was made

Quantization-aware distillation: the ternary student learns to match LFM3-1.7B's next-token distribution over its complete long reasoning traces, with simulated int8 activations. 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.

Limitations

  • On long coding problems the reasoning can run out of budget (47% unfinished on LiveCodeBench, versus 26% for Ternary-Bonsai-2-2B); on MATH-500 it finishes more often (8% versus 18%).
  • Like any small model it can state false facts; the browser demo can search Wikipedia to check.
  • Long contexts, languages other than French and English, and tool use were not evaluated.

License

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.

Citation

@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, CNRS},
  howpublished = {\url{https://huggingface.co/Zual/Triolet-1.7B}}
}
Downloads last month
-
Safetensors
Model size
2B params
Tensor type
BF16
·
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Zual/Triolet-1.7B

Quantized
(186)
this model

Evaluation results