File size: 1,514 Bytes
0b864c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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