Text Generation
Transformers
Safetensors
qwen3
trajectory2gym
tool-use
supervised-fine-tuning
conversational
text-generation-inference
Instructions to use mis2/Trajectory2Gym-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mis2/Trajectory2Gym-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mis2/Trajectory2Gym-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mis2/Trajectory2Gym-4B") model = AutoModelForCausalLM.from_pretrained("mis2/Trajectory2Gym-4B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mis2/Trajectory2Gym-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mis2/Trajectory2Gym-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mis2/Trajectory2Gym-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mis2/Trajectory2Gym-4B
- SGLang
How to use mis2/Trajectory2Gym-4B 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 "mis2/Trajectory2Gym-4B" \ --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": "mis2/Trajectory2Gym-4B", "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 "mis2/Trajectory2Gym-4B" \ --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": "mis2/Trajectory2Gym-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mis2/Trajectory2Gym-4B with Docker Model Runner:
docker model run hf.co/mis2/Trajectory2Gym-4B
|
Download README.md from mis2/Trajectory2Gym-4B: direct link, hf CLI and curl.
- Browser
- Download file 2.47 kB
-
https://huggingface.co/mis2/Trajectory2Gym-4B/resolve/main/README.md
- Command line
-
hf download hf://mis2/Trajectory2Gym-4B/README.md
-
curl -L -o README.md https://huggingface.co/mis2/Trajectory2Gym-4B/resolve/main/README.md
2.47 kB
| license: apache-2.0 | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| base_model: Qwen/Qwen3-4B | |
| base_model_relation: finetune | |
| tags: | |
| - trajectory2gym | |
| - tool-use | |
| - supervised-fine-tuning | |
| datasets: | |
| - mis2/Trajectory2gym | |
| # Trajectory2Gym-4B | |
| Full-parameter supervised post-training for decision-grounded tool use. This checkpoint is the paper's corresponding scale, not a support-depth or component-ablation model. | |
| ## Reported evaluation | |
| | Tau1 | Tau2 | BFCL three-group Overall | | |
| |---:|---:|---:| | |
| | 44.22 | 69.17 | 74.85 | | |
| These are recorded paper results, not a fresh benchmark rerun during publication. Tau scores are domain macro averages. Tau1 Airline uses the disclosed seen-task protocol. Tau2 uses the official train/test split, and BFCL Overall equally averages Non-live, Live and Multi-turn groups. | |
| ## Use | |
| Use the included tokenizer and native tool schema format with non-thinking generation. For Qwen3 templates supporting it, pass enable_thinking=False to apply_chat_template. The 30B-A3B Instruct-2507 model retains its own native template; do not inject an 8B-specific prefix. | |
| ~~~python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| repo = 'mis2/Trajectory2Gym-4B' | |
| tokenizer = AutoTokenizer.from_pretrained(repo) | |
| model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype='auto', device_map='auto') | |
| ~~~ | |
| Loading requires hardware memory appropriate to the scale and stored dtype. This release preserves the archived safetensor bytes: float32. No quantization, retraining or numeric conversion was performed for release. | |
| The public candidate corpus is not the exact rendered training view. The 30B-A3B model uses an expanded corpus. Model behavior and benchmark scores depend on the native interfaces, simulator and evaluation settings; this card does not claim cross-protocol equivalence. | |
| ## Integrity and license | |
| Weight files total 17,645,742,616 bytes. The source training-view SHA-256 is ab2e580badcec821f5cd3a8937d41366b75220ea6edcf2e9835d1a3e5a0de8cf. RELEASE_MANIFEST.json provides per-file checksums and archive-byte verification details. Internal source paths, credentials, optimizer states, training arguments and raw logs are excluded. Only non-inference path metadata may be removed from JSON configurations, as recorded in the manifest. | |
| Apache-2.0; the base model's license is retained as LICENSE. Tool execution should use permissioned environments and independent authorization for high-impact actions. | |