Repository navigation
Conversation
|
/ok to test 8515281 |
|
/ok to test d7ae2d3 |
|
/ok to test e2c6509 |
|
/ok to test 8d48554 |
|
/ok to test fae61a7 |
|
/ok to test 711a05e |
There was a problem hiding this comment.
@vmendelev could you self review the PR(post it and show resolution) before someone reviews. it helps catch a lot of gotchas.
@sharonyu-115 could you help review this PR after self-review?
|
/ok to test f6b8442 |
vmendelev
left a comment
There was a problem hiding this comment.
This PR has merge conflicts with main. GitHub reports it as CONFLICTING. Please rebase on main and resolve the conflicts.
The native SpeechLM path is well contained. It has a thin SpeechLMPolicyWorker subclass, Speech imports that load lazily and only when native_model is set, setup-time guards for packing, TP and CP, an explicit contract on trainable names and tensor/scalar counts, and loud checks in response_logprobs that the native targets match the text response tokens. Thank you also for the WER trajectory and the reproduction table in the description and the guide.
- (C1) The two NeMo Speech test files have no
automodelmark and never run in CI, soSpeechLMPolicyhas no test coverage. A follow-up issue is needed for a CI lane that installs NeMo Speech. - (C2)
full_group_stdis accepted for every estimator but only GRPO reads it. Add a validator that rejects it for other estimators. - (C3)
asr_environment.pyis missing from pyrefly'sproject-includes, so it is never type-checked. - (C4)
output_limits.pyhas a 2025 copyright header. New files must use 2026. - (C5) Low priority: the "import cycle" comment in
speechlm.pyis wrong, andSpeechLMNativeConfigis imported three times.
Scope: this review only read the code. No tests, linters or pyrefly ran in the review environment, which had no uv, torch or NeMo Speech. All findings come from reading the code.
This review was produced by 7 agents: rl-expert, bug-finder, test-agent, design-reviewer, comment-reviewer, devil-advocate and comment-editor.
Generated by Claude Code
|
/ok to test 7b11771 |
|
Self-review posted above; all five findings are fixed in 7b11771 and their threads are resolved. |
|
Hi @yuekaizhang, asking for your review as well since you have the speech background. Thanks! |
|
Nice job! Before a more detailed review, two high-level asks:
|
|
Thanks @yuekaizhang, both points make sense.
|
7b11771 to
e40dc74
Compare
|
/ok to test e40dc74 |
|
Thanks for the updates — the seed model is public now and the ASCEND example is a good step. I'd like to raise a structural question and get opinions from @yuki-97 @terrykong as well as @vmendelev: Would this contribution fit better under
Separately, @vmendelev:
To be clear, the generic improvements in this PR (full-group std estimator, per-row output limits, rollout prompt validation, the shared vLLM fixes) look like good core contributions regardless — a possible split is landing those in core while the SpeechLM-specific integration moves to |
|
Thanks @yuekaizhang, agreed on the split. The plan:
One question before I restructure, also for @yuki-97 and @terrykong: which Automodel version should the research project use?
Which path do you prefer?
|
|
Update on the split:
|
|
Restructured as planned above: this PR now adds the research project |
|
/ok to test 99e288f |
1e79ee1 to
7deed80
Compare
99e288f to
88ac6da
Compare
|
/ok to test 88ac6da |
Train native NeMo Speech SALM checkpoints with GSPO ASR rewards through NeMo RL extension points: an AUTOMODEL_FACTORY model returning text-aligned logits, AutoProcessor registration, registered ASR data and reward environment, and worker extensions running in separately locked policy and generation environments. Relocking the root workspace also collapses the duplicate boto3/botocore resolutions to one version. Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Speech 732041d29 (NVIDIA-NeMo/Speech#16588) adds vLLM 0.29's multimodal processor hook and keeps refit vocabulary padding on the weight's device. Both environments use the same Speech commit; the lock changes are limited to nemo-toolkit. Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Mandarin ordinary_asr rewards now compute the han_adjacent CER locally: Whisper English normalization, whitespace next to Han characters removed, and a character edit distance. Rewards equal NeMo Skills 5ea1990a's evaluate_cer exactly on 3,122 pairs, including 784 ASCEND reference/prediction pairs. The policy lock drops nemo-skills, jiwer and rapidfuzz. Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
…extra Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
Speech main now carries the vLLM 0.33 plugin fixes (#16505, #16666, #16667). nixl 1.5.2 replaces 1.3.0, whose nixl_ep fails to load with Torch 2.14 once the Speech plugin has loaded (#5215). The relock also follows core's current pins (ai-dynamo 1.8, nccl-extensions 0.1.0). Signed-off-by: Valentin Mendelev <[email protected]>
…r_sample Signed-off-by: Valentin Mendelev <[email protected]>
Signed-off-by: Valentin Mendelev <[email protected]>
…n normalization Signed-off-by: Valentin Mendelev <[email protected]>
88ac6da to
292672f
Compare
|
/ok to test 292672f |
What and why
Adds
research/speechlm_gspo, a research project for GSPO ASR training of native NeMo Speech SALM checkpoints (Nemotron 3.5 Transcribe 30B-A4B) with the Automodel policy and vLLM generation. It replaces this PR's earlier in-core recipe, following the split discussed above.Rebased onto
mainafter #5092 merged as3a276d5aa(previous head88ac6da1b). The rebuild follows main's changes: the per-sample cap is nowextra_env_info["max_new_tokens_for_sample"], the recipe usesloss_fn.normalization: sequence_meaninstead of the removedtoken_level_loss, and both environments are relocked, which brings the policy environment to main's nixl 1.5.2.Design:
AUTOMODEL_FACTORYentry formodel_type: nemo_speechlm,AutoProcessorregistration,register_processor/register_envfor theasrdata processor and reward, andworker_extension_cls_fqnfor the policy and generation workers. No core changes; the core options it uses came in with feat(grpo): add full-group std, vLLM per-sample caps, placeholder prompt checks #5092.forwardand returns logits aligned to the text tokens. The audio placeholder id lies outside the vocabulary, so it gets a constant-inflogit column; generic logprob gathering then works without changing model parameters or real-token probabilities.envs/policy: Speechab47d17de, Automodel752a71eb(includes feat(freezing): select exact parameters with FreezeConfig Automodel#4377), transformers 5.18.0, TransformerEngine 2.19.0.envs/generation: NeMo RL'svllmextra (vLLM 0.33.0, Torch 2.14.0) and Speechab47d17de, which carries the SpeechLM vLLM 0.33 plugin fixes. It pins nixl 1.5.2, because nixl 1.3.0'snixl_epfails to load with Torch 2.14 once the Speech plugin has loaded (nixl 1.3.0's nixl_ep extension fails to load with the vllm extra's Torch 2.14 #5215).excludefor the env directories, and listing the nightly test intests/test_suites/disabled.txt(it needs an ASR audio Parquet that CI does not provide).evaluate_cerexactly on 3,122 reward pairs; MER uses Speech'smer_tokens.Usage
cd research/speechlm_gspo uv run --locked run_speechlm_gspo.py \ --config configs/recipes/gspo-nemotron-3.5-transcribe-30b-a4b-4n8g-automodel-ep8.yamlData format, environment variables and the nightly test are described in
research/speechlm_gspo/README.md.Issues
Related: #5215 (nixl and Torch 2.14).
Convergence / perf / functionality proof
GPU run on 4 nodes × 8 GPUs with 500 ASCEND training examples, on an earlier stack: RL
1fb55b835, Speech732041d29, vLLM 0.29. Checkpoints were selected on dev.Not yet rerun on the current stack (vLLM 0.33.0, Torch 2.14.0, Speech
ab47d17de).Local checks on the current head:
uv lock --checkfor the root and both environments, with uv 0.13.6 fromdocker/Dockerfile.test_recipe.py), andtests/unit/test_recipes_and_test_suites.pypasses.pytest tests/unitin a policy environment without TransformerEngine's torch extension: 30 passed.test_model.py(6),test_alignment.py(5) andtest_reward.py(19) pass on their own; in a combined run, one test each from the last two fails once another test has loaded TransformerEngine without its extension.has_nixl_ep()probe andimport nixl_epsucceed.Needs upstream changes
PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.