mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-10-28 09:45:55 +08:00
Enable tied weights with shared scales
This commit is contained in:
1 parent
3cb743d38c
commit
f8999caf78
1 file changed
+2
-2
+2
-2
@@ -1871,11 +1871,11 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
|
||||
// output scales
|
||||
if (output) {
|
||||
// weight scale
|
||||
if (!output_s) {
|
||||
if (!output_s && gguf_find_tensor(ml.metadata, tn(LLM_TENSOR_OUTPUT, "scale").str().c_str()) >= 0) {
|
||||
output_s = create_tensor(tn(LLM_TENSOR_OUTPUT, "scale"), {1}, TENSOR_NOT_REQUIRED);
|
||||
}
|
||||
// input scale
|
||||
if (!output_in_s) {
|
||||
if (!output_in_s && gguf_find_tensor(ml.metadata, tn(LLM_TENSOR_OUTPUT, "input_scale").str().c_str()) >= 0) {
|
||||
output_in_s = create_tensor(tn(LLM_TENSOR_OUTPUT, "input_scale"), {1}, TENSOR_NOT_REQUIRED);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user