Skip to content

Commit 5e049ad

Browse files
small changes
1 parent d4339ce commit 5e049ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

keras_nlp/samplers/greedy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class Greedy(Sampler):
3939
VOCAB_SIZE = 10
4040
FEATURE_SIZE = 16
4141
START_ID = 1
42-
END_ID = 2
4342
4443
# Create a dummy model to predict the next token.
4544
model = keras.Sequential(
@@ -62,7 +61,7 @@ def token_probability_fn(inputs, mask):
6261
6362
sampler = keras_nlp.samplers.Greedy()
6463
# Print the generated sequence (token ids).
65-
print(sampler(token_probability_fn, prompt, 10, end_token_id=END_ID))
64+
print(sampler(token_probability_fn, prompt, 10))
6665
```
6766
"""
6867

0 commit comments

Comments
 (0)