Downloads · 30 days
12
21% of all-time downloads
aoiandroid/LFM2.5-2.6B-GPTQ-hybrid-b-g32
LFM2.5-2.6B-GPTQ-hybrid-b-g32 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 → 2142 MB (2.52×), VRAM for weights 5394 MB → ~2.1 GB.
Downloads · 30 days
12
21% of all-time downloads
All-time downloads
56
Public
Parameters
1.8B
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.1 GB · 99%
How the weights are stored.
U81.4B · 76%
From the Hugging Face model README
Weight-only quantization of LiquidAI/LFM2.5-2.6B:
5394 MB → 2142 MB (2.52×), VRAM for weights 5394 MB → ~2.1 GB.
Produced with block-sequential GPTQ, an LFM2-aware mixed-precision recipe, activation ordering, and an EN/JA-balanced calibration set.
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-g32")
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. The FFN is 81 % of the
quantizable weight, so it sets the file size; the 8 attention blocks are 3.4 % of it and
the only operators that mix across the whole sequence, so protecting them is nearly free.
| Layer group | Params | Precision |
|---|---|---|
self_attn.{q,k,v,out}_proj | 83.9 M | INT8 / group 128 |
conv.{in,out}_proj | 369.1 M | INT6 / group 128 |
feed_forward.w1, w3 | 1 321.7 M | INT4 / group 32 |
feed_forward.w2 | 660.9 M | INT5 / group 128 |
embed_tokens (tied with lm_head) | 262.1 M | BF16 (unquantized) |
Effective 5.31 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.
| EN top-1 | EN KL | JA top-1 | JA KL | |
|---|---|---|---|---|
| this model | 89.38 % | 0.0460 | 86.67 % | 0.0604 |
| INT8/g128 RTN (2998 MB, reference) | 96.64 % | 0.0041 | 96.32 % | 0.0042 |
| uniform INT4/g64 RTN (1894 MB) | 77.27 % | 0.2286 | 70.96 % | 0.3278 |
Downstream, 1000 questions each, single-token letter scoring:
| MMLU | agreement | JCommonsenseQA | agreement | |
|---|---|---|---|---|
| BF16 baseline | 61.9 % | — | 78.6 % | — |
| this model | 58.7 % | 90.0 % | 78.7 % | 90.6 % |
Binomial standard error is ~1.5 pp at n = 1000, so differences under ~4 pp are not resolvable; every quantized variant tested sits within 3.5 pp of BF16.
Scoring note: LFM2.5's chat template ends its generation prompt with a literal
<think>. A bare "Answer:" completion therefore never reaches a letter and scores at
chance (16.7 % MMLU for the BF16 model). The numbers above close the block with
</think> before the answer cue.
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 set three times larger produced worse Japanese fidelity.
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.
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.