01-ai · text

Yi-Coder-9B-Chat

01-ai/Yi-Coder-9B-Chat

Yi-Coder-9B-Chat at Q4_K_M is exactly 5,328,957,984 bytes (4.96 GiB / 5.33 GB) — an effective 4.828 bits per weight, not the nominal 4. Its KV cache at 32K is 3.00 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
8.8B
Architecture
llama
48 layers
Context
131,072
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S1.88 GiB2,014,573,3441.825MaziyarPanahi
IQ1_M2.03 GiB2,181,640,9921.977MaziyarPanahi
IQ2_XS2.52 GiB2,708,009,7602.454MaziyarPanahi
IQ2_M2.89 GiB3,098,112,8322.807bartowski
Q2_K3.12 GiB3,354,325,7923.039MaziyarPanahi
Q2_K3.12 GiB3,354,325,8243.039bartowski
Q2_K_L3.36 GiB3,610,325,8243.271bartowski
IQ3_XS3.46 GiB3,717,935,9043.369MaziyarPanahi
IQ3_XS3.46 GiB3,717,935,9363.369bartowski
Q3_K_S3.63 GiB3,899,208,4803.533MaziyarPanahi
Q3_K_S3.63 GiB3,899,208,5123.533bartowski
IQ3_M3.78 GiB4,055,462,7203.675bartowski
Q3_K_M4.03 GiB4,324,406,0483.918MaziyarPanahi
Q3_K_M4.03 GiB4,324,406,0803.918435bartowski
Q3_K_L4.37 GiB4,690,752,2884.250MaziyarPanahi
Q3_K_L4.37 GiB4,690,752,3204.250bartowski
IQ4_XS4.46 GiB4,785,009,4404.335MaziyarPanahi
IQ4_XS4.46 GiB4,785,009,4724.335435bartowski
Q4_04.71 GiB5,053,903,6804.579435bartowski
Q4_K_S4.72 GiB5,071,860,5124.595MaziyarPanahi
Q4_K_S4.72 GiB5,071,860,5444.595bartowski
Q4_K_M4.96 GiB5,328,957,9844.828435lmstudio-community
Q4_K_M4.96 GiB5,328,958,2404.828MaziyarPanahi
Q4_K_M4.96 GiB5,328,958,2724.828435bartowski
Q4_K_L5.14 GiB5,523,518,2725.005bartowski
Q5_K_S5.69 GiB6,107,853,6005.534MaziyarPanahi
Q5_K_S5.69 GiB6,107,853,6325.534bartowski
Q5_K_M5.83 GiB6,258,258,7205.670MaziyarPanahi
Q5_K_M5.83 GiB6,258,258,7525.670435bartowski
Q5_K_L5.98 GiB6,420,050,7525.817bartowski
Q6_K6.75 GiB7,245,640,2246.565lmstudio-community
Q6_K6.75 GiB7,245,640,5126.565435bartowski
Q6_K_L6.87 GiB7,372,616,5126.680bartowski
Q8_08.74 GiB9,383,916,0648.502lmstudio-community
Q8_08.74 GiB9,383,916,3528.502435bartowski
F1616.45 GiB17,661,112,86416.002435bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.38 GiB0.38 GiB48 / 0 / 0
8,1920.75 GiB0.75 GiB48 / 0 / 0
16,3841.50 GiB1.50 GiB48 / 0 / 0
32,7683.00 GiB3.00 GiB48 / 0 / 0
65,5366.00 GiB6.00 GiB48 / 0 / 0
131,07212.00 GiB12.00 GiB48 / 0 / 0

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.63 GiB. The real file is 4.96 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
48
Attention heads
32
KV heads
4
Head dim
128
Hidden size
4096
Vocab
64,000
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Yi-Coder-9B-Chat need?
Q4_K_M is exactly 5,328,957,984 bytes (4.96 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Yi-Coder-9B-Chat's KV cache?
3.00 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.
Which quantization of Yi-Coder-9B-Chat 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.