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) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# 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/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Voyager466920/Raptor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Voyager466920/Raptor", "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 "Voyager466920/Raptor" \ --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": "Voyager466920/Raptor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - 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 contains the English instruction-tuned checkpoint. It was initialized from the Raptor step-35,000 pretrained checkpoint and supervised fine-tuned for one epoch on a curated SmolTalk mixture. The retained checkpoint is SFT step 7,500, selected by validation loss.
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 vocabulary
- 1.027B total parameters, about 404M active per token
Fine-tuning
- Base checkpoint: pretraining step 35,000
- Training examples: 511,721
- Validation examples: 2,000
- SFT epochs: 1
- Best checkpoint: step 7,500
- Best validation loss: 1.0597
- Best validation perplexity: 2.8855
- Training format: assistant-only loss over
### User:and### Assistant:conversations
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",
)
messages = [{"role": "user", "content": "What is the capital of France?"}]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
output = model.generate(
inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.7,
top_p=0.9,
)
print(tokenizer.decode(output[0, inputs.shape[1]:], skip_special_tokens=True))
Limitations
- This is an experimental 1B-scale model and may fail simple reasoning or arithmetic tasks.
- Multi-turn memory and role consistency are unreliable.
- Responses may become verbose, repetitive, inaccurate, biased, or unsafe.
- The model is English-focused. The tokenizer has poor Korean coverage and maps many Korean words to the unknown token.
- The architecture currently 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
- 380
Model tree for Voyager466920/Raptor
Unable to build the model tree, the base model loops to the model itself. Learn more.