Skip to content

Commit

Permalink
fix rebase and CI
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Zhentao <[email protected]>
  • Loading branch information
zhentaoyu committed Dec 4, 2024
1 parent 1a70b12 commit 6f12c92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions optimum/habana/transformers/generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
# Initial generated token index is set to 1 to accomodate SOS (start of string) token.
INITIAL_TOKEN_IDX = 1

logging.set_verbosity_info()
logger = logging.get_logger(__name__)


Expand Down
3 changes: 3 additions & 0 deletions optimum/habana/transformers/models/modeling_all_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def allocate(self, inp_seq_len, dtype, device, shape):

@staticmethod
def update(prev, cur, dim, idx, inp_seq_len):
cur = cur.to(prev.device)
if idx is not None:
idx = idx.to(prev.device)
orig_cur = cur
if prev.shape == cur.shape:
prev.copy_(cur)
Expand Down

0 comments on commit 6f12c92

Please sign in to comment.