Instructions to use ByteDance-Seed/Seed-Coder-8B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance-Seed/Seed-Coder-8B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ByteDance-Seed/Seed-Coder-8B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ByteDance-Seed/Seed-Coder-8B-Base") model = AutoModelForCausalLM.from_pretrained("ByteDance-Seed/Seed-Coder-8B-Base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ByteDance-Seed/Seed-Coder-8B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ByteDance-Seed/Seed-Coder-8B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ByteDance-Seed/Seed-Coder-8B-Base
- SGLang
How to use ByteDance-Seed/Seed-Coder-8B-Base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ByteDance-Seed/Seed-Coder-8B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ByteDance-Seed/Seed-Coder-8B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ByteDance-Seed/Seed-Coder-8B-Base with Docker Model Runner:
docker model run hf.co/ByteDance-Seed/Seed-Coder-8B-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -81,8 +81,7 @@ print(output[0]["generated_text"])
|
|
| 81 |
|
| 82 |
### Fill-in-the-Middle (FIM) Example
|
| 83 |
|
| 84 |
-
Seed-Coder-8B-Base natively supports **Fill-in-the-Middle (FIM)** tasks, where the model is given a prefix and a suffix and asked to predict the missing middle content.
|
| 85 |
-
This allows for code infilling scenarios such as completing a function body or inserting missing logic between two pieces of code.
|
| 86 |
|
| 87 |
A typical usage flow:
|
| 88 |
|
|
@@ -133,13 +132,13 @@ This project is licensed under the MIT License. See the [LICENSE file](https://g
|
|
| 133 |
If you find Seed-Coder helpful, please consider citing our work:
|
| 134 |
|
| 135 |
```
|
| 136 |
-
@article{
|
| 137 |
title={Seed-Coder: Let the Code Model Curate Data for Itself},
|
| 138 |
author={Xxx},
|
| 139 |
year={2025},
|
| 140 |
-
eprint={
|
| 141 |
archivePrefix={arXiv},
|
| 142 |
-
primaryClass={cs.
|
| 143 |
url={https://arxiv.org/abs/xxxx.xxxxx},
|
| 144 |
}
|
| 145 |
-
```
|
|
|
|
| 81 |
|
| 82 |
### Fill-in-the-Middle (FIM) Example
|
| 83 |
|
| 84 |
+
Seed-Coder-8B-Base natively supports **Fill-in-the-Middle (FIM)** tasks, where the model is given a prefix and a suffix and asked to predict the missing middle content. This allows for code infilling scenarios such as completing a function body or inserting missing logic between two pieces of code.
|
|
|
|
| 85 |
|
| 86 |
A typical usage flow:
|
| 87 |
|
|
|
|
| 132 |
If you find Seed-Coder helpful, please consider citing our work:
|
| 133 |
|
| 134 |
```
|
| 135 |
+
@article{bytedance2025seedcoder,
|
| 136 |
title={Seed-Coder: Let the Code Model Curate Data for Itself},
|
| 137 |
author={Xxx},
|
| 138 |
year={2025},
|
| 139 |
+
eprint={xxxx.xxxxx},
|
| 140 |
archivePrefix={arXiv},
|
| 141 |
+
primaryClass={cs.AI},
|
| 142 |
url={https://arxiv.org/abs/xxxx.xxxxx},
|
| 143 |
}
|
| 144 |
+
``` -->
|