Views
No views yet

| Model Name | Length | Download | Notes |
|---|---|---|---|
| Seed-Coder-8B-Base | 32K | 🤗 Model | Pretrained on our model-centric code data. |
| Seed-Coder-8B-Instruct | 32K | 🤗 Model | Instruction-tuned for alignment with user intent. |
| 👉 Seed-Coder-8B-Reasoning | 64K | 🤗 Model | RL trained to boost reasoning capabilities. |
| Seed-Coder-8B-Reasoning-bf16 | 64K | 🤗 Model | RL trained to boost reasoning capabilities. |
transformers and accelerate:pip install -U transformers acceleratepipeline API:1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "ByteDance-Seed/Seed-Coder-8B-Reasoning"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
8
9messages = [
10 {"role": "user", "content": "Write a quick sort algorithm."},
11]
12
13input_ids = tokenizer.apply_chat_template(
14 messages,
15 tokenize=True,
16 return_tensors="pt",
17 add_generation_prompt=True,
18).to(model.device)
19
20outputs = model.generate(input_ids, max_new_tokens=16384)
21response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)
22print(response)
