Instructions to use trillionlabs/Gravity-30BA5B-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trillionlabs/Gravity-30BA5B-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trillionlabs/Gravity-30BA5B-RL") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trillionlabs/Gravity-30BA5B-RL") model = AutoModelForCausalLM.from_pretrained("trillionlabs/Gravity-30BA5B-RL", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trillionlabs/Gravity-30BA5B-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trillionlabs/Gravity-30BA5B-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trillionlabs/Gravity-30BA5B-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trillionlabs/Gravity-30BA5B-RL
- SGLang
How to use trillionlabs/Gravity-30BA5B-RL 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 "trillionlabs/Gravity-30BA5B-RL" \ --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": "trillionlabs/Gravity-30BA5B-RL", "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 "trillionlabs/Gravity-30BA5B-RL" \ --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": "trillionlabs/Gravity-30BA5B-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trillionlabs/Gravity-30BA5B-RL with Docker Model Runner:
docker model run hf.co/trillionlabs/Gravity-30BA5B-RL
Gravity 30B-A5B RL
A 30B mixture-of-experts model (5B active, 64 experts top-8, MLA attention) tuned for multi-turn tool use.
Results
BFCL v3, three runs per checkpoint on fresh servers, mean ± standard deviation.
| Live Acc (n=1351) | multi-turn (n=800) | |
|---|---|---|
| SFT base | 69.97 ± 0.99 | 27.05 ± 0.29 |
| this model | 73.11 ± 0.34 | 30.25 ± 0.50 |
LAB-Bench (six non-image subtasks, tools on) shows no measurable change: 48.24 for the base against 49.58 here, against a baseline that spans 6.4 points across its own two runs.
Serving
The 131,072-token window is required — BFCL's long-context problems overflow a shorter one and score zero.
vllm serve trillionlabs/Gravity-30BA5B-RL \
--tensor-parallel-size 8 --max-model-len 131072 --trust-remote-code \
--enable-auto-tool-choice --tool-call-parser cyan_glm \
--tool-parser-plugin <kit>/serve/glm_tool_parser.py --reasoning-parser glm45
Without the reasoning parser the model's <think> block lands in content and answers stop
parsing. Both plugins ship with the evaluation kit.
Reproducing
The harness that produced the table is gravity-bfcl-labbench. One command:
./gravity-bench --model trillionlabs/Gravity-30BA5B-RL
- Downloads last month
- 496