From e8dc8c5d3917844cf7e125b35f910d775d028a4c Mon Sep 17 00:00:00 2001 From: RenuPatelGoogle <89264621+RenuPatelGoogle@users.noreply.github.com> Date: Fri, 13 Dec 2024 00:13:01 +0530 Subject: [PATCH] PaliGemma model Code Correction: Model Name & Documentation Link (#544) * PaliGemma Code Correction: Model Name & Documentation Link Typo: Fixed the model name in the code - `paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset("paligemma_3b_mix_224")` from "paligemma_3b_mix_224" to "pali_gemma_3b_mix_224" to correctly laod the model. Broken Link: Updated the URL for "PaliGemma prompt and system instructions" by replacing the existing URL with the https://ai.google.dev/gemma/docs/paligemma/prompt-system-instructions/##prompt_task_syntax. * Update inference-with-keras.ipynb Fixed problem with "View on" button from lint report --------- Co-authored-by: Joe Fernandez --- site/en/gemma/docs/paligemma/inference-with-keras.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/en/gemma/docs/paligemma/inference-with-keras.ipynb b/site/en/gemma/docs/paligemma/inference-with-keras.ipynb index 43b5498ab..6500d9fce 100644 --- a/site/en/gemma/docs/paligemma/inference-with-keras.ipynb +++ b/site/en/gemma/docs/paligemma/inference-with-keras.ipynb @@ -51,7 +51,7 @@ "\n", "\n", "\n", "
\n", - "View on ai.google.dev\n", + "View on ai.google.dev\n", "\n", "Run in Google Colab\n", @@ -260,7 +260,7 @@ }, "outputs": [], "source": [ - "paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"paligemma_3b_mix_224\")\n", + "paligemma = keras_hub.models.PaliGemmaCausalLM.from_preset(\"pali_gemma_3b_mix_224\")\n", "paligemma.summary()" ] }, @@ -393,7 +393,7 @@ "source": [ "## Generate output\n", "\n", - "After loading the model and creating utility methods, you can prompt the model with image and text data to generate a responses. PaliGemma models are trained with specific prompt syntax for specific tasks, such as `answer`, `caption`, and `detect`. For more information about PaliGemma prompt task syntax, see [PaliGemma prompt and system instructions](https://ai.google.com/gemma/docs/paligemma/prompt-system-instructions##prompt_task_syntax).\n", + "After loading the model and creating utility methods, you can prompt the model with image and text data to generate a responses. PaliGemma models are trained with specific prompt syntax for specific tasks, such as `answer`, `caption`, and `detect`. For more information about PaliGemma prompt task syntax, see [PaliGemma prompt and system instructions](https://ai.google.dev/gemma/docs/paligemma/prompt-system-instructions##prompt_task_syntax).\n", "\n", "Prepare an image for use in a generation prompt by using the following code to load a test image into an object:" ]