[Phi] bias should be True (#35650)

bias should be True
This commit is contained in:
Arthur 2025-01-13 13:15:07 +01:00 committed by GitHub
parent 91f14f1fc4
commit 87089176d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -727,7 +727,7 @@ class PhiForCausalLM(PhiPreTrainedModel, GenerationMixin):
super().__init__(config)
self.model = PhiModel(config)
self.vocab_size = config.vocab_size
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=True)
# Initialize weights and apply final processing
self.post_init()

View File

@ -284,7 +284,9 @@ class PhiModel(LlamaModel):
class PhiForCausalLM(LlamaForCausalLM):
pass
def __init__(self, config):
super().__init__(config)
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=True)
class PhiForSequenceClassification(LlamaForSequenceClassification):