-
Notifications
You must be signed in to change notification settings - Fork 154
[feat] update swe-agent runtime params for long-context DP attention #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,7 +38,7 @@ class ScriptArgs(U.ExecuteTrainConfig): | |||||||||||||||||
| hf_checkpoint: str = "zai-org/GLM-4.7-Flash" | ||||||||||||||||||
| ref_load: str = "/root/GLM-4.7-Flash_torch_dist" | ||||||||||||||||||
| save_dir: str = "/root/GLM-4.7-Flash_agent_v2/" | ||||||||||||||||||
| max_seq_len: int = 16384 | ||||||||||||||||||
| max_seq_len: int = 64000 | ||||||||||||||||||
| prompt_data: str = "/root/swe_train.jsonl" | ||||||||||||||||||
|
|
||||||||||||||||||
| # Agent settings | ||||||||||||||||||
|
|
@@ -107,7 +107,7 @@ def execute(args: ScriptArgs): | |||||||||||||||||
| "--rollout-batch-size 2 " | ||||||||||||||||||
| "--n-samples-per-prompt 4 " | ||||||||||||||||||
| "--rollout-temperature 0.8 " | ||||||||||||||||||
| "--rollout-max-response-len 8192 " | ||||||||||||||||||
| "--rollout-max-response-len 16384 " | ||||||||||||||||||
| f"--max-seq-len {args.max_seq_len} " | ||||||||||||||||||
| "--global-batch-size 8 " | ||||||||||||||||||
| "--balance-data " | ||||||||||||||||||
|
|
@@ -150,13 +150,24 @@ def execute(args: ScriptArgs): | |||||||||||||||||
| ) | ||||||||||||||||||
|
|
||||||||||||||||||
| sglang_args = ( | ||||||||||||||||||
| "--rollout-num-gpus-per-engine 1 " | ||||||||||||||||||
| "--sglang-mem-fraction-static 0.7 " | ||||||||||||||||||
| "--sglang-tool-call-parser glm47 " | ||||||||||||||||||
| "--sglang-reasoning-parser glm45 " | ||||||||||||||||||
| "--use-miles-router " | ||||||||||||||||||
| "--sglang-router-port 31000 " | ||||||||||||||||||
| # TODO: speculative decoding has issue, need to fix later | ||||||||||||||||||
| # Agent tasks can run long (complex CoT + multi-step tool calls); | ||||||||||||||||||
| # default 1800s may not be enough for the hardest instances. | ||||||||||||||||||
| "--miles-router-timeout 3600 " | ||||||||||||||||||
| "--rollout-num-gpus-per-engine 8 " | ||||||||||||||||||
| "--sglang-data-parallel-size 8 " | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SGLang engine implementation specifically looks for the
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||||||||||||||||||
| "--sglang-enable-dp-attention " | ||||||||||||||||||
| "--sglang-speculative-algorithm EAGLE " | ||||||||||||||||||
| "--sglang-speculative-num-steps 2 " | ||||||||||||||||||
| "--sglang-speculative-eagle-topk 1 " | ||||||||||||||||||
| "--sglang-speculative-num-draft-tokens 3 " | ||||||||||||||||||
|
Comment on lines
+164
to
+167
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These speculative decoding parameters are currently active, but the pull request description states they should be commented out for future use. Furthermore, the EAGLE algorithm requires a draft model to be specified (e.g., via
Suggested change
References
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spec decoding by default? |
||||||||||||||||||
| # "--sglang-expert-parallel-size 8 " | ||||||||||||||||||
| # "--sglang-moe-dense-tp-size 1 " | ||||||||||||||||||
| # "--sglang-enable-dp-lm-head " | ||||||||||||||||||
|
Comment on lines
+168
to
+170
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||
| ) | ||||||||||||||||||
|
|
||||||||||||||||||
| agent_args = ( | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
--rollout-num-gpus-per-engineto 8 will set the Tensor Parallel (TP) size to 8 in the SGLang engine (seemiles/backends/sglang_utils/sglang_engine.py:622). Combined with--sglang-data-parallel-size 8, this would require 64 GPUs (TP=8 * DP=8). For an 8-GPU setup intended to use Data Parallel (DP) attention, this should be set to 1 so that each of the 8 replicas uses a single GPU.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here rollout engine = 8 is fine, but we will need EP 8 for MOE right? o.w. the MOE part would be TP 8 instead of EP 8?