feat: support single-GPU GSM8K smoke runs - #1678
Open
CharlesXu-HQ wants to merge 1 commit into
Open
CharlesXu-HQ wants to merge 1 commit into
CharlesXu-HQ wants to merge 1 commit into
Conversation
Make the GSM8K example usable on a single-GPU workstation without starting an unused eval engine or an oversized reward process pool. Use the active Python interpreter for local subprocesses and document the validated FSDP/SGLang disk-sync recipe. Key changes: - Add a configurable reward worker limit to the GSM8K workflow - Skip eval rollout initialization without a validation dataset - Document a 32 GB single-GPU smoke configuration Refs: areal-project#310 Signed-off-by: charlesxu91 <charlesxu.mi@gmail.com>
CharlesXu-HQ
requested review from
CormickKneey,
HwVanICI,
Le8r0nJames,
PrometheusComing,
fishcrap,
garrett4wade,
nuzant,
rchardx and
sitabulaixizawaluduo
as code owners
September 5, 2026 04:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes the GSM8K GRPO quickstart runnable as a two-step smoke test on a
single 32 GB GPU with one FSDP rank and one SGLang rank.
The single-GPU path uses disk-based weight synchronization so the separated
training and rollout processes do not create a same-GPU NCCL group. It also:
valid_dataset=null;reward_max_workersso workstation runs can bound the math rewardprocess pool;
selected virtual environment; and
This is a compatibility-oriented smoke configuration for validating an
environment before longer experiments. It is not intended as a
throughput-optimized training recipe.
Related Issue
Fixes #310
Type of Change
Validation
The documented command was run from
main@6feff6dfplus this commit on anNVIDIA GeForce RTX 5090 (32 GB) with Qwen3-0.6B. Both training steps completed,
the process exited with status 0, and no training or GPU process remained after
teardown. Peak observed device usage was 21.83 / 31.36 GiB.
python3 examples/math/gsm8k_rl.py \ --config examples/math/gsm8k_grpo.yaml \ scheduler.type=local \ experiment_name=gsm8k-grpo-single-gpu \ trial_name=smoke \ actor.path=Qwen/Qwen3-0.6B \ actor.backend=fsdp:d1 \ +actor.attn_impl=sdpa \ rollout.backend=sglang:d1 \ +rollout.setup_timeout=900 \ actor.weight_update_mode=disk \ enable_offload=false \ +total_train_steps=2 \ rollout.max_concurrent_rollouts=2 \ +reward_max_workers=1 \ gconfig.n_samples=2 \ gconfig.max_new_tokens=64 \ gconfig.max_tokens=512 \ actor.mb_spec.max_tokens_per_mb=512 \ actor.optimizer.type=adam_bf16 \ +actor.optimizer_dtype=bfloat16 \ train_dataset.batch_size=2 \ train_dataset.num_workers=0 \ train_dataset.pin_memory=false \ +train_dataset.scheduling_spec=null \ valid_dataset=null \ sglang.context_length=1024 \ sglang.mem_fraction_static=0.2 \ +sglang.max_prefill_tokens=1024 \ +sglang.attention_backend=torch_native \ +sglang.sampling_backend=pytorch \ cluster.n_nodes=1 \ cluster.n_gpus_per_node=1Local checks:
32 passedfor the focused unit and regression test set;git diff --checkpasses.pre-commit run --all-fileswas attempted, but hook initialization could notfinish because the host timed out while fetching the clang-format mirror from
GitHub. The full documentation build was also attempted but could not start
because
uvis not installed on the test host. These two checklist items areleft unchecked below.
Checklist
Contributing Guide
pre-commit run --all-files)./docs/build_all.sh)main/review-prcommand/create-prBreaking Change Details (if applicable):
None.
Additional Context
The PyTorch attention and sampling backends favor compatibility on workstation
GPUs. Users can tune the SGLang backends and increase batch size, sequence
length, model size, or training steps after the smoke run succeeds.
Need help? Check the
Contributing Guide
or ask in GitHub Discussions!