[Bugfix] Transformers backend: apply learned lm_head.bias for tied-embedding models (#46835)

Signed-off-by: John Langford <jl@hunch.net>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
John
2026-06-29 08:59:15 +00:00
committed by GitHub
co-authored by Harry Mellor
parent 9e86352c60
commit 0e207dac78
3 changed files with 26 additions and 15 deletions
@@ -640,10 +640,7 @@ class Base(
return hidden_states, aux_hidden_states
return hidden_states
def load_weights(
self,
weights: Iterable[tuple[str, torch.Tensor]],
) -> set[str]:
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
loader = AutoWeightsLoader(
self,
skip_prefixes=self.skip_prefixes,