Instructions to use Voyager466920/Raptor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Voyager466920/Raptor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Voyager466920/Raptor", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Voyager466920/Raptor", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Voyager466920/Raptor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Voyager466920/Raptor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Voyager466920/Raptor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Voyager466920/Raptor
- SGLang
How to use Voyager466920/Raptor 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 "Voyager466920/Raptor" \ --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": "Voyager466920/Raptor", "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 "Voyager466920/Raptor" \ --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": "Voyager466920/Raptor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Voyager466920/Raptor with Docker Model Runner:
docker model run hf.co/Voyager466920/Raptor
Raptor
Raptor is a 1.027B-parameter decoder-only causal language model with approximately 404M active parameters per token. It uses multi-head latent attention and six SwiGLU experts per layer with top-2 routing.
This revision (Raptor v2) is a pretrained base model trained from scratch on 50B tokens with a new tokenizer. It is not instruction-tuned.
Earlier versions remain available as tags:
| Tag | Description |
|---|---|
v1-base |
v1 pretrained base, step 35,000 (18.35B tokens), v1 tokenizer |
v1-sft |
v1 SmolTalk instruction-tuned checkpoint (chat template), v1 tokenizer |
model = AutoModelForCausalLM.from_pretrained("Voyager466920/Raptor", revision="v1-sft", trust_remote_code=True)
What changed from v1
- Tokenizer. The v1 SentencePiece tokenizer mapped newlines, tabs and non-Latin text (e.g. Korean) to
<unk>and collapsed runs of spaces. The v2 tokenizer is a 35,000-token SentencePiece BPE with identity normalization, preserved whitespace (\n,\t, space runs as tokens) and UTF-8 byte fallback, so every input round-trips losslessly and no<unk>is produced. Special-token ids are unchanged (pad 0, unk 1, bos 2, eos 3). - Training tokens. 50.0B tokens instead of 18.35B.
- Architecture and optimizer settings are unchanged.
Architecture
- 18 layers
- hidden size 1,024
- latent attention dimension 256
- 16 attention heads
- six experts per layer, top-2 routing
- expert hidden size 2,816
- context length 2,048
- 35,000-token SentencePiece BPE vocabulary with byte fallback
- 1.027B total parameters, about 404M active per token
Training
- Data: deterministic subset of NVIDIA Nemotron-CC (high-quality web text, plus 25% synthetic diverse-QA shards), 288 training shards
- Tokens: 50.0B (95,368 optimizer steps ร 524,288 tokens)
- Optimizer: AdamW (ฮฒ = 0.9, 0.95; weight decay 0.1; gradient clip 1.0)
- Learning rate: 400 warmup steps, cosine decay from 2e-4 to 2e-5
- Precision: BF16 autocast with FP32 master weights
- Hardware: 2ร NVIDIA H200 (DDP), about 3.1 days
- Final validation loss: 2.516 (perplexity 12.38, measured with the v2 tokenizer; not comparable to v1 values)
Weights are stored in FP32.
Evaluation
lm-evaluation-harness 0.4.9.1, BF16, no chat template, full test sets. Zero-shot except MMLU (5-shot). Each cell shows acc / acc_norm where both exist; standard errors are roughly 1 point (2 for OpenBookQA). All rows were run with the same harness and settings.
| Model | Tokens | ARC-e | ARC-c | HellaSwag | PIQA | WinoGrande | BoolQ | OBQA | SciQ | LAMBADA | MMLU (5) | Avg (9, acc / acc_norm) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Raptor v1 base | 18.4B | 58.9 / 53.5 | 26.3 / 27.7 | 35.8 / 45.0 | 70.1 / 70.0 | 51.5 | 61.0 | 20.0 / 31.6 | 86.4 / 76.7 | 34.0 | 26.9 | 49.3 / 50.1 |
| Raptor v2 base | 50B | 65.7 / 60.9 | 29.1 / 32.1 | 40.1 / 51.4 | 72.4 / 72.6 | 52.5 | 58.0 | 23.4 / 33.8 | 87.3 / 81.4 | 39.1 | 26.9 | 52.0 / 53.5 |
| SmolLM2-360M | ~4T | 70.4 / 68.2 | 36.4 / 38.5 | 43.0 / 56.4 | 71.9 / 71.5 | 59.4 | 62.1 | 24.6 / 38.0 | 90.9 / 86.5 | 53.3 | 25.3 | 56.9 / 59.3 |
| SmolLM2-1.7B | ~11T | 77.9 / 73.4 | 44.4 / 47.1 | 53.4 / 71.4 | 76.7 / 77.6 | 65.9 | 72.5 | 32.0 / 43.8 | 93.1 / 90.9 | 67.6 | 50.2 | 64.8 / 67.8 |
LAMBADA perplexity: Raptor v1 32.8, Raptor v2 21.3, SmolLM2-360M 9.4, SmolLM2-1.7B 4.4. Token counts for the SmolLM2 models are their publicly reported pretraining budgets.
Usage
The architecture and tokenizer use custom code, so loading requires trust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Voyager466920/Raptor"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto",
)
inputs = tokenizer("The capital of France is", return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=64, do_sample=True, temperature=0.8, top_p=0.9)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Limitations
- This is a pretrained base model and does not reliably follow instructions.
- The model is English-focused. Korean and other non-Latin text no longer become
<unk>, but they are encoded byte by byte and were rare in the training data, so quality there is poor. - The training data contained little source code; code generation is weak.
- Multiple-choice knowledge benchmarks such as MMLU are at chance level at this scale and token budget.
- Outputs may be repetitive, inaccurate, biased, or unsafe.
- The architecture recomputes the full prefix during generation and does not implement a KV cache.
License
No model license has been selected yet. Public availability does not grant additional usage rights beyond applicable law.
- Downloads last month
- 33