llama : make all KQ masks f16 if FA is used, remove zero attention bias, remove raw_k repeats in DeepSeek V4#25370
Conversation
…A is used and remove zero attention bias in DeepSeek V4
|
Would be nice if someone prepared f16 GGML_SET_ROWS for Metal, otherwise there will be performance regression on Macs after this PR. Unfortunately I have no access to the hardware and no experience with Metal at all. |
Taking a look |
|
@fairydreaming Feel free to cherry-pick this commit wherever it makes sense: d4a193e |
@ggerganov Thanks, backend ops tests for this are in #25344 (hopefully Vulkan tests will pass now and it will be ready to merge), so when #25344 is merged I'm going to create PR from your branch. Not adding it here, that would be against contributing guidelines. 😱 |
…ream in DeepSeek V4 - no longer needed as raw_k is always non-unified.
Overview
This PR removes the following skeletons from DeepSeek V4 closet:
dsv4_repeat_streams()that repeatsraw_kcache for each stream, as both raw_k and compressed caches are always non-unified it's no longer needed,kq_bbias tensors that were causing OOM errors like this:Needs #25351, #25344, #25367, #25434
Additional information
I still don't understand why constructs like:
were needed at all and why the bias tensors were only created if not
so that means they were created if:
My head hurts when I think about what was the purpose. @am17an let me know if that breaks anything.
Tested the code with all combinations of FA and kv_unified, seems to work just fine. Performance is slightly improved.
Requirements