Commit 5917b39ff for llama.cpp
commit 5917b39ff7b58a808eced9d5c3d63b06f57d6972
Author: Sergio Sánchez Vallés <serindio@gmail.com>
Date: Wed Nov 25 20:49:09 2026 +0100
convert : map the Inkling-2 LoRA tensor names (#33055)
PEFT names the wrapped projections (self_attn.k_proj.linear.weight) and the attention output gate (self_attn.o_proj.gate_proj.weight); neither is in the Inkling-2 tensor map, so convert_lora_to_gguf.py stops with 'Can not map tensor'. Strip the .linear. segment and map the gate to ATTN_GATE.
Co-authored-by: Sergio Sanchez <sergiosv96@users.noreply.github.com>
diff --git a/conversion/inkling2.py b/conversion/inkling2.py
index 16f030619..3b4b140e3 100644
--- a/conversion/inkling2.py
+++ b/conversion/inkling2.py
@@ -248,6 +248,12 @@ class Inkling2Model(TextModel):
return super().tensor_force_quant(name, new_name, bid, n_dims)
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
+ # PEFT names the wrapped projections (self_attn.k_proj.linear.weight) and the attention
+ # output gate (self_attn.o_proj.gate_proj.weight); neither is in the tensor map.
+ name = name.replace(".linear.", ".")
+ if name.endswith(".o_proj.gate_proj.weight"):
+ yield self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_GATE, bid), data_torch
+ return
if name in self._packed_experts:
target = name.replace(".w13_weight", ".gate_up_proj").replace(".w2_weight", ".down_proj")
yield self.map_tensor_name(target, try_suffixes=()) + ".weight", cast("Tensor", self._packed_experts[name])