lora : allow 1d tensors

This commit is contained in:
slaren 2023-12-16 15:40:39 +01:00
parent 93b42fc99b
commit 3289eb0cb3

View file

@ -6372,7 +6372,7 @@ static int llama_apply_lora_from_file_internal(
fin.read_raw(&name_len, sizeof(name_len));
fin.read_raw(&ftype, sizeof(ftype));
if (n_dims != 2) {
if (n_dims != 1 && n_dims != 2) {
LLAMA_LOG_ERROR("%s: unsupported tensor dimension %d\n", __func__, n_dims);
return 1;
}