Model reference · open weights

Yi-Coder

LLMs 01-ai Text gen 2 builds Open weights 9k dl/mo

Yi-Coder is an open-weight language model from 01-ai. Yi-Coder-9B-Chat (BF16) weighs 17.7 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.

  • Yi-Coder is an open-source code language model developed by 01-ai for text generation tasks.
  • The specific 9B-Chat variant contains 8.8 billion parameters and supports a context length of 131,072 tokens.
  • It is designed to handle 52 major programming languages and is distributed under the Apache 2.0 license.

Summary of the 01-ai/Yi-Coder-9B-Chat model card, 2026-10-01

What it is

Released by01-ai
Released2024-08-21
Parameters8.8B
VRAM17.7 GB for the weights

What it runs on

Memory and cards for Yi-Coder-9B-Chat (BF16)

17.7 GBweights, file size
98 MBcache per 1K tokens
652 MBruntime overhead, at least
131,072 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
———
RTX 3090 24 GB6150K23.4 GB
RTX 4090 24 GB6150K23.4 GB
RTX 5090 32 GB153126K31.0 GB
L40S 48 GB317all 128K44.0 GB
A100 80 GB7418all 128K78.2 GB
H100 80 GB7017all 128K78.1 GB
RTX PRO 6000 Blackwell 96 GB8922all 128K93.8 GB
DGX Spark (GB10) 128 GB unified10626all 128K107 GB
H200 141 GB14436all 128K138 GB
B200 180 GB19147all 128K176 GB
2× RTX 3060 12 GB
tensor parallel
5142K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
143117K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
348all 128K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
348all 128K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
119.1 GB21.5 GB
522.3 GB34.4 GB
824.8 GB44.1 GB
1631.2 GB69.9 GB
3244.1 GB121 GB
6469.9 GB224 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
Yi-Coder-9B-Chat (above) ↗ 8.8BBF16 17.7 GB2× RTX 3060 12 GB
Yi-Coder-1.5B-Chat ↗ 1.5BBF16 3.0 GBRTX 3060 12 GB

From the model card

What 01-ai says about Yi-Coder

Read 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:

  • Excelling in long-context understanding with a maximum context length of 128K tokens.
  • Supporting 52 major programming languages:
  '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.

Models

NameTypeLengthDownload
Yi-Coder-9B-ChatChat128K🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel
Yi-Coder-1.5B-ChatChat128K🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel
Yi-Coder-9BBase128K🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel
Yi-Coder-1.5BBase128K🤗 Hugging Face • 🤖 ModelScope • 🟣 wisemodel

Benchmarks

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%.

Quick Start

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms