Instructions to use RUC-AIBOX/AEWM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RUC-AIBOX/AEWM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RUC-AIBOX/AEWM") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RUC-AIBOX/AEWM") model = AutoModelForMultimodalLM.from_pretrained("RUC-AIBOX/AEWM", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RUC-AIBOX/AEWM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RUC-AIBOX/AEWM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RUC-AIBOX/AEWM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RUC-AIBOX/AEWM
- SGLang
How to use RUC-AIBOX/AEWM 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 "RUC-AIBOX/AEWM" \ --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": "RUC-AIBOX/AEWM", "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 "RUC-AIBOX/AEWM" \ --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": "RUC-AIBOX/AEWM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RUC-AIBOX/AEWM with Docker Model Runner:
docker model run hf.co/RUC-AIBOX/AEWM
AEWM: Agent-Editing World Model
AEWM is a world model that judges and edits an agent's decisions, rather than predicting tool responses. Built on Qwen3.5-35B-A3B, it combines Action Judge (AJ) and State Revision (SR) to improve long-horizon reasoning and tool use across Search, Terminal, and Software Engineering (SWE). Its inference framework, EditAct, integrates these capabilities into an agent's interaction with the real environment.
Model Overview
| Property | Description |
|---|---|
| Base model | Qwen3.5-35B-A3B |
| Capabilities | Action Judge and State Revision in one checkpoint |
| Domains | Search, Terminal, and Software Engineering |
| Training | Cross-domain mid-training followed by supervised fine-tuning |
| Release format | Full model weights in Hugging Face Safetensors format |
| Inference framework | EditAct |
This checkpoint serves as the world model, alongside a separate agent that proposes reasoning and actions.
Method: Editing Decisions, Not Simulating Observations
Long-horizon agents can suffer from task-state contamination: unsupported assumptions become accepted facts, outdated plans persist, and partial progress is mistaken for completion. Subsequent actions may appear locally reasonable while reinforcing an incorrect understanding of the task.
AEWM addresses this problem by modeling how an agent's reasoning and actions shape task progress. Given the observed history and a candidate decision, it judges the decision's contribution and, when necessary, supplies a revised reasoning-action continuation.
Action Judge
AJ classifies a proposed decision into one of three action types:
- Critical: directly advances the task toward completion.
- Exploratory: gathers relevant information or tests a plausible approach without yet making decisive progress.
- Noisy: is redundant, irrelevant, or misleading in the current task context.
This judgment determines whether to retain the proposal or intervene. At inference time, AJ uses only information available before the candidate action is executed.
State Revision and EditAct
For a noisy decision, SR produces revised reasoning and action from the same observed history. It directly edits the continuation that enters the agent's execution loop, rather than merely adding a critique or asking the agent to try again.
EditAct runs four steps:
- Propose: the agent generates its next reasoning and action.
- Judge: AEWM classifies the proposal using the current task history.
- Edit: retain critical or exploratory decisions; revise noisy ones.
- Execute: run the selected action with real tools, then append the selected continuation and actual feedback to history.
Method overview from the paper: learning Action Judge and State Revision, integrating them into EditAct, and transferring guided behavior back into an agent through AEWM-RFT.
Training
AEWM is trained in two stages. Mid-training uses approximately 52B tokens of cross-domain agent trajectories, AJ supervision, and SR supervision. Supervised fine-tuning uses 120K curated examples: 60K AJ and 60K SR examples, with 40K examples per domain.
AJ supervision labels decisions using trajectory evidence and consistency checks. SR supervision pairs agent proposals with corrected reasoning-action continuations from the same history. Quality filtering checks annotation consistency and revision quality. The resulting checkpoint supports both judgment and revision across different tool interfaces.
AEWM-RFT is a separate use of the method: an agent is fine-tuned on verified EditAct trajectories to internalize useful editing behavior. The model in this repository is AEWM itself, used for online judgment and revision.
Evaluation Highlights
Action Judge Benchmark
The AEWM Action Judge Benchmark contains 3,000 annotated decisions, with 1,000 each from Search, Terminal, and SWE. It evaluates decision classification before execution, reporting accuracy and macro-F1.
AEWM achieves 70.5% overall macro-F1, exceeding the strongest compared baseline, DeepSeek-V4-Pro (59.9%), by 10.6 percentage points. Its macro-F1 scores are 60.9% on Search, 72.1% on Terminal, and 77.8% on SWE. Overall metrics pool all 3,000 decisions.
End-to-End Agent Performance
The paper evaluates EditAct with Qwen3.5-4B, Qwen3.5-9B, and Qwen3.5-35B-A3B on BrowseComp, DeepSearchQA, Terminal-Bench 2.0, SWE-bench Pro, Doc2Repo, and NL2Repo.
| backbone | ReAct | Strongest baseline average | EditAct | Gain over strongest baseline |
|---|---|---|---|---|
| Qwen3.5-4B | 28.5 | 35.1 | 41.8 | +6.7 |
| Qwen3.5-9B | 34.5 | 38.9 | 44.1 | +5.2 |
| Qwen3.5-35B-A3B | 42.2 | 45.6 | 48.8 | +3.2 |
Paper results: mean score (%) across the six benchmarks. The strongest baseline is selected by its six-benchmark average among ReAct, step-level Best@3, and trajectory-level Best@3. Gains are absolute percentage points.
Using the Model
Serve this checkpoint with a backend that supports Qwen3.5 reasoning and native tool calls, then connect it to the EditAct framework. The agent and AEWM use separate OpenAI-compatible endpoints. Set the world-model endpoint as follows, matching WM_MODEL to the name configured by your serving backend:
export WM_MODEL="RUC-AIBOX/AEWM"
export WM_BASE_URL="http://localhost:30001/v1"
export WM_API_KEY="EMPTY"
EMPTY is only for an endpoint without authentication. Configure the agent and tools separately, following the repository's quick start. Use the provided domain-specific AJ/SR prompts and preserve reasoning and tool-call fields; a generic chat prompt is not equivalent to the evaluated workflow.
The framework provides editact_for_search, editact_terminal, and editact_for_swe scaffolds. Search requires search and webpage-reading services; Terminal and SWE require an execution sandbox. The standalone Action Judge evaluator instead classifies recorded decisions without executing tools.
- Downloads last month
- 190

