[Feature]: trtllm-bench should set kv_cache_config.avg_seq_len from the dataset for hybrid Mamba models
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- backend, performance
調査の方向性
Read get_settings() in tensorrt_llm/bench/benchmark/utils/general.py and the avg_seq_len handling in MambaHybridCacheManagerV2._get_typical_request_capacity in tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py. Check how dataset metadata provides avg_isl and avg_osl, then review the perf harness precedent in tests/integration/defs/perf/test_perf.py. Done means the bench default follows the proposal only when neither avg_seq_len nor a pool ratio is set, with a unit test; the open questions need a decision.
索引モデルが issue の本文から書いたものです。
説明
Summary
For hybrid Mamba / linear-attention models, trtllm-bench never sets kv_cache_config.avg_seq_len, so the cache pool is sized with the max_seq_len // 2 fallback. In a fixed-length throughput benchmark every request reaches max_seq_len, so the pool holds about half the requests the user expects, and large batches stall.
Where
MambaHybridCacheManagerV2._get_typical_request_capacity(tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py) returnsavg_seq_lenwhen set; otherwise it logs a warning and usesmax(1, max_seq_len // 2).trtllm-bench(tensorrt_llm/bench/benchmark/utils/general.py::get_settings) derivesmax_seq_lenfrom the dataset but never setsavg_seq_len.- #17825 infers
avg_seq_lenfrom fixed-length datasets, but only in the perf test harness (tests/integration/defs/perf/test_perf.py), not intrtllm-benchitself.
What we saw
Qwen3.5-397B-A17B NVFP4 on 4× GB200, trtllm-bench throughput mode, ISL/OSL 256/256, attention DP, TensorRT-LLM 1.4.0rc4:
- Without
avg_seq_len, batches above about 512 requests per rank ran short of cache and throughput fell; 1,024 per rank collapsed. - With
kv_cache_config.avg_seq_len: 512(= ISL + OSL), 640–896 requests per rank fit, for up to +20% output throughput at the same settings otherwise.
Proposal
In get_settings(), when the user sets neither kv_cache_config.avg_seq_len nor a pool ratio, default avg_seq_len to avg_isl + avg_osl from the dataset metadata (a small change plus a unit test). I'm happy to send a PR if this direction is welcome.
Open questions
- This would make the
trtllm-benchdefault differ fromtrtllm-serve, which can't know the request lengths. Is a bench-only default acceptable? avg_seq_lenis marked as a prototype field. Is it stable enough to set by default?- The collapse at 1,024 per rank might also involve the scheduler (possibly related to #15462). I haven't reproduced it on current
main.
- 主要言語
- Python
- スター
- 15.2k
- フォーク
- 3k
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 477
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/TensorRT-LLM のほかの issue
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.x対応中かも @NimaVaziri が今日担当しました。 オープンPytorch
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/TensorRT-LLM#23406 ·
メンテナーはふだん 1 日以内に返信
-
Inference runtime Windows
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA/TensorRT-LLM#23394 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: MMLU subsampling changes when evaluators are interleaved対応中かも @LeNeLeNeWo が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/TensorRT-LLM#23273 ·
メンテナーはふだん 1 日以内に返信
-
Trace-replay Pareto window includes the drain when sessions finish out of admission order対応中かも @sbeierle が 3 日前に担当しました。 オープンTesting
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NVIDIA/TensorRT-LLM#23077 ·
メンテナーはふだん 1 日以内に返信
-
LongBench V2 blog command breaks on inline comments after continuations対応中かも @ddlw が 25 日前に担当しました。 オープンDoc
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
NVIDIA/TensorRT-LLM#21879 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/TensorRT-LLM の issue をすべて見る
似ている issue
-
[Resource]: Spaicelyオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
hesreallyhim/awesome-claude-code#3875 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bvis/aegis-hass#725 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
#1643 unrecoverable split: 1 digest with a 403 — two earlier captures of the same URL are real 200sオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Robin-IA/Congressional-Letters-Dev#1684 ·
メンテナーはふだん 1 日以内に返信