ZTFlynn/LFM2-700M-Cascadia-ternary3

LiquidAI/LFM2-700M compressed to 474 MB with Cascadia β€” a spline manifold plus per-band lookup tables at 0.60 bytes per weight β€” and executable on CPU by a C runtime whose entire dependency list is libc, libm and libgomp.

Base model LiquidAI/LFM2-700M
Parameters 16 layers, hidden 1536
Checkpoint β†’ package 1.42 GB β†’ 474 MB (3.14x)
Bits per weight 5.09
Tensors compressed 16
Architecture 16 blocks, GQA 24q/8kv, gated short convolutions

Quality

perplexity
LiquidAI/LFM2-700M (bf16) 109.74
This package (ternary-3) 122.67
Result +11.79% perplexity (95% CI [1.1012x, 1.1348x], t = +14.53)

8,176 paired tokens, FineWeb-Edu, 512-token windows. Scoring both models on identical tokens and comparing per token cuts the standard error 5.6x versus two independent means, which is what makes this resolution achievable.

A measured cost. At this size the ternary-3 rate is a real trade: 3.14x compression for 11.8% higher perplexity. Larger models in this family pay far less β€” see the table below.

How compression cost scales with model size

Measured across the family with the same corpus and method:

model parameters perplexity cost
LFM2.5-230M 0.23B +7.7%
LFM2-350M 0.35B +3.5%
LFM2-24B-A2B 24B no detectable cost (< 0.3%)

Redundancy grows faster than the format's error, so larger models compress more nearly losslessly. Below roughly 350M parameters the ternary-3 rate becomes a visible trade rather than a free one.

Usage

Executed by the Cascadia C runtime. This is a compressed package, not a transformers checkpoint.

git clone https://github.com/EntroMorphic/cassie && cd cassie
cmake -S src/c -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j

huggingface-cli download ZTFlynn/LFM2-700M-Cascadia-ternary3 --local-dir ./pkg
./build/cascadia_generate ./pkg 512 --chat "Explain gradient descent."

Sampling is --temp / --top-k / --top-p / --seed; the default is greedy and seed-reproducible. Generation stops at <|im_end|>, so max_new is a ceiling.

Python

from transformers import AutoModelForCausalLM
from cascadia import load_compressed

model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2-700M", dtype="bfloat16")
model, stats = load_compressed(model, "./pkg", model_id="LiquidAI/LFM2-700M")

Sample output

Prompt: "How many eggs are in a baker's dozen?"

A baker's dozen traditionally contains 12 eggs. This is a common unit of measurement in baking and cooking, often used because it's a convenient and easily divisible number. However, it's worth noting that the number of eggs in a dozen can vary slightly depending on the recipe or tradition, but 12 is the most standard.

Greedy, generated to natural completion.

Package contents

file size
weights.bin 473 MB
manifest.json per-tensor geometry and offsets
aux.bin RMSNorm scales, conv kernels, architecture constants
tokenizer.bin vocabulary, merges, Unicode tables

Format specified in docs/package_format.md and machine-verified against every package.

How it works

A B-spline surface is fitted to each weight matrix to capture large-scale structure. Each weight is assigned to one of 32 bands by its spline value, and a k-means codebook is learned per band over the residuals. The top 0.5% of errors are kept exactly as f32. Codebook indices pack in base 3, five trits per byte, since 3⁡ = 243 fits a byte.

Reconstruction is W = spline(j,c) + codebook[band][index], evaluated inside the matvec so no dense weight matrix is ever built. Because the spline carries dynamic range, the residual tables need no per-block scale factors.

Limitations

  • Runs under the Cascadia C runtime rather than transformers directly.
  • The runtime executes ternary-3 packages; other presets convert but are not yet supported by the kernel.
  • Batch-1 CPU inference, suited to edge and batch workloads.
  • Greedy and sampled decoding; no beam search.

Acknowledgements

Deeply inspired by Magneato/deepseek-r1-qwen-7b-lutc, which demonstrated LUT-cascade compression of a 7B model at 5.45 bits per weight. The Guanaco LUT cascade β€” no-scale residuals, variable bit rate, and f32 outlier preservation β€” is the foundation this builds on. Cascadia adds a spline manifold for band selection and a Harmonic Collapse step that removes per-block scale factors entirely. Our thanks to Magneato for publishing both the approach and the weights that made it concrete.

Base model by Liquid AI, used under the LFM Open License.

Citation

@software{cascadia,
  title  = {Cascadia: Spline Manifold LUT Compression for Language Models},
  author = {Josserand-Austin, Tripp},
  year   = {2026},
  url    = {https://github.com/EntroMorphic/cassie}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ZTFlynn/LFM2-700M-Cascadia-ternary3

Quantized
(25)
this model