Text Generation
Transformers
Safetensors
qwen2
agentic-rl
llm-agent
skill-library
grpo
search-qa
conversational
text-generation-inference
Instructions to use YuyaoGe/SkillForge_Search_7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YuyaoGe/SkillForge_Search_7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YuyaoGe/SkillForge_Search_7B") 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("YuyaoGe/SkillForge_Search_7B") model = AutoModelForCausalLM.from_pretrained("YuyaoGe/SkillForge_Search_7B", 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 YuyaoGe/SkillForge_Search_7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YuyaoGe/SkillForge_Search_7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YuyaoGe/SkillForge_Search_7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YuyaoGe/SkillForge_Search_7B
- SGLang
How to use YuyaoGe/SkillForge_Search_7B 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 "YuyaoGe/SkillForge_Search_7B" \ --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": "YuyaoGe/SkillForge_Search_7B", "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 "YuyaoGe/SkillForge_Search_7B" \ --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": "YuyaoGe/SkillForge_Search_7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use YuyaoGe/SkillForge_Search_7B with Docker Model Runner:
docker model run hf.co/YuyaoGe/SkillForge_Search_7B
Yuyao Ge commited on
Commit Β·
f930e32
1
Parent(s): 7ffbcd7
Add the model card
Browse files
README.md
CHANGED
|
@@ -1,3 +1,145 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 6 |
+
tags:
|
| 7 |
+
- agentic-rl
|
| 8 |
+
- llm-agent
|
| 9 |
+
- skill-library
|
| 10 |
+
- grpo
|
| 11 |
+
- search-qa
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# SkillForge: Co-Evolving Skills and Agents via Dynamic Skill Lifecycles
|
| 15 |
+
|
| 16 |
+
[](https://arxiv.org/abs/2610.09832)
|
| 17 |
+
[](https://arxiv.org/pdf/2610.09832)
|
| 18 |
+
[](https://geyuyao.com/skillforge/)
|
| 19 |
+
[](https://geyuyao.com/skillforge/)
|
| 20 |
+
[](https://huggingface.co/YuyaoGe/SkillForge_Search_7B/blob/main/README.md)
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## Introduction
|
| 25 |
+
|
| 26 |
+
This is the **final SkillForge policy for Search-Augmented QA**: a full fine-tune of
|
| 27 |
+
`Qwen2.5-7B-Instruct` trained with GRPO while its skill library was simultaneously
|
| 28 |
+
forged β retired, stabilized, demoted and mutated β under the fitness-driven
|
| 29 |
+
lifecycle described in the paper.
|
| 30 |
+
|
| 31 |
+
Most memory-augmented agents keep the library **append-only**. A skill that was
|
| 32 |
+
correct at step 20 encodes a procedure the policy has outgrown by step 120, and it is
|
| 33 |
+
still being retrieved into the context. SkillForge instead scores each skill against
|
| 34 |
+
the policy's own rollouts and moves it between four states β `trial`, `active`,
|
| 35 |
+
`stable`, `retired` β so the library and the model co-evolve.
|
| 36 |
+
|
| 37 |
+
On Search-Augmented QA this reaches **48.7%** overall accuracy across 51,713 test
|
| 38 |
+
samples, the best of any method compared, against **46.8%** for SkillRL and **45.2%**
|
| 39 |
+
for ZeroSearch.
|
| 40 |
+
|
| 41 |
+
> **What is in this repository.** The policy weights and tokenizer only. The evolved
|
| 42 |
+
> skill library is *not* shipped here: the agent is the policy **plus** the retrieved
|
| 43 |
+
> skills injected into its context. Skill contents, fitness trajectories and
|
| 44 |
+
> retirement events are documented in SkillFurnace (Appendix C of the paper) and in
|
| 45 |
+
> the paper's case studies.
|
| 46 |
+
|
| 47 |
+
## Results
|
| 48 |
+
|
| 49 |
+
Search-Augmented QA, per dataset (%). \* = in-domain, \*\* = out-of-domain. The
|
| 50 |
+
`Overall` column is the sample-weighted micro-average over the same 51,713-sample
|
| 51 |
+
union for every method.
|
| 52 |
+
|
| 53 |
+
| Method | NQ\* | TriviaQA\*\* | PopQA\*\* | HotpotQA\* | 2Wiki\*\* | MuSiQue\*\* | Bamboogle\*\* | **Overall** |
|
| 54 |
+
|---|---|---|---|---|---|---|---|---|
|
| 55 |
+
| RAG | 27.4 | 58.2 | 17.8 | 25.8 | 23.2 | 9.4 | 16.8 | 29.4 |
|
| 56 |
+
| Search-R1 | 39.3 | 61.0 | 39.7 | 37.0 | 40.1 | 14.6 | 36.8 | 42.9 |
|
| 57 |
+
| ZeroSearch | 43.6 | 61.8 | **51.5** | 34.6 | 35.2 | 18.4 | 27.8 | 45.2 |
|
| 58 |
+
| EvolveR | 43.5 | 63.4 | 44.6 | 38.2 | 42.0 | 15.6 | 54.4 | 45.8 |
|
| 59 |
+
| SkillRL | 45.9 | 63.3 | 45.9 | 43.2 | 40.3 | 20.2 | 73.8 | 46.8 |
|
| 60 |
+
| **SkillForge** | **48.2** | **65.0** | 50.1 | **43.9** | 40.4 | **20.3** | **77.2** | **48.7** |
|
| 61 |
+
|
| 62 |
+
The largest single gains are out-of-domain: **+3.4** on Bamboogle and **+5.9** over
|
| 63 |
+
ZeroSearch on MuSiQue. ZeroSearch keeps PopQA, where it leads by 1.4.
|
| 64 |
+
|
| 65 |
+
### The library this model ended up with
|
| 66 |
+
|
| 67 |
+
| | Seed library | Final library |
|
| 68 |
+
|---|---|---|
|
| 69 |
+
| Total skills | 41 | **85** |
|
| 70 |
+
| General | 10 | β |
|
| 71 |
+
| Task-specific | 20 | β |
|
| 72 |
+
| Common-mistake | 11 | β |
|
| 73 |
+
|
| 74 |
+
The run saturates its skill cap (`S_max = 85`). This environment retires the
|
| 75 |
+
fewest skills of the three (59 events against ALFWorld's 138), and the two categories
|
| 76 |
+
that stand out here β redundant with the policy and contradicting the environment β
|
| 77 |
+
account for almost a quarter of them.
|
| 78 |
+
|
| 79 |
+
## How it was trained
|
| 80 |
+
|
| 81 |
+
1. **Pre-retirement.** The seed library, inherited from the SkillRL release, is scored
|
| 82 |
+
under 400 rollout episodes of the *base* model with skills injected. Anything whose
|
| 83 |
+
proto-fitness falls below `delta_pre = 0.3` is retired before training starts.
|
| 84 |
+
2. **Retirement-aware cold start.** The base model is fine-tuned with cross-entropy on
|
| 85 |
+
the rollouts that survived, with trajectories that leaned on a since-retired skill
|
| 86 |
+
filtered out.
|
| 87 |
+
3. **Skill-policy co-evolution.** GRPO takes over and, every 10 steps, the forging
|
| 88 |
+
cycle reads each skill's runtime fitness and promotes, demotes, retires or mutates
|
| 89 |
+
it. Mutation is LLM-guided (Kimi-K2.5 as teacher); at most 5 mutations and 3
|
| 90 |
+
retirements per cycle; retrieval is top-6 by task-type match.
|
| 91 |
+
|
| 92 |
+
| Hyperparameter | Value |
|
| 93 |
+
|---|---|
|
| 94 |
+
| Base model | `Qwen2.5-7B-Instruct` |
|
| 95 |
+
| Optimizer | GRPO, via `verl` |
|
| 96 |
+
| Learning rate | 1e-6 |
|
| 97 |
+
| Batch size / group size | 16 / 8 |
|
| 98 |
+
| Clip epsilon / KL beta | 0.2 / 0.001 |
|
| 99 |
+
| Training steps | 200 |
|
| 100 |
+
| Sampling temperature (train and eval) | 1.0 |
|
| 101 |
+
| Hardware | 64 x NVIDIA H200 |
|
| 102 |
+
|
| 103 |
+
## Quick Start
|
| 104 |
+
|
| 105 |
+
```python
|
| 106 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 107 |
+
|
| 108 |
+
model_id = "YuyaoGe/SkillForge_Search_7B"
|
| 109 |
+
tok = AutoTokenizer.from_pretrained(model_id)
|
| 110 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
|
| 111 |
+
|
| 112 |
+
# Skills are retrieved (top-6, by task-type match) and injected into the context.
|
| 113 |
+
# The exact prompt template and the action space are in the paper.
|
| 114 |
+
messages = [
|
| 115 |
+
{"role": "system", "content": "<retrieved skills for this task type>"},
|
| 116 |
+
{"role": "user", "content": "<observation>\n\n> "},
|
| 117 |
+
]
|
| 118 |
+
ids = tok.apply_chat_template(messages, add_generation_prompt=True,
|
| 119 |
+
return_tensors="pt").to(model.device)
|
| 120 |
+
out = model.generate(ids, max_new_tokens=256, do_sample=False)
|
| 121 |
+
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
This is a research artifact: a 7B text policy for a text environment. It emits search
|
| 125 |
+
queries and answers in the Search-R1 action format; the retrieval backend is not part
|
| 126 |
+
of this repository.
|
| 127 |
+
|
| 128 |
+
## Citation
|
| 129 |
+
|
| 130 |
+
```bibtex
|
| 131 |
+
@misc{ge2026skillforgecoevolvingskillsagents,
|
| 132 |
+
title={SkillForge: Co-Evolving Skills and Agents via Dynamic Skill Lifecycles},
|
| 133 |
+
author={Yuyao Ge and Yiwei Wang and Yuchen He and Baolong Bi and Lingrui Mei and Jiayu Yao and Lizhe Chen and Shenghua Liu},
|
| 134 |
+
year={2026},
|
| 135 |
+
eprint={2610.09832},
|
| 136 |
+
archivePrefix={arXiv},
|
| 137 |
+
primaryClass={cs.AI},
|
| 138 |
+
url={https://arxiv.org/abs/2610.09832},
|
| 139 |
+
}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## Acknowledgments
|
| 143 |
+
|
| 144 |
+
Training runs on [`verl`](https://github.com/volcengine/verl) for the GRPO loop, with
|
| 145 |
+
seed skill libraries inherited from the SkillRL release.
|