Skip to content

Commit 69c62eb

Browse files
committed
documentation revision
1 parent 3778979 commit 69c62eb

6 files changed

Lines changed: 27 additions & 26 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ flash_attn-2.8.*.whl
161161
tutorial/example_deep_finance/prepare_data/*
162162
tutorial/example_deep_finance/judge/analytical_sufficiency/*
163163
tutorial/example_deep_finance/output_report/*
164+
tutorial/opencode_build_countdown_agent/countdown_dataset
164165
dataset_gsm8k/*
165166

166167
.dockerignore

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Let's begin with the simplest example: a math agent with a tool call. This is a
3737

3838
Let's begin with the simplest AgentJet Swarm example: also a math agent. In this case, you can use any GPU-less laptop to train the model remotely.
3939

40-
1. Start swarm server and begin swarm overwatch: `ajet-swarm start` and `ajet-swarm overwatch`.
40+
1. Start swarm server and begin swarm overwatch: `ajet-swarm start` and `ajet-swarm overwatch`. (Alternative: if you are a fan of docker, use our [prebuilt docker image here](docs/en/ajet-swarm-docker.md) without setting up dependencies)
4141
2. From your laptop (or swarm server localhost), run [this simple script](https://github.com/modelscope/AgentJet/blob/main/tutorial/example_math_swarm/math.py) to begin training:
4242
```python
4343
AJET_SWARM_URL="http://swarm-server-ip:10086" python ./tutorial/example_math_swarm/math.py
@@ -49,12 +49,12 @@ Let's begin with the simplest AgentJet Swarm example: also a math agent. In this
4949

5050
## ✈️ Features
5151

52-
We aim to build a easy-to-learn Agent tuner that unlock more possibilities for agent developers:
52+
We aim to build an easy-to-learn Agent tuner that unlocks more possibilities for agent developers:
5353

5454
- **Easy and Friendly**. AgentJet helps you tune models behind your agent workflows easily, optimizing your agents for top performance with minimal effort.
5555
- **Rich Tutorial Library**. AgentJet provides a rich library of [examples](https://github.com/modelscope/AgentJet/tree/main/tutorial) as tutorials.
56-
- **Swarm Training**. [This unique feature](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_english/) of AgentJet opens many possibilities: deploying distributed & self-healing rollout workers, **non-shared-parameter multi-agent** training, **multi-runtime & multi-task cocktail** training. And just like Tinker, you can use AgentJet Swarm to train **models even on **GPU-less laptop(s)**.
57-
- **Efficient and Scalable**. AgentJet uses [verl] as the default backbone (`--backbone=verl`). However, we also support trinity as alternative backbone, accelerating your tuning process via fully asynchronous RFT.
56+
- **Swarm Training**. [This unique feature](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_english/) of AgentJet opens many possibilities: deploying distributed & self-healing rollout workers, **non-shared-parameter multi-agent** training, **multi-runtime & multi-task cocktail** training. And just like Tinker, you can use AgentJet Swarm to train models even on **GPU-less laptop(s)**.
57+
- **Efficient and Scalable**. AgentJet uses [verl] as the default backbone (`--backbone=verl`). However, we also support trinity as an alternative backbone, accelerating your tuning process via fully asynchronous RFT.
5858
- **Flexible and Fast**. AgentJet supports [multi-agent workflows](https://modelscope.github.io/AgentJet/en/workflow/) and adopts a context merging technique, accelerating training by 1.5x to 10x when the workflow involves multi-turn (or multi-agent) conversations.
5959
- **Reliability and Reproducibility**. Our team keeps track of framework performance across multiple [tasks + major-git-version + training-backbones](https://benchmark.agentjet.top/) (under construction, still gathering data, coming soon).
6060

@@ -129,13 +129,13 @@ The internal system orchestrates several specialized modules to handle the compl
129129
* **Task Runner**: Executes the Agent workflow and calculates rewards.
130130
* **Model Tuner**: Forwards inference requests from the workflow to the LLM engine.
131131
* **Context Tracker**: Monitors LLM calls and automatically merges shared-history timelines to improve training efficiency by **1.5x to 10x**.
132-
* **Swarm Server**: A data interchange center that accept OpenAI-like requests and engine instructions, activated only in AgentJet Swarm mode.
132+
* **Swarm Server**: A data interchange center that accepts OpenAI-like requests and engine instructions, activated only in AgentJet Swarm mode.
133133

134134
#### 3. Swarm Architecture
135135

136-
When enabled swarm training mode, an additional component will be activated:
136+
When swarm training mode is enabled, an additional component will be activated:
137137

138-
* **Swarm Data Interchange Server**: Maintains HTTP service, listen to swarm instructions and openai compatible requests. Establishing high-speed zmq communication channel to coordinate other modules.
138+
* **Swarm Data Interchange Server**: Maintains HTTP service, listens to swarm instructions and OpenAI compatible requests. Establishes a high-speed zmq communication channel to coordinate other modules.
139139

140140
<div align="center">
141141
<img width="400" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/arch.jpg"/>

docs/en/ajet-swarm-docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This guide explains how to launch the **AgentJet Swarm Server** inside a Docker
1010
| Requirement | Detail |
1111
|---|---|
1212
| Docker | With GPU support (`nvidia-container-toolkit`) |
13-
| AgentJet Docker image | `ajet:latest` (built from the AgentJet repository) |
13+
| AgentJet Docker image | `ghcr.io/modelscope/agentjet:main` (built from the AgentJet repository) |
1414
| LLM model weights | Downloaded locally (e.g., `Qwen2.5-7B-Instruct`) |
1515

1616

@@ -26,7 +26,7 @@ docker run --rm -it \
2626
-p 10086:10086 \
2727
--gpus=all \
2828
--shm-size=32GB \
29-
ajet:latest \
29+
ghcr.io/modelscope/agentjet:main \
3030
bash -c "(ajet-swarm overwatch) & (NO_COLOR=1 LOGURU_COLORIZE=NO ajet-swarm start &>/workspace/log/swarm_server.log)"
3131
```
3232

@@ -48,7 +48,7 @@ And when completed, you will see a interface like this, which means the deployme
4848
| `-v /path/to/host/Qwen/Qwen2.5-7B-Instruct:/Qwen/Qwen2.5-7B-Instruct` | **Model mount** — mounts your local model weights directory into the container. The path inside the container must match the `model` field you configure in your training job. |
4949
| `-v ./swarmlog:/workspace/log` | **Log mount** — mounts a local `./swarmlog` directory to persist server logs outside the container. The VERL training log is written here. |
5050
| `-p 10086:10086` | **Port mapping** — exposes port `10086` so that Swarm Clients on other machines can reach the server via `http://<server-ip>:10086`. |
51-
| `ajet:latest` | The AgentJet Docker image. |
51+
| `ghcr.io/modelscope/agentjet:main` | The AgentJet Docker image. |
5252
| `bash -c "..."` | Runs two processes concurrently inside the container (see below). |
5353

5454

@@ -91,7 +91,7 @@ docker run --rm -it \
9191
-p 10086:10086 \
9292
--gpus=all \
9393
--shm-size=32GB \
94-
ajet:latest \
94+
ghcr.io/modelscope/agentjet:main \
9595
bash -c "(ajet-swarm overwatch) & (NO_COLOR=1 LOGURU_COLORIZE=NO ajet-swarm start &>/workspace/log/swarm_server.log)"
9696
```
9797

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<h3>Get Started with Ease</h3>
1818
</div>
1919
<p class="card-desc">
20-
AgentJet simplifies the process of tuning the models that power your agent workflows. It supports nearly all major agent frameworks (e.g. <b>agentscope</b>, <b>langchain</b>), as well as <b>framwork-less</b> agents built from HTTP requests.
20+
AgentJet simplifies the process of tuning the models that power your agent workflows. It supports nearly all major agent frameworks (e.g. <b>agentscope</b>, <b>langchain</b>), as well as <b>framework-less</b> agents built from HTTP requests.
2121
</p>
2222
</a>
2323
<a href="#example-library" class="feature-card">
@@ -47,7 +47,7 @@
4747
</div>
4848
<p class="card-desc">
4949
Built to support advanced <b>multi-agent</b> and <b>multi-turn</b> LLM workflows,
50-
AgentJet intergrates timeline-merging algorithms that
50+
AgentJet integrates timeline-merging algorithms that
5151
automatically analyze and consolidate each agent's LLM timeline,
5252
<b>accelerating</b> training speed 1.5x ~ 10x.
5353
</p>
@@ -58,7 +58,7 @@
5858
<h3>High Resolution Logging</h3>
5959
</div>
6060
<p class="card-desc">
61-
Log <b>token-level</b> rollout details, capturing token IDs, token <b>loss masks</b>, and token <b>log probabilities</b> with <b>web UI display</b>. This Support workflow development, agent diagnostics, and facilitate research on advanced LLM algorithm studies.
61+
Log <b>token-level</b> rollout details, capturing token IDs, token <b>loss masks</b>, and token <b>log probabilities</b> with <b>web UI display</b>. This supports workflow development, agent diagnostics, and facilitates research on advanced LLM algorithm studies.
6262
</p>
6363
</a>
6464
<a href="en/installation/" class="feature-card">
@@ -67,7 +67,7 @@
6767
<h3>Any Training Engine</h3>
6868
</div>
6969
<p class="card-desc">
70-
Support <b>multiple training engines</b> as backbone (<b>VERL</b> and <b>Trinity-RFT</b>). Swarm backbone support will be released soon.
70+
Supports <b>multiple training engines</b> as backbone (<b>VERL</b> and <b>Trinity-RFT</b>). Swarm backbone support will be released soon.
7171
Choose from <b>vLLM</b> and <b>SGLang</b> as you wish. Say goodbye to training engine gaps.
7272
</p>
7373
</a>
@@ -149,7 +149,7 @@ The internal system orchestrates several specialized modules to handle the compl
149149
|--------|-------------|
150150
| **Launcher** | Manages background service processes (Ray, vLLM) and routes the backbone |
151151
| **Task Rollout** | Bridges LLM engines and manages the Gym environment lifecycle |
152-
| **Task Runner** | Executes the AgentScope workflow and calculates rewards |
152+
| **Task Runner** | Executes the agent workflow and calculates rewards |
153153
| **Model Tuner** | Forwards inference requests from the workflow to the LLM engine |
154154
| **Context Tracker** | Monitors LLM calls and automatically merges shared-history timelines (1.5x-10x efficiency boost) |
155155

tutorial/opencode_build_countdown_agent/agent_roll.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
This script connects to the AgentJet Swarm server and trains the countdown agent.
88
99
Usage:
10-
python -m tutorial.countdown_agent.agent_roll
10+
python -m tutorial.opencode_build_countdown_agent.agent_roll
1111
1212
Before running:
1313
1. Start the swarm server: ajet-swarm start
14-
2. Ensure the dataset is generated: python tutorial/countdown_agent/generate_countdown_dataset.py
14+
2. Ensure the dataset is generated: python tutorial/opencode_build_countdown_agent/generate_countdown_dataset.py
1515
3. Update the configuration variables below to match your setup
1616
"""
1717

@@ -32,7 +32,7 @@
3232
# --------- Configurations that take effect locally -------------
3333
LOCAL_GRPO_N = 4 # GRPO group size (number of rollouts per task)
3434
LOCAL_NUM_EPOCH = 100 # Number of training epochs
35-
LOCAL_DATASET_PATH = "./tutorial/countdown_agent/countdown_dataset/train.jsonl"
35+
LOCAL_DATASET_PATH = "./tutorial/opencode_build_countdown_agent/countdown_dataset/train.jsonl"
3636
REMOTE_SWARM_URL = "http://localhost:10086" # Swarm server URL
3737

3838
# --------- Configurations that take effect remotely (on swarm server) -------------

tutorial/opencode_build_countdown_agent/readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Possible solution: 25 * (6 - 2) = 100
2525
## Project Structure
2626

2727
```
28-
tutorial/countdown_agent/
28+
tutorial/opencode_build_countdown_agent/
2929
├── agent_run.py # Intelligent agent execution and reward calculation
3030
├── agent_roll.py # Training loop script
3131
├── generate_countdown_dataset.py # Dataset generation script
@@ -97,10 +97,10 @@ First, generate the training data:
9797

9898
```bash
9999
cd /root/agentjet
100-
python tutorial/countdown_agent/generate_countdown_dataset.py
100+
python tutorial/opencode_build_countdown_agent/generate_countdown_dataset.py
101101
```
102102

103-
This will generate training data in the `tutorial/countdown_agent/countdown_dataset/` directory.
103+
This will generate training data in the `tutorial/opencode_build_countdown_agent/countdown_dataset/` directory.
104104

105105
### Step 2: Start Swarm Server
106106

@@ -124,7 +124,7 @@ Edit the configuration parameters in `agent_roll.py`:
124124
# Local configuration
125125
LOCAL_GRPO_N = 4 # GRPO group size
126126
LOCAL_NUM_EPOCH = 100 # Number of training epochs
127-
LOCAL_DATASET_PATH = "./tutorial/countdown_agent/countdown_dataset/train.jsonl"
127+
LOCAL_DATASET_PATH = "./tutorial/opencode_build_countdown_agent/countdown_dataset/train.jsonl"
128128
REMOTE_SWARM_URL = "http://localhost:10086" # Swarm server URL
129129

130130
# Remote configuration (effective on the Swarm server)
@@ -138,7 +138,7 @@ REMOTE_TRAIN_MODEL = '/mnt/data_cpfs/model_cache/modelscope/hub/Qwen/Qwen/Qwen2.
138138
Run the training script:
139139

140140
```bash
141-
python -m tutorial.countdown_agent.agent_roll
141+
python -m tutorial.opencode_build_countdown_agent.agent_roll
142142
```
143143

144144
## Training Configuration Instructions
@@ -197,7 +197,7 @@ You can run `agent_run.py` separately to test a single problem:
197197

198198
```python
199199
from ajet.schema.task import Task
200-
from tutorial.countdown_agent.agent_run import run_agent_and_compute_reward
200+
from tutorial.opencode_build_countdown_agent.agent_run import run_agent_and_compute_reward
201201

202202
task = Task(
203203
main_query="Target: 100, Numbers: [25, 3, 6, 2, 5, 1]",
@@ -217,7 +217,7 @@ task = Task(
217217
View generated example data:
218218

219219
```bash
220-
cat tutorial/countdown_agent/countdown_dataset/examples.json
220+
cat tutorial/opencode_build_countdown_agent/countdown_dataset/examples.json
221221
```
222222

223223
### 3. Mid-process Debugging

0 commit comments

Comments
 (0)