dtype
This commit is contained in:
parent
b283a6bf08
commit
bc1746839c
2 changed files with 3 additions and 1 deletions
|
|
@ -509,6 +509,8 @@ def LlamaModel_fast_forward(
|
|||
if inputs_embeds is None:
|
||||
inputs_embeds = self.embed_tokens(input_ids)
|
||||
|
||||
inputs_embeds = inputs_embeds.to(self.config.torch_dtype)
|
||||
|
||||
# Normalized from Gemma
|
||||
IS_GEMMA = self.config.model_type == "gemma"
|
||||
train_embed_tokens = self.embed_tokens.weight.requires_grad
|
||||
|
|
@ -756,7 +758,6 @@ def CausalLM_fast_forward(fast_forward_inference):
|
|||
else:
|
||||
logits = self.lm_head(hidden_states)
|
||||
pass
|
||||
print(logits.dtype)
|
||||
|
||||
loss = None
|
||||
if labels is not None:
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ def MistralForCausalLM_fast_forward(
|
|||
else:
|
||||
logits = self.lm_head(hidden_states)
|
||||
pass
|
||||
print(logits.dtype)
|
||||
|
||||
loss = None
|
||||
if labels is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue