Instructions to use ByteDance-Seed/Seed-Coder-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance-Seed/Seed-Coder-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ByteDance-Seed/Seed-Coder-8B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ByteDance-Seed/Seed-Coder-8B-Instruct") model = AutoModelForCausalLM.from_pretrained("ByteDance-Seed/Seed-Coder-8B-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ByteDance-Seed/Seed-Coder-8B-Instruct 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-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ByteDance-Seed/Seed-Coder-8B-Instruct
- SGLang
How to use ByteDance-Seed/Seed-Coder-8B-Instruct 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-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Seed-Coder-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ByteDance-Seed/Seed-Coder-8B-Instruct with Docker Model Runner:
docker model run hf.co/ByteDance-Seed/Seed-Coder-8B-Instruct
Commit History
-
Update README.md
Verified signature1c5af72 -
Update README.md
Verified signaturef157585
-
Update README.md
Verified signature11ec854 -
Delete imgs/seed-coder_intro_performance.jpg
Verified signature6af11fa -
Update README.md
Verified signature7822908 -
Upload seed-coder_intro_performance.png
Verified signature3f30fb1
-
Update README.md
Verified signature0d6d912
-
Update README.md
Verified signature82035b8
-
add metadata (#1)
Verified signature- add metadata (4f329c89820fdf086b3b0e9cc7204e19ced01363) Co-authored-by: Wonseok Lee <nickname100231@users.noreply.huggingface.co>61d6f04
-
Update README.md
Verified signature7b934eb
-
Update README.md
Verified signature1fa5078 -
Update README.md
Verified signature3a40557 -
Update README.md
Verified signature17905a0 -
Update README.md
Verified signature1de13bf -
Update README.md
Verified signature5c3d07f -
Update README.md
Verified signaturee393b40 -
Update README.md
Verified signature40364f1 -
Update README.md
Verified signature37ab176 -
Update README.md
Verified signature1d11c66 -
Update README.md
Verified signature0b3caa4 -
Update README.md
Verified signaturee6e992f -
Update README.md
Verified signaturebac48a4 -
Update README.md
Verified signaturec282dc0 -
Update README.md
Verified signature1eda2d7 -
Update README.md
Verified signature0811814 -
Update README.md
Verified signaturea038fb1 -
Update README.md
Verified signatureac0ef3b -
Update README.md
Verified signature465590d -
Update README.md
Verified signature7104f95 -
Update README.md
Verified signature15d8bdf
-
Update tokenizer_config.json
Verified signature01e01a1 -
Update README.md
Verified signature21e4347 -
Delete imgs/large_model_comparison_split-crop.png
Verified signaturebc9fe77 -
Upload seed-coder_intro_performance.jpg
Verified signature1793207 -
Delete imgs/seed-coder_intro_performance.jpg
Verified signature620c1be -
Update README.md
Verified signaturee77914c
-
Update README.md
Verified signaturea5d129c -
Update README.md
Verified signaturec62d428
-
Update README.md
Verified signature4d9ad64 -
Update README.md
Verified signature9cc504a -
Update README.md
Verified signature23ffcec -
Upload large_model_comparison_split-crop.png
Verified signatureddc0923
-
Update README.md
Verified signaturef80ca53 -
Update README.md
Verified signature14dbba3 -
Delete cruise_cli.yaml
Verified signatured7cbb90 -
Upload seed-coder_intro_performance.jpg
Verified signature8fbce14
-
Update README.md
Verified signatured4e97cc -
Update README.md
Verified signature792d06d -
Update README.md
Verified signature26d94fe -
Upload seed-coder_intro_performance.jpg
Verified signatured8ad005