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%.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("01-ai/Yi-Coder-9B-Chat", revision="356a1f8d4e4a606d0b879e54191ca809918576b8")
model = AutoModelForCausalLM.from_pretrained("01-ai/Yi-Coder-9B-Chat", revision="356a1f8d4e4a606d0b879e54191ca809918576b8", device_map="auto")