We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e444b8e commit b37af14Copy full SHA for b37af14
src/llama.cpp
@@ -2632,9 +2632,8 @@ static struct ggml_tensor * llm_build_lora_mm(
2632
if (lora == nullptr) {
2633
continue;
2634
}
2635
- const float alpha = it.first->alpha;
2636
- const float rank = (float) lora->b->ne[0];
2637
- const float scale = alpha ? it.second * alpha / rank : it.second;
+ const float adapter_scale = it.second;
+ const float scale = lora->get_scale(it.first->alpha, adapter_scale);
2638
struct ggml_tensor * ab_cur = ggml_mul_mat(
2639
ctx0, lora->b,
2640
ggml_mul_mat(ctx0, lora->a, cur)
0 commit comments