Views
No views yet
konic-labs/LFM2.5-VL-3B-ffn8192-int4:
the compressed-tensors INT4/INT8 weights are mapped losslessly into MLX
QuantizedLinear layers (no dequantization, no re-quantization), fused at
load time, and driven by a lean custom decode loop.⚠️ Fused checkpoint layout. The weights in this repo use fused names (e.g.w1+w3,q+k+v) and require the loader in the companion code repo — not the stockmlx_vlm.utils.load.
github.com/konic-labs/lfm25-mlx-optimized
— packer/loader (quant_map.py), lean decode loop (fastgen.py), REPL
(chat_lfm2.py), OpenAI-compatible server (serve_lfm2.py), benchmark and
quality gates..auto/log.jsonl).| Metric | Source checkpoint (this repo's base) | This port | Δ |
|---|---|---|---|
| Decode throughput | 12.16 tok/s | 62–68 tok/s | +410–460% |
| Text TTFT | 167 ms | 62 ms | −63% |
| Image TTFT | ~1.25 s | ~0.88 s | −30% |
| Multi-turn TTFT (KV reuse) | ~188 ms | ~64 ms | −66% |
| Prefill | ~200 tok/s | ~600 tok/s | +200% |
| Checkpoint size | 2.79 GB | 1.63 GB | −42% |
| Peak RSS | ~4.8 GB | ~1.9 GB | −60% |
| Component | Bits | Notes |
|---|---|---|
| FFN w1/w3/w2 | INT4 | checkpoint-native; 4-bit is the quality floor — 3-bit deterministically breaks multi-turn tool calling |
| Conv in/out_proj | 4-bit | −185 MB decode bandwidth |
| Tied embeddings / lm_head | 4-bit | the fp16 128k×2048 matmul was the dominant decode cost |
| LM attention (q/k/v/o) | 4-bit | −33 MB decode bandwidth |
| Vision fc2 | INT8 padded | 4304→4352 zero-extended packed words, exact checkpoint values |
| Vision projector | 8-bit | |
patch_embedding | fp16 (kept) | 8-bit there destroys vision |
| Scales / biases | fp16 | checkpoint scales are natively fp16 |
w1+w3, q+k+v; bit-identical math,
−24% RSS), fp16 quantized_matmul outputs, and a lean decode loop:
no greedy logsumexp, argpartition+categorical sampling,
bool-sync EOS checks, last-position-only lm_head in prefill, and
prefix-verified prompt-cache KV reuse.1git clone git@github.com:konic-labs/lfm25-mlx-optimized.git
2cd lfm25-mlx-optimized
3.venv/bin/python chat_lfm2.py --model konic-labs/LFM2.5-VL-3B-ffn8192-int4-MLX-optimized.venv/bin/python serve_lfm2.py --port 8080 --model konic-labs/LFM2.5-VL-3B-ffn8192-int4-MLX-optimized1LFM2.5-VL-3B-ffn8192-int4-MLX-optimized/
2 config.json
3 model.safetensors
4 chat_template.jinja
5 tokenizer.json
6 tokenizer_config.json
7 generation_config.json
8 processor_config.json
9 README.md.auto/ (playbook, run log, ideas, dead ends).