From 41b084abc65f9bb1e338cc3ef13696864d9a4912 Mon Sep 17 00:00:00 2001 From: Samaneh Saadat Date: Thu, 23 May 2024 19:33:19 +0000 Subject: [PATCH] Remove endoftext from the end of the prompt in the example. --- keras_nlp/src/models/falcon/falcon_causal_lm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keras_nlp/src/models/falcon/falcon_causal_lm.py b/keras_nlp/src/models/falcon/falcon_causal_lm.py index 3e0b83136..d8af2f964 100644 --- a/keras_nlp/src/models/falcon/falcon_causal_lm.py +++ b/keras_nlp/src/models/falcon/falcon_causal_lm.py @@ -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(