Text Generation
Transformers
Safetensors
English
qwen3
mapf
reinforcement-learning
grpo
conversational
text-generation-inference
Instructions to use LARK-Lab/Trainee2Trainer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LARK-Lab/Trainee2Trainer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LARK-Lab/Trainee2Trainer") 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("LARK-Lab/Trainee2Trainer") model = AutoModelForCausalLM.from_pretrained("LARK-Lab/Trainee2Trainer", 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 LARK-Lab/Trainee2Trainer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LARK-Lab/Trainee2Trainer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LARK-Lab/Trainee2Trainer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LARK-Lab/Trainee2Trainer
- SGLang
How to use LARK-Lab/Trainee2Trainer 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 "LARK-Lab/Trainee2Trainer" \ --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": "LARK-Lab/Trainee2Trainer", "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 "LARK-Lab/Trainee2Trainer" \ --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": "LARK-Lab/Trainee2Trainer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LARK-Lab/Trainee2Trainer with Docker Model Runner:
docker model run hf.co/LARK-Lab/Trainee2Trainer
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,83 +5,12 @@ language:
|
|
| 5 |
library_name: transformers
|
| 6 |
base_model: Qwen/Qwen3-4B
|
| 7 |
tags:
|
| 8 |
-
- multi-agent-path-finding
|
| 9 |
- mapf
|
| 10 |
- reinforcement-learning
|
| 11 |
- grpo
|
| 12 |
-
- self-evolving-curriculum
|
| 13 |
- qwen3
|
| 14 |
pipeline_tag: text-generation
|
| 15 |
---
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
This is the **round-3 checkpoint (`global_step_150`)** of the
|
| 20 |
-
**Trainee-to-Trainer** training pipeline: an LLM-driven self-curriculum
|
| 21 |
-
for multi-agent path finding (MAPF) on top of `Qwen/Qwen3-4B`.
|
| 22 |
-
|
| 23 |
-
After each round of GRPO-based RL, an analyst LLM inspects the per-map-size
|
| 24 |
-
failure breakdown of the *previous* round and re-weights the next-round
|
| 25 |
-
training distribution by editing a single YAML config. The per-round sample
|
| 26 |
-
budget is fixed at 4 000 trajectories, so improvements come purely
|
| 27 |
-
from shifting where capacity is spent — not from more data.
|
| 28 |
-
|
| 29 |
-
## Quick start
|
| 30 |
-
|
| 31 |
-
```python
|
| 32 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 33 |
-
|
| 34 |
-
model_id = "LARK-Lab/Trainee2Trainer-Qwen3-4B"
|
| 35 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 36 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 37 |
-
model_id,
|
| 38 |
-
torch_dtype="bfloat16",
|
| 39 |
-
device_map="auto",
|
| 40 |
-
)
|
| 41 |
-
|
| 42 |
-
prompt = """You are a multi-agent path planning expert. ..."""
|
| 43 |
-
messages = [{"role": "user", "content": prompt}]
|
| 44 |
-
inputs = tokenizer.apply_chat_template(
|
| 45 |
-
messages, return_tensors="pt", add_generation_prompt=True
|
| 46 |
-
).to(model.device)
|
| 47 |
-
out = model.generate(inputs, max_new_tokens=4096, temperature=0.7, top_p=0.8)
|
| 48 |
-
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
|
| 49 |
-
```
|
| 50 |
-
|
| 51 |
-
## Training setup
|
| 52 |
-
|
| 53 |
-
| | |
|
| 54 |
-
|---|---|
|
| 55 |
-
| **Base model** | `Qwen/Qwen3-4B` |
|
| 56 |
-
| **Algorithm** | GRPO with 16 rollouts per sample |
|
| 57 |
-
| **KL coefficient** | 1e-3 (low-variance KL against the reference model) |
|
| 58 |
-
| **Reward** | rule-based: validity (collision-free, in-bounds, no holes) + optimality (shortest path) + format compliance |
|
| 59 |
-
| **Curriculum** | YAML config rewritten by an analyst LLM after each round |
|
| 60 |
-
| **Per-round budget** | 4 000 trajectories |
|
| 61 |
-
| **Total rounds** | 3 (this checkpoint is the round-3 end state) |
|
| 62 |
-
| **Context length** | 16 384 tokens |
|
| 63 |
-
|
| 64 |
-
## Evaluation
|
| 65 |
-
|
| 66 |
-
The benchmark is the held-out MAPF set with 3-10×10 boards and 2-5
|
| 67 |
-
agents. Evaluation parses the model's `Agent N's path` blocks and checks
|
| 68 |
-
illegal moves, collisions, hole collisions, out-of-bounds, goal-reach, and
|
| 69 |
-
cost-vs-ground-truth optimality.
|
| 70 |
-
|
| 71 |
-
Project page (with case-study GIFs and full results):
|
| 72 |
-
→ <https://lark-ai-lab.github.io/trainee-to-trainer.github.io/>
|
| 73 |
-
|
| 74 |
-
## License
|
| 75 |
-
|
| 76 |
-
Apache 2.0, inherited from the base model.
|
| 77 |
-
|
| 78 |
-
## Citation
|
| 79 |
-
|
| 80 |
-
```bibtex
|
| 81 |
-
@misc{trainee2trainer2026,
|
| 82 |
-
title = {Trainee-to-Trainer: Self-Evolving Curriculum for Multi-Agent Path Finding},
|
| 83 |
-
author = {LARK Lab},
|
| 84 |
-
year = {2026},
|
| 85 |
-
url = {https://lark-ai-lab.github.io/trainee-to-trainer.github.io/}
|
| 86 |
-
}
|
| 87 |
-
```
|
|
|
|
| 5 |
library_name: transformers
|
| 6 |
base_model: Qwen/Qwen3-4B
|
| 7 |
tags:
|
|
|
|
| 8 |
- mapf
|
| 9 |
- reinforcement-learning
|
| 10 |
- grpo
|
|
|
|
| 11 |
- qwen3
|
| 12 |
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
| 15 |
+
This is the checkpoint of the
|
| 16 |
+
**Trainee-to-Trainer**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|