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 RELEASE_MANIFEST.json from mis2/Trajectory2Gym-4B: direct link, hf CLI and curl.
- Browser
- Download file 4.83 kB
-
https://huggingface.co/mis2/Trajectory2Gym-4B/resolve/main/RELEASE_MANIFEST.json
- Command line
-
hf download hf://mis2/Trajectory2Gym-4B/RELEASE_MANIFEST.json
-
curl -L -o RELEASE_MANIFEST.json https://huggingface.co/mis2/Trajectory2Gym-4B/resolve/main/RELEASE_MANIFEST.json
4.83 kB
| { | |
| "base_model": "Qwen/Qwen3-4B", | |
| "files": [ | |
| { | |
| "bytes": 707, | |
| "path": "added_tokens.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "c0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680", | |
| "source_sha256": "c0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680" | |
| }, | |
| { | |
| "bytes": 4168, | |
| "path": "chat_template.jinja", | |
| "removed_non_inference_keys": [], | |
| "sha256": "a55ee1b1660128b7098723e0abcd92caa0788061051c62d51cbe87d9cf1974d8", | |
| "source_sha256": "a55ee1b1660128b7098723e0abcd92caa0788061051c62d51cbe87d9cf1974d8" | |
| }, | |
| { | |
| "bytes": 1536, | |
| "path": "config.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "798c4b5e70d9cf30cab2afe7371fbe1930b08fa0a770e2089e73b9b22f067d9f", | |
| "source_sha256": "798c4b5e70d9cf30cab2afe7371fbe1930b08fa0a770e2089e73b9b22f067d9f" | |
| }, | |
| { | |
| "bytes": 214, | |
| "path": "generation_config.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "19d9395705449004ddebeeaf62841338a48cc8df85cddb1ca0b2c60396d95c96", | |
| "source_sha256": "19d9395705449004ddebeeaf62841338a48cc8df85cddb1ca0b2c60396d95c96" | |
| }, | |
| { | |
| "bytes": 1671853, | |
| "path": "merges.txt", | |
| "removed_non_inference_keys": [], | |
| "sha256": "8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5", | |
| "source_sha256": "8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5" | |
| }, | |
| { | |
| "bytes": 32914, | |
| "path": "model.safetensors.index.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "1c8a489d4fd7fa90e0ec046bfae867b42e781e95c52cb82dd1eadd279b90f1eb", | |
| "source_sha256": "1c8a489d4fd7fa90e0ec046bfae867b42e781e95c52cb82dd1eadd279b90f1eb" | |
| }, | |
| { | |
| "bytes": 613, | |
| "path": "special_tokens_map.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd", | |
| "source_sha256": "76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd" | |
| }, | |
| { | |
| "bytes": 11422654, | |
| "path": "tokenizer.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4", | |
| "source_sha256": "aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4" | |
| }, | |
| { | |
| "bytes": 5404, | |
| "path": "tokenizer_config.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "443bfa629eb16387a12edbf92a76f6a6f10b2af3b53d87ba1550adfcf45f7fa0", | |
| "source_sha256": "443bfa629eb16387a12edbf92a76f6a6f10b2af3b53d87ba1550adfcf45f7fa0" | |
| }, | |
| { | |
| "bytes": 2776833, | |
| "path": "vocab.json", | |
| "removed_non_inference_keys": [], | |
| "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910", | |
| "source_sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910" | |
| }, | |
| { | |
| "bytes": 4990095032, | |
| "dtypes": { | |
| "F32": 96 | |
| }, | |
| "gcs_crc32c_download_verified": true, | |
| "historical_manifest_sha256_checked": true, | |
| "path": "model-00001-of-00004.safetensors", | |
| "sha256": "00026747e57855a9dd84328774bc16de27fa70e14bb021b6abcf6a99a923e988", | |
| "tensors": 96 | |
| }, | |
| { | |
| "bytes": 4944309096, | |
| "dtypes": { | |
| "F32": 133 | |
| }, | |
| "gcs_crc32c_download_verified": true, | |
| "historical_manifest_sha256_checked": true, | |
| "path": "model-00002-of-00004.safetensors", | |
| "sha256": "147e5929d4b86bc29d8e3cc0956138c714c9cfae6ce0fd227fc6af60758984f8", | |
| "tensors": 133 | |
| }, | |
| { | |
| "bytes": 4996758848, | |
| "dtypes": { | |
| "F32": 137 | |
| }, | |
| "gcs_crc32c_download_verified": true, | |
| "historical_manifest_sha256_checked": true, | |
| "path": "model-00003-of-00004.safetensors", | |
| "sha256": "067675469c17c8e0152372a0adb1bbaeb0d285efe5d3ab729904260e6a1fc011", | |
| "tensors": 137 | |
| }, | |
| { | |
| "bytes": 2714579640, | |
| "dtypes": { | |
| "F32": 33 | |
| }, | |
| "gcs_crc32c_download_verified": true, | |
| "historical_manifest_sha256_checked": true, | |
| "path": "model-00004-of-00004.safetensors", | |
| "sha256": "335d8f0d1dbb0d04d3d43288333ce58753e8b453ac19871e34620d978825a578", | |
| "tensors": 33 | |
| }, | |
| { | |
| "bytes": 11343, | |
| "path": "LICENSE", | |
| "sha256": "832dd9e00a68dd83b3c3fb9f5588dad7dcf337a0db50f7d9483f310cd292e92e" | |
| } | |
| ], | |
| "format": "trajectory2gym_public_checkpoint_release_v1", | |
| "optimizer_states_included": false, | |
| "scale": "4b", | |
| "source_training_view_sha256": "ab2e580badcec821f5cd3a8937d41366b75220ea6edcf2e9835d1a3e5a0de8cf", | |
| "stored_dtype": "float32", | |
| "verification": "GCS generation-pinned download with CRC32C validation; computed SHA-256; original SHA-256 manifest checked where available.", | |
| "weight_bytes": 17645742616, | |
| "weight_conversion": "none" | |
| } | |