We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4339ce commit 5e049adCopy full SHA for 5e049ad
keras_nlp/samplers/greedy.py
@@ -39,7 +39,6 @@ class Greedy(Sampler):
39
VOCAB_SIZE = 10
40
FEATURE_SIZE = 16
41
START_ID = 1
42
- END_ID = 2
43
44
# Create a dummy model to predict the next token.
45
model = keras.Sequential(
@@ -62,7 +61,7 @@ def token_probability_fn(inputs, mask):
62
61
63
sampler = keras_nlp.samplers.Greedy()
64
# Print the generated sequence (token ids).
65
- print(sampler(token_probability_fn, prompt, 10, end_token_id=END_ID))
+ print(sampler(token_probability_fn, prompt, 10))
66
```
67
"""
68
0 commit comments