Text Generation
Transformers
Safetensors
English
raptor
causal-lm
mixture-of-experts
custom-code
conversational
instruction-tuned
custom_code
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
| { | |
| "architectures": [ | |
| "RaptorForCausalLM" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_raptor.RaptorConfig", | |
| "AutoModelForCausalLM": "modeling_raptor.RaptorForCausalLM" | |
| }, | |
| "bos_token_id": 2, | |
| "dim": 1024, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 3, | |
| "expert_hidden_dim": 2816, | |
| "gradient_checkpointing": false, | |
| "hidden_size": 1024, | |
| "latent_dim": 256, | |
| "load_balance_weight": 0.01, | |
| "max_position_embeddings": 2048, | |
| "max_seq_len": 2048, | |
| "model_type": "raptor", | |
| "moe_top_k": 2, | |
| "num_attention_heads": 16, | |
| "num_experts": 6, | |
| "num_heads": 16, | |
| "num_hidden_layers": 18, | |
| "num_layers": 18, | |
| "pad_token_id": 0, | |
| "rope_theta": 10000.0, | |
| "router_z_weight": 0.001, | |
| "transformers_version": "4.57.6", | |
| "vocab_size": 35000 | |
| } | |