Model reference · open weights
Yi-Coder is an open-weight language model from 01-ai. Yi-Coder-1.5B-Chat (BF16) weighs 3.0 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the 01-ai/Yi-Coder-9B-Chat model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | 01-ai |
|---|---|
| Released | 2024-08-21 |
| Parameters | 8.8B |
| VRAM | 3.0 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 5 | 1 | 40K | 11.6 GB |
| RTX 4060 Ti 16 GB | 7 | 1 | 59K | 15.4 GB |
| RTX 3090 24 GB | 12 | 3 | 98K | 23.4 GB |
| RTX 4090 24 GB | 12 | 3 | 98K | 23.4 GB |
| RTX 5090 32 GB | 17 | 4 | all 128K | 31.0 GB |
| L40S 48 GB | 25 | 6 | all 128K | 44.0 GB |
| A100 80 GB | 46 | 11 | all 128K | 78.2 GB |
| H100 80 GB | 44 | 11 | all 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 54 | 13 | all 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 62 | 15 | all 128K | 107 GB |
| H200 141 GB | 81 | 20 | all 128K | 138 GB |
| B200 180 GB | 105 | 26 | all 128K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 11 | 2 | 95K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 16 | 4 | all 128K | 15.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 5.1 GB | 10.0 GB |
| 5 | 11.6 GB | 35.7 GB |
| 8 | 16.4 GB | 55.1 GB |
| 16 | 29.3 GB | 107 GB |
| 32 | 55.1 GB | 210 GB |
| 64 | 107 GB | 416 GB |
One card, with vLLM's small-card settings.
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| Yi-Coder-9B-Chat ↗ | 8.8B | BF16 | 17.7 GB | 2× RTX 3060 12 GB |
| Yi-Coder-1.5B-Chat (above) ↗ | 1.5B | BF16 | 3.0 GB | RTX 3060 12 GB |
From the model card
Yi-Coder is a series of open-source code language models that delivers state-of-the-art coding performance with fewer than 10 billion parameters.
Key features:
'java', 'markdown', 'python', 'php', 'javascript', 'c++', 'c#', 'c', 'typescript', 'html', 'go', 'java_server_pages', 'dart', 'objective-c', 'kotlin', 'tex', 'swift', 'ruby', 'sql', 'rust', 'css', 'yaml', 'matlab', 'lua', 'json', 'shell', 'visual_basic', 'scala', 'rmarkdown', 'pascal', 'fortran', 'haskell', 'assembly', 'perl', 'julia', 'cmake', 'groovy', 'ocaml', 'powershell', 'elixir', 'clojure', 'makefile', 'coffeescript', 'erlang', 'lisp', 'toml', 'batchfile', 'cobol', 'dockerfile', 'r', 'prolog', 'verilog'
For model details and benchmarks, see Yi-Coder blog and Yi-Coder README.
| Name | Type | Length | Download |
|---|---|---|---|
| Yi-Coder-9B-Chat | Chat | 128K | 🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel |
| Yi-Coder-1.5B-Chat | Chat | 128K | 🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel |
| Yi-Coder-9B | Base | 128K | 🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel |
| Yi-Coder-1.5B | Base | 128K | 🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel |
As illustrated in the figure below, Yi-Coder-9B-Chat achieved an impressive 23% pass rate in LiveCodeBench, making it the only model with under 10B parameters to surpass 20%. It also outperforms DeepSeekCoder-33B-Ins at 22.3%, CodeGeex4-9B-all at 17.8%, CodeLLama-34B-Ins at 13.3%, and CodeQwen1.5-7B-Chat at 12%.
You can use transformers to run inference with Yi-Coder models (both chat and base versions) as follows:
from transformers import AutoTokenizer, AutoModelForCausalLM
device = "cuda" # the device to load the model onto
model_path = "01-ai/Yi-Coder-9B-Chat"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto").eval()
prompt = "Write a quick sort algorithm."
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=1024,
eos_token_id=tokenizer.eos_token_id
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
For getting up and running with Yi-Coder series models quickly, see Yi-Coder README.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.