LiquidAI · text · mixture of experts

LFM2-8B-A1B

LiquidAI/LFM2-8B-A1B

LFM2-8B-A1B at Q4_K_M is exactly 5,044,779,712 bytes (4.70 GiB / 5.04 GB) — an effective 4.839 bits per weight, not the nominal 4. Its KV cache at 32K is 0.38 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
8.3B
total, not active
Architecture
lfm2moe
24 layers
Context
128,000
native (config.json)
License
other

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ2_M2.47 GiB2,650,602,4322.543bartowski
Q2_K2.75 GiB2,947,627,9682.828bartowski
Q2_K_L2.78 GiB2,980,133,8242.859bartowski
Q2_K2.87 GiB3,079,650,3682.954unsloth
Q2_K_L2.87 GiB3,079,650,3682.954unsloth
IQ3_XXS3.08 GiB3,307,322,3043.172bartowski
IQ3_XS3.22 GiB3,455,400,8963.315bartowski
Q3_K_S3.39 GiB3,644,292,1603.496unsloth
Q3_K_S3.40 GiB3,654,761,4083.506bartowski
IQ3_M3.55 GiB3,815,472,0643.660bartowski
Q3_K_M3.56 GiB3,817,569,2163.662bartowski
Q3_K_L3.69 GiB3,960,241,0883.799bartowski
Q3_K_M3.72 GiB3,997,613,1203.835unsloth
IQ4_XS4.18 GiB4,484,791,2324.302bartowski
Q4_04.41 GiB4,733,893,3124.541LiquidAI
Q4_04.41 GiB4,733,893,6964.541unsloth
IQ4_NL4.41 GiB4,740,185,0244.547bartowski
Q4_K_S4.43 GiB4,752,768,0644.559unsloth
Q4_04.48 GiB4,812,274,6244.616bartowski
Q4_K_S4.56 GiB4,891,179,9684.692bartowski
Q4_K_M4.70 GiB5,044,779,7124.839LiquidAI
Q4_K_M4.70 GiB5,044,780,0964.839unsloth
Q4_K_M4.70 GiB5,051,071,4244.845bartowski
Q4_K_L4.73 GiB5,083,577,2804.876bartowski
Q4_14.89 GiB5,246,647,3605.033unsloth
Q4_14.89 GiB5,249,399,7445.035bartowski
Q5_K_S5.36 GiB5,759,401,0245.525unsloth
Q5_K_S5.37 GiB5,761,760,1925.527bartowski
Q5_K_M5.51 GiB5,919,554,2405.678LiquidAI
Q5_K_M5.51 GiB5,919,554,6245.678unsloth
Q5_K_M5.52 GiB5,921,913,7925.681bartowski
Q5_K_L5.55 GiB5,954,419,6485.712bartowski
Q6_K6.38 GiB6,849,002,1766.570LiquidAI
Q6_K6.38 GiB6,849,002,5606.570unsloth
Q6_K6.38 GiB6,850,526,1446.571bartowski
Q6_K_L6.41 GiB6,883,032,0006.603bartowski
Q8_08.26 GiB8,868,428,4808.507LiquidAI
Q8_08.26 GiB8,868,428,7368.507bartowski
Q8_08.26 GiB8,868,428,8648.507unsloth
F1615.54 GiB16,685,562,56016.006LiquidAI

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.05 GiB0.19 GiB4.00×6 / 0 / 18
8,1920.09 GiB0.38 GiB4.00×6 / 0 / 18
16,3840.19 GiB0.75 GiB4.00×6 / 0 / 18
32,7680.38 GiB1.50 GiB4.00×6 / 0 / 18
65,5360.75 GiB3.00 GiB4.00×6 / 0 / 18
131,0721.50 GiB6.00 GiB4.00×6 / 0 / 18

18 of 24 layers use linear attention, which keeps a fixed-size recurrent state instead of a per-token cache. Those layers do not grow with context at all — treating them as ordinary attention, as a flat formula does, overstates this model's cache by roughly 4.0× at long context.

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 4.37 GiB. The real file is 4.70 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
24
Attention heads
32
KV heads
8
Head dim
64
Hidden size
2048
Vocab
65,536
Sliding window
none
SWA period
MLA
no
Experts
32
Experts per token
4
use_sliding_window

Questions people ask

How much VRAM does LFM2-8B-A1B need?
Q4_K_M is exactly 5,044,779,712 bytes (4.70 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is LFM2-8B-A1B's KV cache?
0.38 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
Is LFM2-8B-A1B a mixture-of-experts model?
Yes — 32 experts, 4 routed per token. Every expert must be resident, but only the routed ones are read per token, which is why its memory requirement and its speed behave very differently.
Which quantization of LFM2-8B-A1B should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.