Skip to content

[Chore]: Update Dflash recipes to use dpace#1775

Draft
h-guo18 wants to merge 5 commits into
mainfrom
haoguo/udpate-dflash-recipe
Draft

[Chore]: Update Dflash recipes to use dpace#1775
h-guo18 wants to merge 5 commits into
mainfrom
haoguo/udpate-dflash-recipe

Conversation

@h-guo18

@h-guo18 h-guo18 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change: Chore (recipe update)

Makes D-PACE the position-loss weighting for all DFlash recipes, following #1724 (which set dflash_loss_objective=dpace as the config default). The recipes still carried dflash_loss_decay_factor, which is ignored once the objective defaults to dpace (and emits a runtime warning). This PR removes those now-dead overrides so the recipes inherit the dpace default, and documents how to opt back into static decay.

  • modelopt_recipes/general/speculative_decoding/dflash.yaml: drop dflash_loss_decay_factor: 4.0, surface dflash_dpace_alpha: 0.5, and comment how to switch back to decay.
  • 8 tools/launcher/examples/** DFlash recipes (Qwen3-8B / Qwen3-30B-A3B / Qwen3.5-4B / MiniMax-M2.7 / gpt-oss-20b): remove the dead dflash.dflash_loss_decay_factor=N override.

Domino recipes are intentionally left unchanged — Domino uses its own base/final dual loss and does not implement the dpace objective.

Usage

# DFlash recipes now default to D-PACE; no setting needed. To use static decay instead:
dflash:
  dflash_loss_objective: decay
  dflash_loss_decay_factor: 7   # gamma per block_size (7 for 16, 5 for 10, 4 for 8)

Testing

Recipe/config-only change; no code logic. The dpace default and config validation are covered by the unit tests in #1724 (tests/unit/torch/speculative/plugins/test_hf_dflash.py).

Before your PR is "Ready for review"

  • Is this change backward compatible?: ❌ — these DFlash recipes switch from static decay to D-PACE weighting. Intended; opt back in via dflash_loss_objective: decay.
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: N/A (recipe-only; logic tested in [Feat]:Support DPace #1724)
  • Did you update Changelog?: N/A (D-PACE default is recorded in [Feat]:Support DPace #1724)
  • Did you get Claude approval on this PR?: N/A

Additional Information

Stacked on #1724 — set the PR base to haoguo/dpace so the diff shows only the recipe changes, and merge after #1724 (depends on its dflash_dpace_alpha config field).

h-guo18 added 5 commits June 19, 2026 22:19
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 74649f53-36a3-467d-a0cb-79f21fa6d95b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch haoguo/udpate-dflash-recipe

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://NVIDIA.github.io/Model-Optimizer/pr-preview/pr-1775/

Built to branch gh-pages at 2026-06-20 00:05 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@h-guo18 h-guo18 changed the title Haoguo/udpate dflash recipe [Chore]: Update Dflash recipes to use dpace Jun 20, 2026
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.64%. Comparing base (93dd08f) to head (a81526c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
modelopt/torch/speculative/plugins/hf_dflash.py 92.30% 2 Missing ⚠️
modelopt/torch/speculative/dflash/dflash_model.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1775      +/-   ##
==========================================
- Coverage   76.92%   76.64%   -0.29%     
==========================================
  Files         511      511              
  Lines       56360    56395      +35     
==========================================
- Hits        43356    43225     -131     
- Misses      13004    13170     +166     
Flag Coverage Δ
unit 54.35% <64.10%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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