Text Generation
Transformers
Safetensors
qwen3
tool-calling
bfcl
agentic-rl
progress-reward
online-synthesis
conversational
text-generation-inference
Instructions to use muradil211/ToolWeave_stage3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use muradil211/ToolWeave_stage3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="muradil211/ToolWeave_stage3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("muradil211/ToolWeave_stage3") model = AutoModelForCausalLM.from_pretrained("muradil211/ToolWeave_stage3", 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 muradil211/ToolWeave_stage3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "muradil211/ToolWeave_stage3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "muradil211/ToolWeave_stage3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/muradil211/ToolWeave_stage3
- SGLang
How to use muradil211/ToolWeave_stage3 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 "muradil211/ToolWeave_stage3" \ --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": "muradil211/ToolWeave_stage3", "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 "muradil211/ToolWeave_stage3" \ --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": "muradil211/ToolWeave_stage3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use muradil211/ToolWeave_stage3 with Docker Model Runner:
docker model run hf.co/muradil211/ToolWeave_stage3
Add ToolWeave Stage 3 model card and branding
Browse files- README.md +21 -108
- assets/toolweave-mark.svg +22 -0
README.md
CHANGED
|
@@ -1,126 +1,39 @@
|
|
| 1 |
-
|
| 2 |
-
base_model:
|
| 3 |
-
- Qwen/Qwen3-4B
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 6 |
-
license: apache-2.0
|
| 7 |
-
tags:
|
| 8 |
-
- agent
|
| 9 |
-
- Agentic Learning
|
| 10 |
-
- tool use
|
| 11 |
-
- function-calling
|
| 12 |
-
- multi-turn
|
| 13 |
-
- reinforcement-learning
|
| 14 |
-
- GRPO
|
| 15 |
-
- BFCL
|
| 16 |
-
task_categories:
|
| 17 |
-
- question-answering
|
| 18 |
-
- text-generation
|
| 19 |
-
pipeline_tag: text-generation
|
| 20 |
-
library_name: transformers
|
| 21 |
-
datasets:
|
| 22 |
-
- gorilla-llm/Berkeley-Function-Calling-Leaderboard
|
| 23 |
-
model-index:
|
| 24 |
-
- name: Qwen3-4B-RODS
|
| 25 |
-
results:
|
| 26 |
-
- task:
|
| 27 |
-
type: function-calling
|
| 28 |
-
name: Multi-Turn Tool Use
|
| 29 |
-
dataset:
|
| 30 |
-
name: BFCL V3 Multi-Turn
|
| 31 |
-
type: gorilla-llm/Berkeley-Function-Calling-Leaderboard
|
| 32 |
-
metrics:
|
| 33 |
-
- type: accuracy
|
| 34 |
-
value: 56.00
|
| 35 |
-
name: Overall Accuracy
|
| 36 |
-
---
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
- **Size:** 4 Billion parameters
|
| 50 |
-
- **Key Capability:** Advanced Multi-Turn Function Calling and Agentic Tool-Use
|
| 51 |
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
##
|
| 57 |
-
|
| 58 |
-
| Model | Size | Multi-Turn (Overall) | Base | Miss Func | Miss Param | Long Context |
|
| 59 |
-
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 60 |
-
| Qwen3-4B-Instruct (Base) | 4B | 22.13 | 26.50 | 21.00 | 15.50 | 25.50 |
|
| 61 |
-
| **Qwen3-4B + RODS (ours)** | **4B** | **56.00** | **68.00** | **59.00** | **44.00** | **53.00** |
|
| 62 |
-
| Claude-Sonnet-4-5-20250929 | - | 61.38 | 69.00 | 65.00 | 52.50 | 59.00 |
|
| 63 |
-
| Grok-4-1-fast-reasoning | - | 58.88 | 70.50 | 59.50 | 43.00 | 62.50 |
|
| 64 |
-
| Kimi-K2-Instruct | 1043B | 50.63 | 62.00 | 41.00 | 44.50 | 55.00 |
|
| 65 |
-
| Qwen3-32B | 32B | 47.88 | 56.00 | 52.50 | 40.00 | 43.00 |
|
| 66 |
-
| DeepSeek-V3.2-Exp | 671B | 44.88 | 55.00 | 49.00 | 27.00 | 48.50 |
|
| 67 |
-
| GPT-4o-2024-11-20 | - | 42.50 | 55.50 | 34.50 | 29.00 | 51.00 |
|
| 68 |
-
|
| 69 |
-
-----
|
| 70 |
-
|
| 71 |
-
## Training Data and Framework
|
| 72 |
-
|
| 73 |
-
### RODS Framework
|
| 74 |
-
|
| 75 |
-
RODS is a closed-loop RL-data synthesis framework with three co-evolving modules:
|
| 76 |
-
|
| 77 |
-
1. **Reward-Based Boundary Detection:** Uses GRPO rollout reward variance as a zero-cost probe to identify tasks at the agent's capability boundary, where gradient signal is richest.
|
| 78 |
-
2. **Skill-Aligned Synthesis Pipeline:** A multi-agent pipeline (Planner → Executor → Rewriter → Critic) generates structurally isomorphic variants that preserve API topology and dependency depth while introducing novel narratives and environment states.
|
| 79 |
-
3. **Dynamic Replay Buffer Management:** A dual-control lifecycle with staged injection and multi-layer retirement keeps the training pool anchored at the shifting capability boundary.
|
| 80 |
-
|
| 81 |
-
### Training Details
|
| 82 |
-
|
| 83 |
-
- **Method:** GRPO (Group Relative Policy Optimization)
|
| 84 |
-
- **Rollouts:** K=16 per prompt
|
| 85 |
-
- **Training stages:**
|
| 86 |
-
1. Format training (100 Base samples, format reward)
|
| 87 |
-
2. Base reasoning (100 Base samples, progress reward)
|
| 88 |
-
3. Full expansion (400 samples + dynamic synthesis, progress reward)
|
| 89 |
-
- **Synthesis backbone:** Qwen3-32B via vLLM
|
| 90 |
-
- **Hardware:** 8x A100 (training) + 8x A100 (synthesis)
|
| 91 |
-
- **Active training pool:** ~800 samples (400 seeds + up to 400 generated)
|
| 92 |
-
|
| 93 |
-
### Usage
|
| 94 |
|
| 95 |
```python
|
| 96 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 97 |
|
| 98 |
-
|
| 99 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 100 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 101 |
```
|
| 102 |
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
-----
|
| 106 |
-
|
| 107 |
-
## Related Projects and Citation
|
| 108 |
-
|
| 109 |
-
This work is part of the open-source project **[AWorld, InclusionAI](https://github.com/inclusionAI/AWorld/)**.
|
| 110 |
-
|
| 111 |
-
If you use RODS in your research, please cite:
|
| 112 |
-
|
| 113 |
-
```bibtex
|
| 114 |
-
@article{fang2026rods,
|
| 115 |
-
title={RODS: Reward-Driven Online Data Synthesis for Multi-Turn Tool-Use Agents},
|
| 116 |
-
author={Fang, Ruishan and Lu, Siyuan and Zhuang, Chenyi and Lin, Tao},
|
| 117 |
-
journal={arXiv preprint arXiv:2606.19047},
|
| 118 |
-
year={2026}
|
| 119 |
-
}
|
| 120 |
-
```
|
| 121 |
|
| 122 |
-
##
|
| 123 |
|
| 124 |
-
|
|
|
|
|
|
|
| 125 |
|
| 126 |
-
- `fangruishan@westlake.edu.cn`
|
|
|
|
| 1 |
+
<div align="center">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
<img src="assets/toolweave-mark.svg" alt="ToolWeave mark" width="110">
|
| 4 |
|
| 5 |
+
# ToolWeave Stage 3
|
| 6 |
|
| 7 |
+
**Reference checkpoint for the boundary-guided online-learning stage.**
|
| 8 |
|
| 9 |
+
</div>
|
| 10 |
|
| 11 |
+
## Model summary
|
| 12 |
|
| 13 |
+
This repository stores the Qwen3-4B-RODS reference checkpoint used in the ToolWeave Stage 3 workspace. It is retained here as a Stage 3 reference model while the formal ToolWeave Stage 3 training remains pending.
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
- Reference model: Qwen3-4B-RODS
|
| 16 |
+
- Intended role: Stage 3 reference / starting model
|
| 17 |
+
- ToolWeave Stage 3 status: formal training pending
|
| 18 |
+
- Release status: reference checkpoint only
|
| 19 |
|
| 20 |
+
This repository must not be interpreted as a completed ToolWeave Stage 3 release or as the official RODS implementation. ToolWeave is a separate project that adapts public ideas and infrastructure with project-specific extensions.
|
| 21 |
|
| 22 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
```python
|
| 25 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 26 |
|
| 27 |
+
model_id = "muradil211/ToolWeave_stage3"
|
| 28 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 29 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
| 30 |
```
|
| 31 |
|
| 32 |
+
Tool-use inference requires the model's function schemas and the Qwen3-compatible tool-call format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
## References
|
| 35 |
|
| 36 |
+
- [ToolWeave project](https://github.com/Muradil-mamat-211/ToolWeave)
|
| 37 |
+
- [Upstream RODS model](https://huggingface.co/RuishanFang/Qwen3-4B-RODS)
|
| 38 |
+
- [RODS paper](https://arxiv.org/abs/2606.19047)
|
| 39 |
|
|
|
assets/toolweave-mark.svg
ADDED
|
|