Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

Commit 014acb7

Browse files
1B working in GPUs now
1 parent 4feeab6 commit 014acb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎gemma/model.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def generate(
677677
curr_local_mask_tensor = local_mask_tensor.index_select(
678678
2, input_positions_tensor
679679
) if local_mask_tensor is not None else None
680-
output_positions_tensor = torch.LongTensor([min_prompt_len - 1], device=device)
680+
output_positions_tensor = torch.LongTensor([min_prompt_len - 1]).to(device)
681681
temperatures_tensor = None if not temperature else torch.FloatTensor(
682682
[temperature] * batch_size).to(device)
683683
top_ps_tensor = torch.FloatTensor([top_p] * batch_size).to(device)

0 commit comments

Comments
 (0)