From 567adad482b41a4b7bcd1e48c1cf905881afcbad Mon Sep 17 00:00:00 2001 From: Siva Sravana Kumar Neeli <113718461+sineeli@users.noreply.github.com> Date: Wed, 22 May 2024 11:07:15 -0700 Subject: [PATCH 1/3] extra argument in save_to_preset (#1634) In save_to_preset the whole object model object is getting passed --- tools/checkpoint_conversion/convert_llama_checkpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/checkpoint_conversion/convert_llama_checkpoints.py b/tools/checkpoint_conversion/convert_llama_checkpoints.py index 27be78901b..b91dd51d1b 100644 --- a/tools/checkpoint_conversion/convert_llama_checkpoints.py +++ b/tools/checkpoint_conversion/convert_llama_checkpoints.py @@ -257,7 +257,7 @@ def main(_): test_model(keras_nlp_model, keras_nlp_tokenizer, hf_model, hf_tokenizer) print("\n-> Tests passed!") - keras_nlp_model.save_to_preset(keras_nlp_model, preset) + keras_nlp_model.save_to_preset(preset) print("\n-> Saved the model preset in float16") # === Save the tokenizer === From 2b2edc10bb6f5583155d680345993e139ba4ed21 Mon Sep 17 00:00:00 2001 From: Samaneh Saadat Date: Wed, 22 May 2024 18:08:19 -0700 Subject: [PATCH 2/3] Fix a typo in CausalLM error handling. (#1647) --- keras_nlp/src/models/causal_lm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keras_nlp/src/models/causal_lm.py b/keras_nlp/src/models/causal_lm.py index 3493532e2c..c24150041e 100644 --- a/keras_nlp/src/models/causal_lm.py +++ b/keras_nlp/src/models/causal_lm.py @@ -352,9 +352,9 @@ def generate( raise ValueError( 'A `preprocessor` must be attached to the model if `stop_token_ids="auto"`. ' "Currently `preprocessor=None`. To call `generate()` with preprocessing " - "detached, either pass `stop_tokens_ids=None` to always generate until " + "detached, either pass `stop_token_ids=None` to always generate until " "`max_length` or pass a tuple of token ids that should terminate generation " - "as `stop_tokens_ids`." + "as `stop_token_ids`." ) elif stop_token_ids == "auto": stop_token_ids = [self.preprocessor.tokenizer.end_token_id] From 0bf204d80c73f14bf789582e2b44dead8e9021a3 Mon Sep 17 00:00:00 2001 From: Matt Watson <1389937+mattdangerw@users.noreply.github.com> Date: Wed, 22 May 2024 18:08:44 -0700 Subject: [PATCH 3/3] Fix a typo in phi3 metadata (#1646) --- keras_nlp/src/models/phi3/phi3_presets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras_nlp/src/models/phi3/phi3_presets.py b/keras_nlp/src/models/phi3/phi3_presets.py index 48ea0c1994..0f935d3371 100644 --- a/keras_nlp/src/models/phi3/phi3_presets.py +++ b/keras_nlp/src/models/phi3/phi3_presets.py @@ -22,7 +22,7 @@ "model. The model was trained using the Phi-3 datasets. This " "dataset includes both synthetic data and filtered publicly " "available website data, with an emphasis on high-quality and " - "reasoning-dense properties.", + "reasoning-dense properties." ), "params": 3821079552, "official_name": "Phi-3",