Views
No views yet
| Model | Size | Humaneval | Humaneval+ | MBPP | MBPP+ | BigCodeBench(Full) | BigCodeBench(Hard) | MATH | GSM8k |
|---|---|---|---|---|---|---|---|---|---|
| Qwen2.5-Coder | 1.5B | 43.9 | 36.6 | 69.2 | 58.6 | 34.6 | 9.5 | 30.9 | 65.8 |
| CodeGemma | 2B | 31.1 | 16.5 | 51.1 | 43.1 | 23.9 | 7.4 | - | - |
| CodeLlama | 7B | 33.5 | 26.2 | 55.3 | 46.8 | 28.7 | 5.4 | 12.1 | 31.2 |
| Qwen2.5-Coder | 7B | 46.3 | 37.8 | 66.2 | 53.1 | 38.4 | 12.2 | 46.6 | 83.9 |
| OpenCoder | 8B | 66.5 | 63.4 | 79.9 | 70.4 | 40.5 | 9.5 | - | - |
| Yi-Coder | 9B | 53.7 | 46.3 | 48.4 | 40.7 | 42.9 | 14.2 | - | - |
| StarCoder2 | 15B | 46.3 | 37.8 | 66.2 | 53.1 | 38.4 | 12.2 | 10.3 | 23.4 |
| DeepSeek-Coder-V2-Lite | 16B | 40.9 | 34.1 | 71.9 | 59.4 | 30.6 | 8.1 | 39.0 | 67.1 |
| KwaiCoder-DS-V2-Lite | 16B | 75.0 | 68.9 | 81.2 | 67.7 | 49.4 | 18.2 | 40.48 | 81.5 |
| CodeLlama | 34B | 51.8 | 43.9 | 69.3 | 56.3 | 45.3 | 16.2 | 21.2 | 58.2 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3model_id = "Kwaipilot/KwaiCoder-DS-V2-Lite-Base"
4tokenizer = AutoTokenizer.from_pretrained(model_id,trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16,trust_remote_code=True)
6text = "#write a quick sort algorithm"
7inputs = tokenizer(text, return_tensors="pt").to(model.device)
8outputs = model.generate(**inputs, max_new_tokens=80)
9print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3model_id = "Kwaipilot/KwaiCoder-DS-V2-Lite-Base"
4tokenizer = AutoTokenizer.from_pretrained(model_id,trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16,trust_remote_code=True)
6text = """<|fim▁begin|>def find_longest_substring(s):
7 seen = {}
8 max_length = 0
9 start = 0
10<|fim▁hole|>
11 if char in seen and seen[char] >= start:
12 start = seen[char] + 1
13 seen[char] = end
14 max_length = max(max_length, end - start + 1)
15 return max_length<|fim▁end|>"""
16inputs = tokenizer(text, return_tensors="pt").to(model.device)
17outputs = model.generate(**inputs, max_new_tokens=80)
18print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])1@misc{kwaicoder,
2 title = {KwaiCoder: Code mathematical abilities comprehensive improvement.},
3 author = {Kwaipilot team},
4 year = {2024},
5}