microsoft / microsoft/MInference
[Question]: Some questions on the code
@iofu728 is already working on this.
Since Jul 5, 2024.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 82
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
Describe the issue
Hi, thanks for your great work!
I have some questions about your code:
-
In search_pattern, the search space is different from Table.6 in the paper? And the search space is generated base on the fixed FLOPs?
-
In the following code snippets of
search_pattern, everybest_tyis reassigned to "vertical_and_slash", so onlyvertical_slash_sparse_attentionwill be called? Besides, forbest_ty == "block_sparse", where does the magic number1000and6096come from?
if best_ty == "stream_llm": best_ty = "vertical_and_slash" if best_ty == "block_sparse": best_ty, best_v, best_s = "vertical_and_slash", 1000, 6096
- In the paper, you mentioned one sample is enough to capture the pattern for different prompts with different lengths, any support for that?
we use only one sample as our validation set from KV retrieval synthetic data with 30k token inputs, which exhibits strong generalization and stability across different lengths and domains.
Besides, I think I might find a bug when I run examples/run_hf_streaming.sh with Qwen2-7B-Instruct. In apply_rotary_embed_single, you need to enable position_ids since q_len == 1 during decoding stage. I change the code into cos = cos[position_ids] sin = sin[position_ids] and it's fine now.
A bit wordy... Looking forward to your reply!
### Tasks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.