01-ai / Yi-Coder-9B

huggingface.co
Total runs: 10.9K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: September 23 2024
text-generation

Introduction of Yi-Coder-9B

Model Details of Yi-Coder-9B

🐙 GitHub 👾 Discord 🐤 Twitter 💬 WeChat
📝 Paper 💪 Tech Blog 🙌 FAQ 📗 Learning Hub

Intro

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 .

demo1

Models

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

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

bench1

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 .

Runs of 01-ai Yi-Coder-9B on huggingface.co

10.9K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About Yi-Coder-9B huggingface.co Model

More Yi-Coder-9B license Visit here:

https://choosealicense.com/licenses/apache-2.0

Yi-Coder-9B huggingface.co

Yi-Coder-9B huggingface.co is an AI model on huggingface.co that provides Yi-Coder-9B's model effect (), which can be used instantly with this 01-ai Yi-Coder-9B model. huggingface.co supports a free trial of the Yi-Coder-9B model, and also provides paid use of the Yi-Coder-9B. Support call Yi-Coder-9B model through api, including Node.js, Python, http.

Yi-Coder-9B huggingface.co Url

https://huggingface.co/01-ai/Yi-Coder-9B

01-ai Yi-Coder-9B online free

Yi-Coder-9B huggingface.co is an online trial and call api platform, which integrates Yi-Coder-9B's modeling effects, including api services, and provides a free online trial of Yi-Coder-9B, you can try Yi-Coder-9B online for free by clicking the link below.

01-ai Yi-Coder-9B online free url in huggingface.co:

https://huggingface.co/01-ai/Yi-Coder-9B

Yi-Coder-9B install

Yi-Coder-9B is an open source model from GitHub that offers a free installation service, and any user can find Yi-Coder-9B on GitHub to install. At the same time, huggingface.co provides the effect of Yi-Coder-9B install, users can directly use Yi-Coder-9B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Yi-Coder-9B install url in huggingface.co:

https://huggingface.co/01-ai/Yi-Coder-9B

Url of Yi-Coder-9B

Yi-Coder-9B huggingface.co Url

Provider of Yi-Coder-9B huggingface.co

01-ai
ORGANIZATIONS

Other API from 01-ai

huggingface.co

Total runs: 50.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

The Yi series models are large language models trained from scratch by developers at 01.AI.

Total runs: 25.3K
Run Growth: 11.7K
Growth Rate: 46.20%
Updated:November 11 2024
huggingface.co

Total runs: 18.0K
Run Growth: 611
Growth Rate: 3.39%
Updated:June 26 2024
huggingface.co

Total runs: 13.3K
Run Growth: 1.6K
Growth Rate: 11.98%
Updated:August 27 2024
huggingface.co

The Yi series models are large language models trained from scratch by developers at 01.AI.

Total runs: 13.1K
Run Growth: 210
Growth Rate: 1.60%
Updated:November 11 2024
huggingface.co

Total runs: 12.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 28 2024
huggingface.co

Total runs: 10.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

Total runs: 9.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 29 2024
huggingface.co

The Yi series models are large language models trained from scratch by developers at 01.AI.

Total runs: 7.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 29 2024
huggingface.co

Total runs: 5.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

Total runs: 4.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 29 2024
huggingface.co

The Yi series models are large language models trained from scratch by developers at 01.AI.

Total runs: 4.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 29 2024
huggingface.co

Total runs: 4.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

Total runs: 4.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 28 2024
huggingface.co

Total runs: 3.9K
Run Growth: -1.8K
Growth Rate: -45.88%
Updated:August 27 2024
huggingface.co

Total runs: 113
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

Total runs: 94
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
huggingface.co

Total runs: 64
Run Growth: -46
Growth Rate: -71.88%
Updated:September 04 2024