[XPU] Fix Eagle3 initialization on XPU (#43957)
Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
co-authored by
Andreas Karatzas
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Kunshang Ji
parent
78a04c208d
commit
d2ec433e37
@@ -233,7 +233,10 @@ class LlamaModel(nn.Module):
|
||||
) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
if input_embeds is None:
|
||||
input_embeds = self.embed_input_ids(input_ids)
|
||||
assert hidden_states.shape[-1] == input_embeds.shape[-1]
|
||||
torch._assert(
|
||||
hidden_states.shape[-1] == input_embeds.shape[-1],
|
||||
"hidden_states and input_embeds must have the same last dimension",
|
||||
)
|
||||
|
||||
residual = None
|
||||
for layer in self.layers:
|
||||
|
||||
Reference in New Issue
Block a user