Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Puzzletron] Runtime stats benchmark model computes head size as hidden_size // num_attention_heads instead of reading head_dim

オープン
#3,016 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@grzegorz-k-karch がすでに取り組んでいます。

2026年10月26日 から。

  • #3112 @efegokdemir による — オープン

評価

この issue はまだ評価されていません。

説明

bug

Follow-up to #3009, which fixed the Puzzletron memory objective to use the model's head_dim for the KV cache (#2482).

The runtime objective has the same root cause. calc_runtime_stats.create_benchmark_model builds the synthetic Llama benchmark model with:

model_config = LlamaConfig(
    hidden_size=hidden_size,  # candidate hidden size
    num_attention_heads=num_attention_heads,
    head_dim=None,  # Compute from hidden_size // num_attention_heads instead of using default 128
    ...
)

So when runtime_stats_enabled=True, the benchmarked attention uses hidden_size // num_attention_heads as its head size, which is wrong in two cases:

  • Models that set head_dim independently, e.g. Mistral-Small-24B (160 instead of 128) or gpt-oss-20b (45 instead of 64).
  • Every candidate with a pruned hidden_size. Pruning leaves head_dim unchanged, but here it shrinks with the candidate hidden size.

As a result, the latency numbers fed to the MIP are skewed the same way the memory numbers were before #3009.

Suggested fix: pass the parent's head size, get_attention_head_dim(descriptor.get_language_model_config(model_config)) from modelopt/torch/puzzletron/utils/misc.py, into create_benchmark_model as head_dim. Validate with a vLLM runtime-stats run.

Raised in the review of #3009: https://github.com/NVIDIA/Model-Optimizer/pull/3009#discussion_r4374334841

主要言語
Python
スター
5.5k
フォーク
785
平均マージ
3日 22時間
マージ済み PR(30日)
277

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/Model-Optimizer のほかの issue

NVIDIA/Model-Optimizer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。