Allow key prefix for lm_head (Gemma3)

This commit is contained in:
turboderp
2025-03-14 23:16:51 +01:00
parent 4844f3873c
commit 4b5dbecdc1

View File

@@ -145,7 +145,7 @@ class ExLlamaV2:
normalize_unq = bool(cfg.norm_head)
)
if archparams.keys["lm_head"] != "lm_head":
head.alt_key = archparams.keys["lm_head"]
head.alt_key = cfg.arch.lm_prefix + archparams.keys["lm_head"]
self.modules += [head]
# Compile dictionary of modules