Conversion: prefer rewrite to mapping

This commit is contained in:
Pedro Cuenca
2026-08-10 11:39:04 +02:00
parent c8ee4945b1
commit a92d0ac584
2 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -172,6 +172,8 @@ class MuseGlimmerAssistantModel(TextModel):
self.gguf_writer.add_sliding_window_pattern([t == "sliding_attention" for t in h["layer_types"]])
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
# DFlash defaults to NEOX (rotate_half) rope, matching transformers HF layout for Q/K, QK-norms
# no permutation needed.
if name == "encoder.fc.weight":
name = "model.fc.weight"
elif name == "encoder.output_norm_enc.weight":
name = "model.hidden_norm.weight"
yield (self.map_tensor_name(name), data_torch)
+1 -3
View File
@@ -1298,12 +1298,10 @@ class TensorNameMap:
"encoder.final_layer_norm", # t5
"layer_norm", # neobert
"model.hidden_norm", # dflash
"encoder.output_norm_enc", # dflash (transformers MuseGlimmerAssistant)
),
MODEL_TENSOR.FC: (
"model.fc", # dflash
"encoder.fc", # dflash (transformers MuseGlimmerAssistant)
"model.fc", # dflash
),
MODEL_TENSOR.DSPARK_MARKOV_W1: (