Skip to content

Commit 4ccc006

Browse files
committed
Merge branch 'main' into dev/shuchang_newjudge
2 parents 87d2184 + fe501a2 commit 4ccc006

File tree

217 files changed

+19390
-2724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+19390
-2724
lines changed

.github/workflows/docker.yaml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,33 @@ env:
1717

1818
jobs:
1919
build-and-push-image:
20-
runs-on: self-hosted
21-
timeout-minutes: 240 # wait up to 4 hours
22-
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
20+
runs-on: ubuntu-latest
2321
permissions:
2422
contents: read
2523
packages: write
26-
attestations: write
27-
id-token: write
24+
2825
steps:
2926
- name: Checkout repository
30-
uses: actions/checkout@v5
31-
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
27+
uses: actions/checkout@v3
28+
3229
- name: Log in to the Container registry
3330
uses: docker/login-action@v2
3431
with:
3532
registry: ${{ env.REGISTRY }}
3633
username: ${{ github.actor }}
3734
password: ${{ secrets.GITHUB_TOKEN }}
38-
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
35+
3936
- name: Extract metadata (tags, labels) for Docker
4037
id: meta
41-
uses: docker/metadata-action@v5
38+
uses: docker/metadata-action@v4
4239
with:
4340
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44-
tags: |
45-
type=match,pattern=\d.\d.\d
46-
type=sha
47-
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
48-
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
49-
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
41+
5042
- name: Build and push Docker image
51-
id: push
5243
uses: docker/build-push-action@v4
5344
with:
5445
context: .
5546
push: true
5647
file: scripts/docker/dockerfile
57-
shm-size: 64g
5848
tags: ${{ steps.meta.outputs.tags }}
5949
labels: ${{ steps.meta.outputs.labels }}
60-
61-
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
62-
- name: Generate artifact attestation
63-
uses: actions/attest-build-provenance@v3
64-
with:
65-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
66-
subject-digest: ${{ steps.push.outputs.digest }}
67-
push-to-registry: true

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,20 @@ 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
167168
benchmark_datasets
168169
modelscope_cache
169170
prompts
171+
swarmexp
172+
swarmlog
173+
werewolves_swarm
174+
.claude
175+
tensorboard_log
176+
tutorial/**/*.json
177+
node_modules
178+
.agents
179+
skills-lock.json
180+
blueprint*

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ repos:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
8+
exclude: ^tutorial/example_deep_finance/
89
- id: check-added-large-files
910
- id: check-ast
1011
- id: check-json

README.md

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AgentJet (Beta)
1+
# AgentJet
22

33
[![Benchmarking](https://img.shields.io/badge/Benchmarking-0078D4?style=for-the-badge&logo=github)](https://benchmark.agentjet.top/)
44
[![Docs](https://img.shields.io/badge/Docs-Read%20the%20Documents-0A7ECC?style=for-the-badge&logo=readthedocs&logoColor=white)](https://modelscope.github.io/AgentJet)
@@ -16,11 +16,19 @@
1616

1717
**AgentJet (AJet)** has fully-distributed **swarm training** capability, which means that you can **deploy `ajet-swarm start` in GPU server(s) and then start training agents in your laptop(s)**! Simply provide your agent workflow, training dataset, and reward function, and AgentJet will be ready to go!
1818

19+
## ✈️ News
20+
21+
- 2026.3.30 LoRA training example is now online! See [tutorial/example_math_lora](tutorial/example_math_lora/) for an example.
22+
- 2026.3.26 Upgrade verl backend to 0.7.1 to support more models and increase training speed! All [benchmark](https://benchmark.agentjet.top/) verified.
23+
- 2026.3.19 Support for latest Qwen3.5 models is [in progress](https://github.com/modelscope/AgentJet/pull/16).
24+
- 2026.3.12 Tuning Original OpenClaw Agent without Editing Any Agent Code. [EN Blog](https://modelscope.github.io/AgentJet/en/example_openclaw/) / [ZH Blog](https://modelscope.github.io/AgentJet/en/example_openclaw.zh/).
25+
- 2026.3.09 Non-shared-parameter Multiagent Training. [EN Blog](https://modelscope.github.io/AgentJet/en/example_train_multi_model/) / [ZH Blog](http://modelscope.github.io/AgentJet/en/example_train_multi_model.zh/).
26+
- 2026.2.20 Introducing AgentJet Swarm. [ZH Blog](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_zh/) / [EN Blog](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_en/).
1927

2028

2129
## ✈️ Fast Introduction
2230

23-
### Classic Mode
31+
### **1 - Classic Mode**
2432

2533
Let's begin with the simplest example: a math agent with a tool call. This is a simple & centralized training example.
2634

@@ -29,32 +37,47 @@ Let's begin with the simplest example: a math agent with a tool call. This is a
2937
```python
3038
ajet --conf ./tutorial/example_math_agent/math_agent.yaml --backbone='verl'
3139
```
40+
3241
<div align="center">
33-
<img width="640" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/classic+swarm+revise.jpg"/>
42+
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/new_classic.png"/>
3443
</div>
3544

36-
### Swarm Mode
45+
### **2 - Swarm Mode**
3746

3847
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.
3948

40-
1. Start swarm server and begin swarm overwatch: `ajet-swarm start` and `ajet-swarm overwatch`.
49+
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)
4150
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:
4251
```python
4352
AJET_SWARM_URL="http://swarm-server-ip:10086" python ./tutorial/example_math_swarm/math.py
4453
```
54+
55+
56+
<!-- <div align="center">
57+
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/new_swarm.png"/>
58+
</div> -->
59+
60+
<!-- <div align="center">
61+
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/swarming.gif"/>
62+
</div> -->
63+
64+
<div align="center">
65+
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/swarming2.gif"/>
66+
</div>
67+
4568
<div align="center">
4669
<img width="600" alt="image" src="https://github.com/user-attachments/assets/41ed1e71-8b18-4c4c-b5e2-833399317337"/>
4770
</div>
4871

4972

5073
## ✈️ Features
5174

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

5477
- **Easy and Friendly**. AgentJet helps you tune models behind your agent workflows easily, optimizing your agents for top performance with minimal effort.
5578
- **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.
79+
- **Swarm Training**. [This unique feature](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_en/) 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)**.
80+
- **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.
5881
- **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.
5982
- **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).
6083

@@ -68,6 +91,11 @@ For advanced researchers, AgentJet also provides high-resolution logging and deb
6891
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/ai-generated-1771873242388.jpg"/>
6992
</div>
7093

94+
<div align="center">
95+
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/beast_logger_zimu.mp4.gif"/>
96+
</div>
97+
98+
7199

72100
---
73101

@@ -102,7 +130,7 @@ Explore our automated benchmarking system [https://benchmark.agentjet.top/](http
102130
AgentJet makes agent fine-tuning straightforward by separating the developer interface from the internal execution logic.
103131

104132
<div align="center">
105-
<img width="480" alt="image" src="https://img.alicdn.com/imgextra/i1/O1CN01xnkGyf1j8szYYxt5U_!!6000000004504-0-tps-2261-1471.jpg"/>
133+
<img width="480" alt="image" src="https://img.alicdn.com/imgextra/i2/O1CN01PdCJym1jqr1jWGMZ4_!!6000000004600-0-tps-2013-870.jpg"/>
106134

107135
</div>
108136

@@ -124,8 +152,17 @@ The internal system orchestrates several specialized modules to handle the compl
124152
* **Task Runner**: Executes the Agent workflow and calculates rewards.
125153
* **Model Tuner**: Forwards inference requests from the workflow to the LLM engine.
126154
* **Context Tracker**: Monitors LLM calls and automatically merges shared-history timelines to improve training efficiency by **1.5x to 10x**.
127-
* **Swarm Server**: A data interchange center that accept OpenAI-like requests and engine instructions, activated only in AgentJet Swarm mode.
155+
* **Swarm Server**: A data interchange center that accepts OpenAI-like requests and engine instructions, activated only in AgentJet Swarm mode.
156+
157+
#### 3. Swarm Architecture
158+
159+
When swarm training mode is enabled, an additional component will be activated:
128160

161+
* **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.
162+
163+
<div align="center">
164+
<img width="400" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/arch.jpg"/>
165+
</div>
129166

130167

131168

@@ -142,7 +179,6 @@ AgentJet is a constantly evolving project. We are planning to add the following
142179

143180
| Category | Feature | Status |
144181
| :--- | :--- | :--- |
145-
| **Examples** | Add LoRA training examples | Todo |
146182
| **Infra** | Optimize configurations for long-context adaptation on smaller GPUs | In Progress |
147183
| **Capability** | Multi-modal training support | Todo |
148184
| **Capability** | MARL Credit assignment | Todo |
@@ -177,10 +213,16 @@ This project is under active development, we need your help to make it shine! <b
177213

178214

179215
<div align="center">
180-
<img width="180" alt="image" src="https://img.alicdn.com/imgextra/i4/O1CN01DJuOtZ1Kgu1UvjaNl_!!6000000001194-2-tps-922-882.png"/>
216+
<img height="180" alt="image" src="https://img.alicdn.com/imgextra/i4/O1CN01DJuOtZ1Kgu1UvjaNl_!!6000000001194-2-tps-922-882.png"/>
181217
<br/>
182218
<span>Join AgentJet DingTalk Group to share your idea</span>
183219
</div>
184220

221+
<br/>
222+
<hr/>
223+
<br/>
185224

186-
225+
<div align="center">
226+
<img height="260" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/star3.png"/>
227+
<br/>
228+
</div>

ajet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ def __getattr__(name):
3434
globals()[name] = value
3535
return value
3636

37-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
37+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")

ajet/backbone/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
"AjetTaskReader",
1414
]
1515
except ImportError:
16-
logger.info("trinity is not available.")
16+
pass
17+
# logger.info("trinity is not available.")

ajet/backbone/main_trinity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def patched_trainer_get_actor(cls, config: Config):
5252
Explorer.get_actor = classmethod(patched_explorer_get_actor)
5353
Trainer.get_actor = classmethod(patched_trainer_get_actor)
5454

55-
if ajet_config.ajet.enable_experimental_interchange_server:
56-
from ajet.tuner_lib.experimental.as_oai_model_server import start_interchange_server
55+
if ajet_config.ajet.enable_interchange_server:
56+
from ajet.tuner_lib.experimental.oai_model_server import start_interchange_server
5757
start_interchange_server(ajet_config)
5858

5959

0 commit comments

Comments
 (0)