Skip to content

Commit

Permalink
Remove endoftext from the end of the prompt in the example.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamanehSaadat committed May 23, 2024
1 parent 316e122 commit 41b084a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keras_nlp/src/models/falcon/falcon_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ class FalconCausalLM(CausalLM):
Use `generate()` without preprocessing.
```python
prompt = {
# Token ids for "<|endoftext|> Keras is<|endoftext|>".
"token_ids": np.array([[50256, 17337, 292, 318, 50256, 0]] * 2),
# Token ids for "<|endoftext|> Keras is".
"token_ids": np.array([[50256, 17337, 292, 318]] * 2),
# Use `"padding_mask"` to indicate values that should not be overridden.
"padding_mask": np.array([[1, 1, 1, 1, 1, 0]] * 2),
"padding_mask": np.array([[1, 1, 1, 1]] * 2),
}
falcon_lm = keras_nlp.models.FalconCausalLM.from_preset(
Expand Down

0 comments on commit 41b084a

Please sign in to comment.