ExternalDraftConfig accepts tvd_ce weights that produce zero or infinite loss
メンテナーはふだん 1 日以内に返信
@adimalkar がすでに取り組んでいます。
2026年11月23日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
検証は modelopt/torch/speculative/config.py の ExternalDraftConfig にあり、external_tvd_alpha と external_ce_alpha には現在 ge=0.0 しか設定されていません。_mix_ce を読んで2つの重みがどのように組み合わされるかを確認し、その後 issue の再現スニペットを実行して、0/0 と無限大のケースが受け入れられていることを確認してください。tvd_ce が有限でない重みを拒否し、両方の重みがゼロの組み合わせも拒否するようになり、各ケースをテストがカバーし、片方の項だけを無効化する機能が引き続き動作していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hullo folks,
I’m doing some research for Tessl Code Review and ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:
ExternalDraftConfig(external_loss="tvd_ce", ...) accepts both a zero/zero weight pair and an infinite weight. The current _mix_ce then produces a zero objective or a non-finite loss.
Reproduction
ExternalDraftConfig(
external_loss="tvd_ce",
external_tvd_alpha=0.0,
external_ce_alpha=0.0,
) # accepted
ExternalDraftConfig(
external_loss="tvd_ce",
external_tvd_alpha=float("inf"),
external_ce_alpha=0.1,
) # also accepted
Both fields have ge=0.0, but neither a finiteness constraint nor a combined-positive-weight check.
Validation
I executed the current ExternalDraftConfig class using the actual current ModeloptBaseConfig and ModeloptField, with Pydantic 2.14.4 and PyTorch 2.15.0 on CPU. The two configurations above were accepted; a negative weight was rejected.
I also executed the current _mix_ce method with a small logits/target fixture and a controlled TVD scalar:
- Weights 0/0: loss 0, zero logits gradient and zero TVD gradient.
- Weights infinity/0.1: infinite loss and infinite TVD gradient.
- Weights 0.9/0.1: finite loss and gradients.
No GPU or full training run was involved.
Expected behavior
For tvd_ce, reject non-finite weights and require at least one positive contribution. That would catch a configuration that silently disables the objective before starting training, while still allowing either individual term to be disabled.
Current source: implementation. The lead came from this earlier review finding, and I checked it against the current source.
Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.
We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.
Bap
- 主要言語
- Python
- スター
- 5.6k
- フォーク
- 819
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 191
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/Model-Optimizer のほかの issue
-
[BUG] MSE histogram calibration: wrong amax for INT, TypeError for FP8 (args passed in the bias slot)対応中かも @0z5a が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/Model-Optimizer#3261 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] modelopt-mcp: all launcher subprocesses hang when the server runs as a stdio MCP server — missing stdin=DEVNULL対応中かも @ChenhanYu が 51 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/Model-Optimizer#2551 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Puzzletron Progress 6/8 (calculating one block scores) takes 10 to 20 times more than in tutorial再び着手できるかも @tejasng053 が 58 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/Model-Optimizer#1667 ·
メンテナーはふだん 1 日以内に返信
-
[ONNX PTQ] remove_input_dq_and_output_q produces an invalid graph when one INT8 custom op feeds another対応中かも @orshih6 が今日担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
NVIDIA/Model-Optimizer#3515 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[ONNX PTQ] trt_plugins_precision keeps only the last fp16/fp32 entry when several custom op types are listed対応中かも @uditstocks が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/Model-Optimizer#3514 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/Model-Optimizer の issue をすべて見る
似ている issue
-
bot-triaged module: correctness (silent) module: fft triage review
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
conda-forge/zarpaint-feedstock#8 · コメント 1 件 · リアクション 1 件 ·
-
plot_prediction colorbar shows a 0-1 range instead of the data range対応中かも @nikhil3495 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mllam/neural-lam#902 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
didi/helixharness#28 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
DaoCloud/DaoCloud-docs#7839 ·
メンテナーはふだん 1 日以内に返信