memory : copy Hadamard matrix to k_rot tensor only if it has buffer assigned to prevent crashes during context shift of unquantized K cache (#27967)
Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com> Co-authored-by: AesSedai <7980540+AesSedai@users.noreply.github.com>
This commit is contained in:
co-authored by
Stanisław Szymczyk
AesSedai
parent
57291f2644
commit
bdf3955159
@@ -2034,7 +2034,7 @@ void llm_graph_input_k_shift::set_input(const llama_ubatch * ubatch) {
|
|||||||
kv_self->set_input_k_shift(k_shift);
|
kv_self->set_input_k_shift(k_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k_rot) {
|
if (k_rot && k_rot->buffer) {
|
||||||
kv_self->set_input_k_rot(k_rot);
|
kv_self->set_input_k_rot(k_rot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user