Upload ./README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model:
|
4 |
+
- ByteDance-Seed/Seed-Coder-8B-Base
|
5 |
+
---
|
6 |
+
### exl2 quant (measurement.json in main branch)
|
7 |
+
---
|
8 |
+
### check revisions for quants
|
9 |
+
---
|
10 |
+
|
11 |
+
|
12 |
+
# Seed-Coder-8B-Instruct
|
13 |
+
|
14 |
+
<div align="left" style="line-height: 1;">
|
15 |
+
<a href="https://bytedance-seed-coder.github.io/" target="_blank" style="margin: 2px;">
|
16 |
+
<img alt="Homepage" src="https://img.shields.io/badge/Seed--Coder-Homepage-a468fe?color=a468fe&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
17 |
+
</a>
|
18 |
+
|
19 |
+
<a href="https://github.com/ByteDance-Seed/Seed-Coder/blob/master/Seed-Coder.pdf" target="_blank" style="margin: 2px;">
|
20 |
+
<img alt="Technical Report" src="https://img.shields.io/badge/(upcoming)-Technical%20Report-brightgreen?logo=arxiv&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
21 |
+
</a>
|
22 |
+
|
23 |
+
<a href="https://huggingface.co/ByteDance-Seed" target="_blank" style="margin: 2px;">
|
24 |
+
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-ByteDance%20Seed-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
25 |
+
</a>
|
26 |
+
|
27 |
+
<a href="https://github.com/ByteDance-Seed/Seed-Coder/blob/master/LICENSE" style="margin: 2px;">
|
28 |
+
<img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?color=f5de53&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
29 |
+
</a>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
|
33 |
+
## Introduction
|
34 |
+
We are thrilled to introduce Seed-Coder, a powerful, transparent, and parameter-efficient family of open-source code models at the 8B scale, featuring base, instruct, and reasoning variants. Seed-Coder contributes to promote the evolution of open code models through the following highlights.
|
35 |
+
|
36 |
+
- **Model-centric:** Seed-Coder predominantly leverages LLMs instead of hand-crafted rules for code data filtering, minimizing manual effort in pretraining data construction.
|
37 |
+
- **Transparent:** We openly share detailed insights into our model-centric data pipeline, including methods for curating GitHub data, commits data, and code-related web data.
|
38 |
+
- **Powerful:** Seed-Coder achieves state-of-the-art performance among open-source models of comparable size across a diverse range of coding tasks.
|
39 |
+
|
40 |
+
<p align="center">
|
41 |
+
<img width="100%" src="imgs/seed-coder_intro_performance.jpg">
|
42 |
+
</p>
|
43 |
+
|
44 |
+
This repo contains the **Seed-Coder-8B-Instruct** model, which has the following features:
|
45 |
+
- Type: Causal language models
|
46 |
+
- Training Stage: Pretraining & Post-training
|
47 |
+
- Data Source: Public datasets, synthetic data
|
48 |
+
- Context Length: 32,768
|
49 |
+
|
50 |
+
|
51 |
+
## Model Downloads
|
52 |
+
| Model Name | Length | Download | Notes |
|
53 |
+
|---------------------------------------------------------|--------|------------------------------------|-----------------------|
|
54 |
+
| Seed-Coder-8B-Base | 32K | π€ [Model](https://huggingface.co/ByteDance-Seed/Seed-Coder-8B-Base) | Pretrained on our model-centric code data. |
|
55 |
+
| π **Seed-Coder-8B-Instruct** | 32K | π€ [Model](https://huggingface.co/ByteDance-Seed/Seed-Coder-8B-Instruct) | Instruction-tuned for alignment with user intent. |
|
56 |
+
| Seed-Coder-8B-Reasoning | 32K | π€ [Model](https://huggingface.co/ByteDance-Seed/Seed-Coder-8B-Reasoning) | RL trained to boost reasoning capabilities. |
|
57 |
+
|
58 |
+
## Requirements
|
59 |
+
You will need to install the latest versions of `transformers` and `accelerate`:
|
60 |
+
|
61 |
+
```bash
|
62 |
+
pip install -U transformers accelerate
|
63 |
+
```
|
64 |
+
|
65 |
+
## Quickstart
|
66 |
+
|
67 |
+
Here is a simple example demonstrating how to load the model and generate code using the Hugging Face `pipeline` API:
|
68 |
+
|
69 |
+
```python
|
70 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
71 |
+
import torch
|
72 |
+
|
73 |
+
model_id = "ByteDance-Seed/Seed-Coder-8B-Instruct"
|
74 |
+
|
75 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
76 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
|
77 |
+
|
78 |
+
messages = [
|
79 |
+
{"role": "user", "content": "Write a quick sort algorithm."},
|
80 |
+
]
|
81 |
+
|
82 |
+
input_ids = tokenizer.apply_chat_template(
|
83 |
+
messages,
|
84 |
+
tokenize=True,
|
85 |
+
return_tensors="pt",
|
86 |
+
add_generation_prompt=True,
|
87 |
+
).to(model.device)
|
88 |
+
|
89 |
+
outputs = model.generate(input_ids, max_new_tokens=512)
|
90 |
+
response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)
|
91 |
+
print(response)
|
92 |
+
|
93 |
+
```
|
94 |
+
|
95 |
+
## Evaluation
|
96 |
+
|
97 |
+
Seed-Coder-8B-Instruct has been evaluated on a wide range of coding tasks, including code generation, code reasoning, code editing, and software engineering, achieving state-of-the-art performance among ~8B open-source models.
|
98 |
+
|
99 |
+
| Model | HumanEval | MBPP | MHPP | BigCodeBench (Full) | BigCodeBench (Hard) | LiveCodeBench (2410 β 2502) |
|
100 |
+
|:-----------------------------:|:---------:|:----:|:----:|:-------------------:|:-------------------:|:-------------------------:|
|
101 |
+
| CodeLlama-7B-Instruct | 40.9 | 54.0 | 6.7 | 21.9 | 3.4 | 3.6 |
|
102 |
+
| DeepSeek-Coder-6.7B-Instruct | 74.4 | 74.9 | 20.0 | 35.5 | 10.1 | 9.6 |
|
103 |
+
| CodeQwen1.5-7B-Chat | 83.5 | 77.7 | 17.6 | 39.6 | 18.9 | 3.0 |
|
104 |
+
| Yi-Coder-9B-Chat | 82.3 | 82.0 | 26.7 | 38.1 | 11.5 | 17.5 |
|
105 |
+
| Llama-3.1-8B-Instruct | 68.3 | 70.1 | 17.1 | 36.6 | 13.5 | 11.5 |
|
106 |
+
| OpenCoder-8B-Instruct | 83.5 | 79.1 | 30.5 | 40.3 | 16.9 | 17.1 |
|
107 |
+
| Qwen2.5-Coder-7B-Instruct | 88.4 | 82.0 | 26.7 | 41.0 | 18.2 | 17.3 |
|
108 |
+
| Qwen3-8B | 84.8 | 77.0 | 32.8 | 51.7 | 23.0 | 23.5 |
|
109 |
+
| Seed-Coder-8B-Instruct | 84.8 | 85.2 | 36.2 | 53.3 | 20.5 | 24.7 |
|
110 |
+
|
111 |
+
|
112 |
+
For detailed benchmark performance, please refer to our [π Technical Report](https://github.com/ByteDance-Seed/Seed-Coder/blob/master/Seed-Coder.pdf).
|
113 |
+
|
114 |
+
## License
|
115 |
+
|
116 |
+
This project is licensed under the MIT License. See the [LICENSE file](https://github.com/ByteDance-Seed/Seed-Coder/blob/master/LICENSE) for details.
|
117 |
+
|
118 |
+
<!-- ## Citation
|
119 |
+
|
120 |
+
If you find our work helpful, feel free to give us a cite.
|
121 |
+
|
122 |
+
```
|
123 |
+
@article{zhang2025seedcoder,
|
124 |
+
title={Seed-Coder: Let the Code Model Curate Data for Itself},
|
125 |
+
author={Xxx},
|
126 |
+
year={2025},
|
127 |
+
eprint={2504.xxxxx},
|
128 |
+
archivePrefix={arXiv},
|
129 |
+
primaryClass={cs.CL},
|
130 |
+
url={https://arxiv.org/abs/xxxx.xxxxx},
|
131 |
+
}
|
132 |
+
``` -->
|