Skip to content

restore: bring back deleted examples, scripts, and agent doc - #220

Closed
aoshen02 wants to merge 2 commits into
mainfrom
restore-examples
Closed

restore: bring back deleted examples, scripts, and agent doc#220
aoshen02 wants to merge 2 commits into
mainfrom
restore-examples

Conversation

@aoshen02

@aoshen02 aoshen02 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Restore 9 files that were either deleted by #126 ("trim examples to qwen3 only") or never synced from slime:

Reverted from pre-#126:

  • scripts/low_precision/run-qwen3-4b-fp8.sh
  • scripts/low_precision/run-qwen3-30b-a3b-fp8.sh
  • scripts/run-glm4-9B.sh
  • scripts/run-moonlight-16B-A3B.sh
  • scripts/run-qwen3-4B-base-sft.sh
  • scripts/run-qwen3-32B.sh
  • scripts/run-qwen3.5-35B-A3B-sft.sh

New from slime@44d29ee (never on main):

  • docs/en/get_started/agent.md
  • examples/fully_async/run-qwen2.5-0.5B-fully_async.sh

All sglang engine flags translated to vllm equivalents per §2.4.

Test plan

  • Spot-check restored scripts have correct --vllm-* flags
  • agent.md links and references are valid

🤖 Generated with Claude Code

@aoshen02
aoshen02 force-pushed the restore-examples branch 2 times, most recently from 5ec2e63 to 880235a Compare June 9, 2026 15:23

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive roadmap documentation for Agentic RL training alongside several bash scripts to run various training configurations (such as fully async, low-precision FP8, and SFT) for Qwen, GLM, and Moonlight models. The review feedback highlights several critical issues: incorrect relative source paths in the low-precision scripts, unescaped double quotes in an SSH command that would break remote execution, broken documentation links pointing to non-existent directories, and the repeated use of the unrecognized environment variable PYTHONBUFFERED instead of PYTHONUNBUFFERED=1 across multiple scripts.

echo "HAS_NVLINK: $HAS_NVLINK (detected $NVLINK_COUNT NVLink references)"

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
source "${SCRIPT_DIR}/../scripts/models/qwen3-30B-A3B.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The source path is incorrect. It resolves to scripts/scripts/models/qwen3-30B-A3B.sh because SCRIPT_DIR is scripts/low_precision. It should be ../models/qwen3-30B-A3B.sh instead of ../scripts/models/qwen3-30B-A3B.sh.

Suggested change
source "${SCRIPT_DIR}/../scripts/models/qwen3-30B-A3B.sh"
source "${SCRIPT_DIR}/../models/qwen3-30B-A3B.sh"

echo "HAS_NVLINK: $HAS_NVLINK (detected $NVLINK_COUNT NVLink references)"

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
source "${SCRIPT_DIR}/../scripts/models/qwen3-4B.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The source path is incorrect. It resolves to scripts/scripts/models/qwen3-4B.sh because SCRIPT_DIR is scripts/low_precision. It should be ../models/qwen3-4B.sh instead of ../scripts/models/qwen3-4B.sh.

Suggested change
source "${SCRIPT_DIR}/../scripts/models/qwen3-4B.sh"
source "${SCRIPT_DIR}/../models/qwen3-4B.sh"

Comment thread scripts/run-qwen3.5-35B-A3B-sft.sh Outdated
Comment on lines +132 to +133
ssh root@"${WORKER_IP}" \
"pkill -9 -f "vllm serve" ; ray stop --force ; pkill -9 python ; ray start --address=${MASTER_ADDR}:6379 --num-gpus 8 --node-ip-address ${WORKER_IP} --disable-usage-stats --dashboard-host=0.0.0.0 --dashboard-port=8265" &

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The inner double quotes around vllm serve are not escaped, which causes them to be stripped by the local shell before executing the ssh command. This results in executing pkill -9 -f vllm serve on the remote worker, which is incorrect. Escape the inner double quotes to preserve them.

Suggested change
ssh root@"${WORKER_IP}" \
"pkill -9 -f "vllm serve" ; ray stop --force ; pkill -9 python ; ray start --address=${MASTER_ADDR}:6379 --num-gpus 8 --node-ip-address ${WORKER_IP} --disable-usage-stats --dashboard-host=0.0.0.0 --dashboard-port=8265" &
ssh root@"${WORKER_IP}" \
"pkill -9 -f \"vllm serve\" ; ray stop --force ; pkill -9 python ; ray start --address=${MASTER_ADDR}:6379 --num-gpus 8 --node-ip-address ${WORKER_IP} --disable-usage-stats --dashboard-host=0.0.0.0 --dashboard-port=8265" &

Comment thread docs/en/get_started/agent.md Outdated
Comment on lines +13 to +15
| Return multiple training samples from one prompt, such as subagent, multi-agent, or context-compaction segments | [fan-out return from custom generate](customization.md#returning-multiple-training-samples-for-one-prompt), [`examples/multi_agent`](../_examples_synced/multi_agent/README.md) |
| Avoid blocking training on long-tail agent rollouts | [`examples/fully_async`](../_examples_synced/fully_async/README.md) |
| Study a full end-to-end agent example with sandboxing, real code edits, and test-based grading | [`examples/coding_agent_rl`](../_examples_synced/coding_agent_rl/README.md) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The links point to ../_examples_synced/... which does not exist in this repository. They should be updated to point to the actual examples directory relative to this file (i.e., ../../../examples/...).

Suggested change
| Return multiple training samples from one prompt, such as subagent, multi-agent, or context-compaction segments | [fan-out return from custom generate](customization.md#returning-multiple-training-samples-for-one-prompt), [`examples/multi_agent`](../_examples_synced/multi_agent/README.md) |
| Avoid blocking training on long-tail agent rollouts | [`examples/fully_async`](../_examples_synced/fully_async/README.md) |
| Study a full end-to-end agent example with sandboxing, real code edits, and test-based grading | [`examples/coding_agent_rl`](../_examples_synced/coding_agent_rl/README.md) |
| Return multiple training samples from one prompt, such as subagent, multi-agent, or context-compaction segments | [fan-out return from custom generate](customization.md#returning-multiple-training-samples-for-one-prompt), [`examples/multi_agent`](../../../examples/multi_agent/README.md) |
| Avoid blocking training on long-tail agent rollouts | [`examples/fully_async`](../../../examples/fully_async/README.md) |
| Study a full end-to-end agent example with sandboxing, real code edits, and test-based grading | [`examples/coding_agent_rl`](../../../examples/coding_agent_rl/README.md) |

Comment thread docs/en/get_started/agent.md Outdated
Comment on lines +69 to +73
The full coding-agent example is [`examples/coding_agent_rl`](../_examples_synced/coding_agent_rl/README.md). It shows an end-to-end agent RL setup that is close to a real software-engineering workflow: each sample boots an isolated sandbox, the agent uses tools to edit code, the rollout captures a `git diff`, and a clean sandbox runs the tests to produce the reward.

This example also demonstrates agent fan-out training. Its middleware splits one trajectory into `subagent`, `wipe` (the chain frozen before compaction), and `final` segments. `generate()` returns `list[Sample]`, and all segments share the same `rollout_id`.

For smaller starting points, see [`examples/search-r1`](../_examples_synced/search-r1/README.md) for multi-turn tool use, [`examples/retool`](../_examples_synced/retool/README.md) for tool-augmented generation, and [`examples/multi_agent`](../_examples_synced/multi_agent/README.md) for the multi-agent pattern.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The links point to ../_examples_synced/... which does not exist in this repository. They should be updated to point to the actual examples directory relative to this file (i.e., ../../../examples/...).

Suggested change
The full coding-agent example is [`examples/coding_agent_rl`](../_examples_synced/coding_agent_rl/README.md). It shows an end-to-end agent RL setup that is close to a real software-engineering workflow: each sample boots an isolated sandbox, the agent uses tools to edit code, the rollout captures a `git diff`, and a clean sandbox runs the tests to produce the reward.
This example also demonstrates agent fan-out training. Its middleware splits one trajectory into `subagent`, `wipe` (the chain frozen before compaction), and `final` segments. `generate()` returns `list[Sample]`, and all segments share the same `rollout_id`.
For smaller starting points, see [`examples/search-r1`](../_examples_synced/search-r1/README.md) for multi-turn tool use, [`examples/retool`](../_examples_synced/retool/README.md) for tool-augmented generation, and [`examples/multi_agent`](../_examples_synced/multi_agent/README.md) for the multi-agent pattern.
The full coding-agent example is [`examples/coding_agent_rl`](../../../examples/coding_agent_rl/README.md). It shows an end-to-end agent RL setup that is close to a real software-engineering workflow: each sample boots an isolated sandbox, the agent uses tools to edit code, the rollout captures a `git diff`, and a clean sandbox runs the tests to produce the reward.
This example also demonstrates agent fan-out training. Its middleware splits one trajectory into `subagent`, `wipe` (the chain frozen before compaction), and `final` segments. `generate()` returns `list[Sample]`, and all segments share the same `rollout_id`.
For smaller starting points, see [`examples/search-r1`](../../../examples/search-r1/README.md) for multi-turn tool use, [`examples/retool`](../../../examples/retool/README.md) for tool-augmented generation, and [`examples/multi_agent`](../../../examples/multi_agent/README.md) for the multi-agent pattern.

Comment thread scripts/run-glm4-9B.sh
set -ex

# will prevent ray from buffering stdout/stderr
export PYTHONUNBUFFERED=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable PYTHONBUFFERED is not recognized by Python. The correct variable to disable stdout/stderr buffering is PYTHONUNBUFFERED=1.

Suggested change
export PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED=1

set -ex

# will prevent ray from buffering stdout/stderr
export PYTHONUNBUFFERED=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable PYTHONBUFFERED is not recognized by Python. The correct variable to disable stdout/stderr buffering is PYTHONUNBUFFERED=1.

Suggested change
export PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED=1

Comment thread scripts/run-qwen3-32B.sh
set -ex

# will prevent ray from buffering stdout/stderr
export PYTHONUNBUFFERED=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable PYTHONBUFFERED is not recognized by Python. The correct variable to disable stdout/stderr buffering is PYTHONUNBUFFERED=1.

Suggested change
export PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED=1

set -ex

# will prevent ray from buffering stdout/stderr
export PYTHONUNBUFFERED=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable PYTHONBUFFERED is not recognized by Python. The correct variable to disable stdout/stderr buffering is PYTHONUNBUFFERED=1.

Suggested change
export PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED=1

# export MASTER_ADDR="127.0.0.1"

# will prevent ray from buffering stdout/stderr
export PYTHONUNBUFFERED=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable PYTHONBUFFERED is not recognized by Python. The correct variable to disable stdout/stderr buffering is PYTHONUNBUFFERED=1.

Suggested change
export PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED=1

@aoshen02
aoshen02 force-pushed the restore-examples branch 3 times, most recently from 9b036b1 to a9ca353 Compare June 9, 2026 15:36
Restore files that were either deleted by #126 ("trim examples to
qwen3 only") or never synced from slime:

**Reverted from pre-#126 (translated):**
- scripts/low_precision/run-qwen3-4b-fp8.sh
- scripts/low_precision/run-qwen3-30b-a3b-fp8.sh
- scripts/run-glm4-9B.sh
- scripts/run-moonlight-16B-A3B.sh
- scripts/run-qwen3-4B-base-sft.sh
- scripts/run-qwen3-32B.sh
- scripts/run-qwen3.5-35B-A3B-sft.sh

**New from slime@44d29ee (translated):**
- docs/en/get_started/agent.md
- examples/fully_async/run-qwen2.5-0.5B-fully_async.sh

All sglang engine flags translated to vllm equivalents (§2.4).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aoshen02
aoshen02 force-pushed the restore-examples branch from a9ca353 to f9b1e10 Compare June 9, 2026 15:38
Standardize all scripts to use the bracket-escaped pkill pattern that
avoids matching pkill itself and also catches vLLM's renamed
subprocesses (VLLM::EngineCore, VLLM::Worker_TP*). Matches the
canonical pattern in command_utils.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aoshen02
aoshen02 marked this pull request as draft June 9, 2026 17:01
@aoshen02 aoshen02 mentioned this pull request Jun 21, 2026
14 tasks
aoshen02 added a commit that referenced this pull request Jun 21, 2026
pkill -9 vllm matches any process named "vllm" and can inadvertently
kill unrelated vllm processes (e.g. background services). Use the same
pattern as PR #220 which targets only vllm serve and Ray VLL[M]:: actors:

  pkill -9 -f '[v]llm serve|VLL[M]::'

Also updates the inline form used in multi-node SSH worker restart
commands (run-qwen3-235B-A22B*.sh, run-qwen3.5-27B.sh, etc.).

Skipped: scripts/run-gpt-oss-20B.sh (uses pkill -9 -f "vllm serve" already),
scripts/run-minimax-m2.sh and run-glm4.7-*.sh (already used -f "vllm serve").

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@aoshen02 aoshen02 closed this Jun 21, 2026
CalvinXKY pushed a commit that referenced this pull request Jun 25, 2026
… 20B support (#260)

* restore: bring back deleted examples, scripts, and agent doc

Restore files that were either deleted by #126 ("trim examples to
qwen3 only") or never synced from slime:

**Reverted from pre-#126 (translated):**
- scripts/low_precision/run-qwen3-4b-fp8.sh
- scripts/low_precision/run-qwen3-30b-a3b-fp8.sh
- scripts/run-glm4-9B.sh
- scripts/run-moonlight-16B-A3B.sh
- scripts/run-qwen3-4B-base-sft.sh
- scripts/run-qwen3-32B.sh
- scripts/run-qwen3.5-35B-A3B-sft.sh

**New from slime@44d29ee (translated):**
- docs/en/get_started/agent.md
- examples/fully_async/run-qwen2.5-0.5B-fully_async.sh

All sglang engine flags translated to vllm equivalents (§2.4).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: unify pkill pattern to '[v]llm serve|VLL[M]::'

Standardize all scripts to use the bracket-escaped pkill pattern that
avoids matching pkill itself and also catches vLLM's renamed
subprocesses (VLLM::EngineCore, VLLM::Worker_TP*). Matches the
canonical pattern in command_utils.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* scripts: complete slime-exact translation of all 29 run scripts

Translate all slime scripts to vime following SGLANG_TO_VLLM_TRANSLATION.md:
- sglang→vllm prefix swap for CLI flags and variables
- _slime→_vime for checkpoint paths
- EP: --sglang-ep-size N → --vllm-enable-expert-parallel (boolean)
- Speculative: multi-param → --vllm-speculative-config JSON (§5.2)
- Delete genuinely sglang-coupled params (DP-attention, DeepEP, NSA, etc.)
- flashinfer → FLASHINFER case fix (§2.4)

23 new scripts + 6 existing updated to match slime@cutoff.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(scripts): correct model config source path in FP8 low_precision scripts

The FP8 scripts used `${SCRIPT_DIR}/../scripts/models/` which resolves
to `scripts/scripts/models/` (non-existent). Changed to `../models/`
to match the INT4 scripts. Same fix as slime PR #2094.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(gpt-oss): fused BF16 format, bridge API patch, bshd qkv format

Three fixes needed to run GPT-OSS 20B RLHF on vLLM backend:

1. hf_weight_iterator_bridge: match Megatron-Bridge 0.5.0 API
   _patch_bridge_expert_cache_to_cpu monkey-patches GPTOSSBridge.
   maybe_modify_converted_hf_weight gained a 4th `hf_state_dict`
   parameter; the patched wrapper only accepted 3, causing TypeError
   during weight sync.

2. run-gpt-oss-20B: point --hf-checkpoint at fused BF16 format
   vLLM's _load_weights_other expects gate_up_proj [E, hidden, 2*ffn]
   (fused). The old per-expert split format (experts.{e}.gate_proj.weight)
   causes KeyError on bias loading. Use tools/convert_gpt_oss_to_fused.py
   to convert an existing per-expert checkpoint, or re-run
   preprocess_gpt_oss.py to produce fused format directly.

3. run-gpt-oss-20B: add --qkv-format bshd + fix seq-length
   GPT-OSS uses learnable softmax (sink attention). TransformerEngine
   disables all attention backends when softmax_type=learnable and
   qkv_format=thd (packed sequences). --qkv-format bshd avoids this.
   --use-dynamic-batch-size is incompatible with bshd; replaced with
   fixed --seq-length 10240 (covers 8192 max response + prompt headroom).

tools/convert_gpt_oss_to_fused.py: new tool to convert per-expert BF16
checkpoint (output of old preprocess_gpt_oss.py) to the fused HF format
expected by vLLM without re-running the slow MXFP4 dequantization.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(scripts): replace pkill -9 vllm with precise -f pattern (21 files)

pkill -9 vllm matches any process named "vllm" and can inadvertently
kill unrelated vllm processes (e.g. background services). Use the same
pattern as PR #220 which targets only vllm serve and Ray VLL[M]:: actors:

  pkill -9 -f '[v]llm serve|VLL[M]::'

Also updates the inline form used in multi-node SSH worker restart
commands (run-qwen3-235B-A22B*.sh, run-qwen3.5-27B.sh, etc.).

Skipped: scripts/run-gpt-oss-20B.sh (uses pkill -9 -f "vllm serve" already),
scripts/run-minimax-m2.sh and run-glm4.7-*.sh (already used -f "vllm serve").

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(scripts): remove run-qwen3-4B-amd.sh from this PR

AMD-specific script is out of scope for the gb300-complete-port PR.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* sync(docs+scripts): port docs/examples from slime-44d29ee, fix script translations

- Add missing EN/ZH docs: low-precision, on-policy-distillation, get_started/agent,
  pd-disaggregation (heterogeneous server groups fix), examples zh docs
- Add missing examples: on_policy_distillation, eval_multi_task, delta_weight_sync,
  geo3k images
- Fix vLLM flag translations across all example docs:
  - --vllm-mem-fraction-static → --vllm-gpu-memory-utilization
  - Remove non-existent dp-attention flags (--vllm-enable-dp-attention, --vllm-dp-size,
    --vllm-moe-dense-tp-size, --vllm-enable-dp-lm-head, --vllm-ep-size)
  - --vllm-ep-num-redundant-experts → --vllm-eplb-config
  - --vllm-cuda-graph-bs → --vllm-max-cudagraph-capture-size
  - sglang speculative flags → --vllm-speculative-config JSON
  - GLM-4.7 MTP: method=eagle → method=mtp, num_speculative_tokens=4 → 3
  - sgl-router → vllm-router; THUDM/vime → vllm-project/vime
- Fix scripts: restore run-kimi-k2-Instruct/Thinking/qwen3-4B/qwen3-235B-A22B to
  slime-44d29ee-as-vime + pkill precision fix only; restore int4 python3 path

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* revert(scripts): pkill -9 -f pattern back to pkill -9 vllm, align with slime

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* revert(pkill): align all remaining kill patterns with slime (pkill -9 vllm)

Covers examples/, docs/, tests/, and vime/utils -- previously missed in
the scripts/ revert.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore: remove gpt-oss-20B script and convert tool (moved to separate PR)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aoshen02
aoshen02 deleted the restore-examples branch July 8, 2026 14:38
aoshen02 added a commit to aoshen02/vime that referenced this pull request Jul 15, 2026
… 20B support (vllm-project#260)

* restore: bring back deleted examples, scripts, and agent doc

Restore files that were either deleted by vllm-project#126 ("trim examples to
qwen3 only") or never synced from slime:

**Reverted from pre-vllm-project#126 (translated):**
- scripts/low_precision/run-qwen3-4b-fp8.sh
- scripts/low_precision/run-qwen3-30b-a3b-fp8.sh
- scripts/run-glm4-9B.sh
- scripts/run-moonlight-16B-A3B.sh
- scripts/run-qwen3-4B-base-sft.sh
- scripts/run-qwen3-32B.sh
- scripts/run-qwen3.5-35B-A3B-sft.sh

**New from slime@44d29ee (translated):**
- docs/en/get_started/agent.md
- examples/fully_async/run-qwen2.5-0.5B-fully_async.sh

All sglang engine flags translated to vllm equivalents (§2.4).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: unify pkill pattern to '[v]llm serve|VLL[M]::'

Standardize all scripts to use the bracket-escaped pkill pattern that
avoids matching pkill itself and also catches vLLM's renamed
subprocesses (VLLM::EngineCore, VLLM::Worker_TP*). Matches the
canonical pattern in command_utils.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* scripts: complete slime-exact translation of all 29 run scripts

Translate all slime scripts to vime following SGLANG_TO_VLLM_TRANSLATION.md:
- sglang→vllm prefix swap for CLI flags and variables
- _slime→_vime for checkpoint paths
- EP: --sglang-ep-size N → --vllm-enable-expert-parallel (boolean)
- Speculative: multi-param → --vllm-speculative-config JSON (§5.2)
- Delete genuinely sglang-coupled params (DP-attention, DeepEP, NSA, etc.)
- flashinfer → FLASHINFER case fix (§2.4)

23 new scripts + 6 existing updated to match slime@cutoff.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(scripts): correct model config source path in FP8 low_precision scripts

The FP8 scripts used `${SCRIPT_DIR}/../scripts/models/` which resolves
to `scripts/scripts/models/` (non-existent). Changed to `../models/`
to match the INT4 scripts. Same fix as slime PR #2094.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(gpt-oss): fused BF16 format, bridge API patch, bshd qkv format

Three fixes needed to run GPT-OSS 20B RLHF on vLLM backend:

1. hf_weight_iterator_bridge: match Megatron-Bridge 0.5.0 API
   _patch_bridge_expert_cache_to_cpu monkey-patches GPTOSSBridge.
   maybe_modify_converted_hf_weight gained a 4th `hf_state_dict`
   parameter; the patched wrapper only accepted 3, causing TypeError
   during weight sync.

2. run-gpt-oss-20B: point --hf-checkpoint at fused BF16 format
   vLLM's _load_weights_other expects gate_up_proj [E, hidden, 2*ffn]
   (fused). The old per-expert split format (experts.{e}.gate_proj.weight)
   causes KeyError on bias loading. Use tools/convert_gpt_oss_to_fused.py
   to convert an existing per-expert checkpoint, or re-run
   preprocess_gpt_oss.py to produce fused format directly.

3. run-gpt-oss-20B: add --qkv-format bshd + fix seq-length
   GPT-OSS uses learnable softmax (sink attention). TransformerEngine
   disables all attention backends when softmax_type=learnable and
   qkv_format=thd (packed sequences). --qkv-format bshd avoids this.
   --use-dynamic-batch-size is incompatible with bshd; replaced with
   fixed --seq-length 10240 (covers 8192 max response + prompt headroom).

tools/convert_gpt_oss_to_fused.py: new tool to convert per-expert BF16
checkpoint (output of old preprocess_gpt_oss.py) to the fused HF format
expected by vLLM without re-running the slow MXFP4 dequantization.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(scripts): replace pkill -9 vllm with precise -f pattern (21 files)

pkill -9 vllm matches any process named "vllm" and can inadvertently
kill unrelated vllm processes (e.g. background services). Use the same
pattern as PR vllm-project#220 which targets only vllm serve and Ray VLL[M]:: actors:

  pkill -9 -f '[v]llm serve|VLL[M]::'

Also updates the inline form used in multi-node SSH worker restart
commands (run-qwen3-235B-A22B*.sh, run-qwen3.5-27B.sh, etc.).

Skipped: scripts/run-gpt-oss-20B.sh (uses pkill -9 -f "vllm serve" already),
scripts/run-minimax-m2.sh and run-glm4.7-*.sh (already used -f "vllm serve").

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(scripts): remove run-qwen3-4B-amd.sh from this PR

AMD-specific script is out of scope for the gb300-complete-port PR.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* sync(docs+scripts): port docs/examples from slime-44d29ee, fix script translations

- Add missing EN/ZH docs: low-precision, on-policy-distillation, get_started/agent,
  pd-disaggregation (heterogeneous server groups fix), examples zh docs
- Add missing examples: on_policy_distillation, eval_multi_task, delta_weight_sync,
  geo3k images
- Fix vLLM flag translations across all example docs:
  - --vllm-mem-fraction-static → --vllm-gpu-memory-utilization
  - Remove non-existent dp-attention flags (--vllm-enable-dp-attention, --vllm-dp-size,
    --vllm-moe-dense-tp-size, --vllm-enable-dp-lm-head, --vllm-ep-size)
  - --vllm-ep-num-redundant-experts → --vllm-eplb-config
  - --vllm-cuda-graph-bs → --vllm-max-cudagraph-capture-size
  - sglang speculative flags → --vllm-speculative-config JSON
  - GLM-4.7 MTP: method=eagle → method=mtp, num_speculative_tokens=4 → 3
  - sgl-router → vllm-router; THUDM/vime → vllm-project/vime
- Fix scripts: restore run-kimi-k2-Instruct/Thinking/qwen3-4B/qwen3-235B-A22B to
  slime-44d29ee-as-vime + pkill precision fix only; restore int4 python3 path

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* revert(scripts): pkill -9 -f pattern back to pkill -9 vllm, align with slime

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* revert(pkill): align all remaining kill patterns with slime (pkill -9 vllm)

Covers examples/, docs/, tests/, and vime/utils -- previously missed in
the scripts/ revert.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore: remove gpt-oss-20B script and convert tool (moved to separate PR)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant