Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ Kimi K3 additionally depends on `fla` and `einops`, installed into the same in-p
To use the optimized CuTeDSL MLA kernel, install the FlashInfer revision used by the Kimi K3 example into the same in-place environment:

```bash
.venv-3.12/bin/python -m pip install -U 'packaging>=24.2' # required by the FlashInfer source build
.venv-3.12/bin/python -u -m pip install --force-reinstall --no-deps \
--no-build-isolation \
"flashinfer-python[cu13] @ git+https://github.com/PerkzZheng/flashinfer-k3.git@b6cc594918baf76c40c3a6236fd53f0f8fb9d2dc"
```

The TensorRT LLM environment already provides FlashInfer's runtime dependencies. The `--no-deps` option prevents `pip` from replacing the pinned PyTorch, Triton, CUDA, and CuTeDSL packages. Install FlashInfer after TensorRT LLM because a later dependency-resolving TensorRT LLM installation can replace this source revision with the currently pinned `flashinfer-python==0.6.14`.
The `packaging>=24.2` requirement of this source build is already satisfied by `requirements.txt`. The TensorRT LLM environment already provides FlashInfer's runtime dependencies. The `--no-deps` option prevents `pip` from replacing the pinned PyTorch, Triton, CUDA, and CuTeDSL packages. Install FlashInfer after TensorRT LLM because a later dependency-resolving TensorRT LLM installation can replace this source revision with the currently pinned `flashinfer-python==0.6.14`.

For general build-from-source instructions see [https://nvidia.github.io/TensorRT-LLM/latest/installation/build-from-source.html](https://nvidia.github.io/TensorRT-LLM/latest/installation/build-from-source.html).

Expand Down
5 changes: 3 additions & 2 deletions examples/kimi_k3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ other GPU architectures may be added in a future release.
revision into the same in-place environment after installing TensorRT-LLM:

```bash
.venv-3.12/bin/python -m pip install -U 'packaging>=24.2' # required by the FlashInfer source build
.venv-3.12/bin/python -u -m pip install --force-reinstall --no-deps \
--no-build-isolation \
"flashinfer-python[cu13] @ git+https://github.com/PerkzZheng/flashinfer-k3.git@b6cc594918baf76c40c3a6236fd53f0f8fb9d2dc"
```

The TensorRT-LLM environment already provides FlashInfer's runtime
The `packaging>=24.2` requirement of this source build is already
satisfied by `requirements.txt`. The TensorRT-LLM environment already
provides FlashInfer's runtime
dependencies; `--no-deps` prevents pip from replacing its pinned PyTorch,
Triton, CUDA, and CuTeDSL packages. Install FlashInfer last: TensorRT-LLM
currently pins `flashinfer-python==0.6.14`, so a later
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ fastapi>=0.120.1,<=0.121.3
starlette>=0.49.1
uvicorn
setuptools<80
# FlashInfer source builds (--no-build-isolation) need packaging>=24.2 for setuptools license-expression validation
packaging>=24.2
ordered-set
peft>=0.18.1,<0.19.0
patchelf
Expand Down
4 changes: 1 addition & 3 deletions tensorrt_llm/_torch/speculative/sa_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ def forward(
# one-engine workers (dflash/eagle3); no-op for pure-attention
# models via the isinstance gate.
num_gens = batch_size - num_contexts
if num_gens > 0 and isinstance(
attn_metadata.kv_cache_manager, MambaHybridCacheManager
):
if num_gens > 0 and isinstance(attn_metadata.kv_cache_manager, MambaHybridCacheManager):
attn_metadata.kv_cache_manager.update_mamba_states(
attn_metadata=attn_metadata,
num_accepted_tokens=num_accepted_tokens,
Expand Down
Loading