Commit 4adcfe7
[Opt] GsaOnDevice cuda bugfix & optimization (#659)
<!-- Thanks for sending a pull request!
BEFORE SUBMITTING, PLEASE READ OUR OFFICIAL WEBSITE.
-->
# Purpose
What this PR does / why we need it?
1、GsaOnDevice bugfix & optimization
2、Update vllm-adapt-sparse.patch
<!--
- Please clarify what changes you are proposing. The purpose of this
section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster
reviews in your PR.
- Please clarify why the changes are needed. For instance, the use case
and bug description.
- Fixes #
-->
# Modifications
Does this PR introduce _any_ user-facing change?
- Decode metadata (decode_req_ids, block_table_decode, decode_seq_lens)
are constructed in build_sparse_meta
- On external prefix-cache hits, prefix_slot_mapping and
prefix_block_ids are rebuilt to ensure that k_hash computation covers
the full required prefix
- Decode-only batches are optimized using tensor slicing
<!--
Note that it means *any* user-facing change including all aspects such
as API, interface or other behavior changes.
Documentation-only updates are not considered user-facing changes.
-->
# Test
How was this patch tested?
export MODEL_PATH="/home/models/Qwen3-Coder-30B-A3B-Instruct-FP8"
export VLLM_HASH_ATTENTION=1
python examples/offline_inference_gsaondevice.py
<img width="1315" height="350" alt="image"
src="https://github.com/user-attachments/assets/b42e8db7-de25-4e01-afc0-aabfbef023d7"
/>
<!--
CI passed with new added/existing test.
If it was tested in a way different from regular unit tests, please
clarify how you tested step by step, ideally copy and paste-able, so
that other reviewers can test and check, and descendants can verify in
the future.
If tests were not added, please describe why they were not added and/or
why it was difficult to add.
-->
---------
Co-authored-by: AooooooA-C <chenaozhu@outlook.com>1 parent 6746f8b commit 4adcfe7
5 files changed
Lines changed: 700 additions & 390 deletions
File tree
- ucm
- integration/vllm/patch/0.11.0
- sparse
- esa
- gsa_on_device
- configs
0 commit comments