Instructions to use MidTool/Arctic-MidTool-RL-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MidTool/Arctic-MidTool-RL-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MidTool/Arctic-MidTool-RL-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MidTool/Arctic-MidTool-RL-4B") model = AutoModelForCausalLM.from_pretrained("MidTool/Arctic-MidTool-RL-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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MidTool/Arctic-MidTool-RL-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MidTool/Arctic-MidTool-RL-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": "MidTool/Arctic-MidTool-RL-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MidTool/Arctic-MidTool-RL-4B
- SGLang
How to use MidTool/Arctic-MidTool-RL-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 "MidTool/Arctic-MidTool-RL-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": "MidTool/Arctic-MidTool-RL-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 "MidTool/Arctic-MidTool-RL-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": "MidTool/Arctic-MidTool-RL-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MidTool/Arctic-MidTool-RL-4B with Docker Model Runner:
docker model run hf.co/MidTool/Arctic-MidTool-RL-4B
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="MidTool/Arctic-MidTool-RL-4B")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages)# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("MidTool/Arctic-MidTool-RL-4B")
model = AutoModelForCausalLM.from_pretrained("MidTool/Arctic-MidTool-RL-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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
By requesting access you agree to the Apache-2.0 license, and to the terms of the MidTool-Mix dataset this model was trained on (https://huggingface.co/datasets/MidTool/MidTool-Mix/blob/main/LICENSE). The model is provided as is, without warranty of any kind. The authors accept no liability for its outputs or for any use made of it.
Log in or Sign Up to review the conditions and access this model content.
Arctic-MidTool-RL-4B
The final 4B agent from the MidTool recipe: Qwen3-4B-Base → mid-training on MidTool-Mix → tool-use SFT → agentic RL. Start here if you want a model to run, rather than one to train further (Arctic-MidTool-MT-4B is the mid-training checkpoint).
Results
| 4B model | BFCLv3 Overall | τ²-Bench Pass@1 | MCP-Universe Score |
|---|---|---|---|
| Qwen3-4B (official) | 24.27 | 11.87 | 16.05 |
| Qwen3-4B-Base + SFT + RL | 39.51 | 13.04 | 17.65 |
| Arctic-MidTool-RL-4B | 54.18 | 19.96 | 19.73 |
Largest gains are on multi-turn BFCL (27.63 vs 19.00) and τ²-Bench retail/airline — the settings that need long-horizon execution and recovery.
Tool calls are emitted in the Qwen3 <tool_call> format; pass your schemas via the tools= argument of the chat template. Thinking mode is disabled in our evaluation setup.
Details
Mid-trained on MidTool-Mix; see the dataset's LICENSE for data terms.
See our paper for the full data, training, and evaluation details.
@article{jiang2026midtool,
title = {MidTool: Mid-training Data Synthesis for Agentic Tool Use},
author = {Jiang, Fengqing and Wang, Yite and Liu, Boyi and Wang, Zhaoyang and
Xu, Canwen and Yao, Zhewei and Poovendran, Radha and He, Yuxiong},
year = {2026}
}
- Downloads last month
- -
# Gated model: Login with a HF token with gated access permission hf auth login