Downloads · 30 days
17
20% of all-time downloads
aoiandroid/LFM2.5-2.6B-GPTQ-hybrid-b-g32x
LFM2.5-2.6B-GPTQ-hybrid-b-g32x is a text generation model from aoiandroid. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Weight-only quantization of LiquidAI/LFM2.5-2.6B: 5394 MB → 2158 MB (2.50×).
Downloads · 30 days
17
20% of all-time downloads
All-time downloads
85
Public
Parameters
1.8B
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
How the weights are stored.
U81.4B · 75%
From the Hugging Face model README
Weight-only quantization of LiquidAI/LFM2.5-2.6B:
5394 MB → 2158 MB (2.50×).
This is the Japanese-leaning variant — the best Japanese fidelity of the whole sweep.
For a balanced EN/JA build 16 MB smaller, see
aoiandroid/LFM2.5-2.6B-GPTQ-hybrid-b-g32;
the two differ only in group size on the conv and down projections.
AutoModelForCausalLM.from_pretrained will not load this repo. Weights use the
forge-weightonly-v1 format — integer codes packed into a uint8 stream at exactly
bits bits per weight, with per-layer widths in quant_config.json. Use the loader
shipped in this repo:
from quant_loader import load_quantized # needs qlinear.py, same repo
model, tok = load_quantized("aoiandroid/LFM2.5-2.6B-GPTQ-hybrid-b-g32x")
msgs = [{"role": "user", "content": "量子化とは何ですか。"}]
enc = tok.apply_chat_template(msgs, add_generation_prompt=True,
return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**enc, max_new_tokens=256)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))
Requires transformers >= 5.2 (for Lfm2ForCausalLM), torch, safetensors.
Weights stay packed in VRAM and are dequantized to BF16 inside forward(), so this
saves memory and disk, not compute.
LFM2 is a hybrid stack: 30 blocks, 22 short-convolution and 8 full-attention, each with
a SwiGLU feed-forward — 166 quantized nn.Linear layers.
| Layer group | Params | Precision | Layers |
|---|---|---|---|
self_attn.{q,k,v,out}_proj | 83.9 M | INT8 / group 128 | 32 |
conv.{in,out}_proj | 369.1 M | INT6 / group 64 | 44 |
feed_forward.w1, w3 | 1 321.7 M | INT4 / group 32 | 60 |
feed_forward.w2 | 660.9 M | INT5 / group 64 | 30 |
embed_tokens (tied with lm_head) | 262.1 M | BF16 (unquantized) | — |
Effective 5.37 bits/weight over the 2 434.8 M quantized parameters. The tied
embedding stays BF16: it is an nn.Embedding shared with lm_head, and 524 MB of this
repo is that one tensor.
Paired against the BF16 baseline on identical token windows — 48 × 1024 English
(wikitext-2 test) and 25 × 1024 Japanese. KL is mean KL(baseline ‖ variant) over the
baseline's top-64 tokens; top-1 is argmax agreement with the baseline.
| MB | EN top-1 | EN KL | JA top-1 | JA KL | |
|---|---|---|---|---|---|
this model (g32x) | 2158 | 89.67 % | 0.0462 | 87.15 % | 0.0591 |
balanced sibling (g32) | 2142 | 89.38 % | 0.0460 | 86.67 % | 0.0604 |
| INT8/g128 RTN (reference) | 2998 | 96.64 % | 0.0041 | 96.32 % | 0.0042 |
| uniform INT4/g64 RTN | 1894 | 77.27 % | 0.2286 | 70.96 % | 0.3278 |
The extra 16 MB buys −2 % Japanese KL and +0.5 pp Japanese top-1 over the balanced build, with English essentially tied.
70 396 tokens, 37.2 % Japanese — wikitext-2 validation plus a Japanese sentence corpus, disjoint from both evaluation sets. The language mix mattered more than the token count: a 12.6 %-Japanese calibration set three times larger produced worse Japanese fidelity. If your deployment is Japanese-first, calibrate on Japanese.
Three standard methods were implemented and measured on this checkpoint, and none is in this recipe:
lm_head blocks the
fused residual-stream form.Finer groups bought 19 %, rotation 8 %, per-channel scaling nothing — the residual error on LFM2.5 is broadly distributed quantization noise, not activation outliers.
LFM2.5's chat template ends its generation prompt with a literal <think>. In
multiple-choice scoring, a bare "Answer:" completion therefore never reaches a letter
and scores at chance (16.7 % MMLU for the BF16 model). Close the block with
</think> before the answer cue.
Per LFM Open License §4(b): all nn.Linear weights outside the embedding were replaced
with packed integer codes and per-group scales/zero-points as tabulated above;
model.safetensors is regenerated and quant_config.json is added. config.json,
generation_config.json, tokenizer.json, tokenizer_config.json and
chat_template.jinja are unmodified copies from the base model. No weights were
fine-tuned; no training data was used beyond the calibration text described above.
LFM Open License v1.0, inherited from the base model — including its Commercial Use limitation (§5). Redistribution of this derivative carries the same terms.