NVIDIA / NVIDIA/TensorRT-LLM

Using max_attention_window (VSWA) reduces concurrent batch size and causes drop in throughput (gemma3 trt backend)

Open
#6,503 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug General perf Inference runtime Performance
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

System Info

GPU: NVIDIA A100, NVIDIA H100
TensorRT-LLM version: 1.0.0rc5
TensorRT-LLM commit: b3ca159787226d59717474a304041d9dcb27dd42

Who can help?

No response

Information
  • The official example scripts
  • My own modified scripts
Tasks
  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)
Reproduction

Build: following gemma3 guide

Serve: trtllm-serve with max_attention_window = [512, 512, 512, 512, 512, 3100]

Expected behavior

When the sequence length is shorter than the minimum attention window,
concurrent batch size remains the same compared to when max_attention_window is not used.
When it is longer, the batch size increases.
It works well in vLLM.

actual behavior

However the batch size decreases in both cases, resulting in a significant drop in throughput.

additional notes

This behavior has continued since the referenced commit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Gemma3 setup from the examples/models/core/gemma guide with trtllm-serve and the reported max_attention_window values. Compare concurrent batch size and throughput for shorter and longer sequences, then inspect the behavior introduced by the referenced commit in pull request 4667. Done means the configured window no longer reduces batch size for shorter sequences and improves it for longer ones.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.