Nxcode-CQ-7B-orpo is a Moolithic Preferece Optimizatio without Referece Model fie-tue of Qwe/CodeQwe1.5-7B o 100k samples of high-quality rakig data. We use a simple template to geerate the solutio for evalplus: Top 1 average score. Top 2 wirate. Here provides a code sippet with  For persoal commuicatio related to this project, please cotact Nha Nguye Va (ha.guye@tq-solutio.com.v).Itroductio
Evalplus
 
EvalPlus 
pass@1 
 
HumaEval 
86.6 
 
HumaEval+ 
83.5 
 
MBPP(v0.2.0) 
82.3 
 
MBPP+(v0.2.0) 
70.4 
"Complete the followig Pytho fuctio:\{prompt}"
 
Models 
HumaEval 
HumaEval+ 
 
GPT-4-Turbo (April 2024) 
90.2 
86.6 
 
GPT-4 (May 2023) 
88.4 
81.17 
 
GPT-4-Turbo (Nov 2023) 
85.4 
79.3 
 
CodeQwe1.5-7B-Chat 
83.5 
78.7 
 
claude-3-opus (Mar 2024) 
82.9 
76.8 
 
DeepSeek-Coder-33B-istruct 
81.1 
75.0 
 
WizardCoder-33B-V1.1 
79.9 
73.2 
 
OpeCodeIterpreter-DS-33B 
79.3 
73.8 
 
speechless-codellama-34B-v2.0 
77.4 
72 
 
GPT-3.5-Turbo (Nov 2023) 
76.8 
70.7 
 
Llama3-70B-istruct 
76.2 
70.7 
Bigcode Leaderboard
Quickstart
apply_chat_template to show you how to load the tokeizer ad model ad how to geerate cotets. You should upgrade the trasformers if you receive a error whe loadig the tokeizerfrom trasformers import AutoModelForCausalLM, AutoTokeizer
device = "cuda" # the device to load the model oto
model = AutoModelForCausalLM.from_pretraied(
    "NTQAI/Nxcode-CQ-7B-orpo",
    torch_dtype="auto",
    device_map="auto"
)
tokeizer = AutoTokeizer.from_pretraied("NTQAI/Nxcode-CQ-7B-orpo")
prompt = """Complete the followig Pytho fuctio:
from typig import List
def has_close_elemets(umbers: List[float], threshold: float) -> bool:
    """ Check if i give list of umbers, are ay two umbers closer to each other tha
    give threshold.
    >>> has_close_elemets([1.0, 2.0, 3.0], 0.5)
    False
    >>> has_close_elemets([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)
    True
    """
"""
messages = [
    {"role": "user", "cotet": prompt}
]
iputs = tokeizer.apply_chat_template(messages, add_geeratio_prompt=True, retur_tesors="pt").to(model.device)
outputs = model.geerate(iputs, max_ew_tokes=512, do_sample=False, top_k=50, top_p=0.95, um_retur_sequeces=1, eos_toke_id=tokeizer.eos_toke_id)
res = tokeizer.decode(outputs[0][le(iputs[0]):], skip_special_tokes=True)
Cotact iformatio
点击空白处退出提示










评论