Repository navigation
model: use ggml_rope_set_offset() - #27382
Conversation
CISC
left a comment
There was a problem hiding this comment.
Can't this be applied to deepseek2, deepseek32, glm-dsa and kimi-k3/linear MLA as well?
|
Upon closer look, unfortunately some models still genuinely need concat, this is because the logic looks like this: q_nope = ggml_permute(ctx0, q_nope, 0, 2, 1, 3);
ggml_tensor * q_nope_absorbed = ggml_mul_mat(ctx0, layer.wk_b, q_nope);
q_nope_absorbed = ggml_permute(ctx0, q_nope_absorbed, 0, 2, 1, 3);
ggml_tensor * Q = ggml_concat(ctx0, q_nope_absorbed, q_pe, 0);While it's still An interesting finding though, kimi-k3 doesn't use rope at all, despite using the term "rope" in variable name, likely because that part of code is copied from deepseek MLA. Added this to docs:
|
* model: use ggml_rope_set_offset() * partially apply to deepseek2
|
Looks like this change increased compute buffer sizes, added some logs with galloc debug info in #27680 |
|
@ngxson On a different note - shouldn't |
hi will it solve the unnnerrry buffer size issues if i remove this pr from the main because i have 4 gbu and i cant use it properly due to this uneven buffer size issues |
* model: use ggml_rope_set_offset() * partially apply to deepseek2
* model: use ggml_rope_set_offset() * partially apply to deepseek2
* model: use ggml_rope_set_offset() * partially apply to deepseek2
* model: use ggml_rope_set_offset() * partially apply to deepseek2
Overview
Supersede #27091
May depend on #27345
Tested with deepseekv4 gguf and confirmed to output bit-exact as master
Requirements