llama.cpp-sm70-cuda12.9 / source-local.patch
orwelian84's picture
llama.cpp f74e2fa for NVIDIA Volta (sm_70), CUDA 12.9 — released 2026-10-20 with the Q5_1 caveat stated
0b864c5 verified
Raw History Blame Contribute Delete
1.51 kB
diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp
index 2bc3a29..84c043b 100644
--- a/src/llama-graph.cpp
+++ b/src/llama-graph.cpp
@@ -1653,6 +1653,9 @@ ggml_tensor * llm_graph_context::build_lora_mm(
const float adapter_scale = lora.second;
const float scale = lw->get_scale(lora.first->alpha, adapter_scale);
+ if (scale == 0.0f) {
+ continue; // a resident adapter at scale 0 contributes nothing; skip its matmuls (Atlas 2026-10-16)
+ }
ggml_tensor * ab_cur = ggml_mul_mat(
ctx0, lw->b,
@@ -1703,6 +1706,9 @@ ggml_tensor * llm_graph_context::build_lora_mm_id(
const float alpha = lora.first->alpha;
const float rank = (float) lw->b->ne[0];
const float scale = alpha ? lora.second * alpha / rank : lora.second;
+ if (scale == 0.0f) {
+ continue; // skip a zero-scale adapter (Atlas 2026-10-16)
+ }
ggml_tensor * ab_cur = ggml_mul_mat_id(
ctx0, lw->b,
@@ -2650,6 +2656,9 @@ ggml_tensor * llm_graph_context::build_inp_embd(ggml_tensor * tok_embd, float to
const float adapter_scale = lora.second;
const float scale = lw->get_scale(lora.first->alpha, adapter_scale);
+ if (scale == 0.0f) {
+ continue; // skip a zero-scale adapter (Atlas 2026-10-16)
+ }
ggml_tensor * inpL_delta = ggml_scale(ctx0, ggml_mul_mat(
ctx0, lw->b, // non-transposed lora_b