Skip to content

Commit

Permalink
Fix typo of variable embed_tokem to embed_token in ov_phi3_vision…
Browse files Browse the repository at this point in the history
….py at `line 381` (#2374)

the original note write self.embed_token which is not existed.
self.embed_tokem should be used instead
  • Loading branch information
szeyu authored Sep 11, 2024
1 parent 92cce9b commit 3b7290b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebooks/phi-3-vision/ov_phi3_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def __init__(self, model_dir, device):
self.model = core.read_model(model_dir / "language_model.xml")
self.image_embed = core.compile_model(model_dir / "image_embed.xml", device)
self.img_projection = core.compile_model(model_dir / "img_projection.xml", device)
self.embed_tokem = core.compile_model(model_dir / "embed_token.xml", device)
self.embed_token = core.compile_model(model_dir / "embed_token.xml", device)
self.input_names = {key.get_any_name(): idx for idx, key in enumerate(self.model.inputs)}
self.output_names = {key.get_any_name(): idx for idx, key in enumerate(self.model.outputs)}
compiled_model = core.compile_model(self.model, device)
Expand Down Expand Up @@ -573,7 +573,7 @@ def vision_embed_tokens(
select = True
input_ids.clamp_min_(0).clamp_max_(self.config.vocab_size)

hidden_states = torch.from_numpy(self.embed_tokem(input_ids)[0])
hidden_states = torch.from_numpy(self.embed_token(input_ids)[0])
if select:
if hd_transform:
idx = 0
Expand Down

0 comments on commit 3b7290b

Please sign in to comment.