Skip to content

Commit 289df63

Browse files
committed
get eos token from model config.
1 parent 444bf42 commit 289df63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

moonshine/run_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def benchmark(batch, min_new_tokens=None):
5050
output_mask = torch.arange(pred_ids.shape[-1]).repeat((pred_ids.shape[0], 1)).to(args.device)
5151
output_mask = output_mask > max_new_tokens
5252

53-
eot_token = 2
53+
eot_token = model.config.eos_token_id
5454
pred_ids.masked_fill(output_mask, eot_token)
5555

5656
# 3.2 Convert token ids to text transcription

0 commit comments

Comments
 (0)