Instructions to use google/gemma-1.1-2b-it-keras with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use google/gemma-1.1-2b-it-keras with KerasHub:
import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://google/gemma-1.1-2b-it-keras") - Keras
How to use google/gemma-1.1-2b-it-keras with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://google/gemma-1.1-2b-it-keras") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from google/gemma-1.1-2b-it-keras: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/google/gemma-1.1-2b-it-keras/resolve/main/README.md
- Command line
-
hf download hf://google/gemma-1.1-2b-it-keras/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/google/gemma-1.1-2b-it-keras/resolve/main/README.md
2.16 kB
| library_name: keras-hub | |
| license: gemma | |
| license_link: https://ai.google.dev/gemma/terms | |
| pipeline_tag: text-generation | |
| extra_gated_heading: Access Gemma 1.1 on Hugging Face | |
| extra_gated_prompt: To access Gemma 1.1 on Hugging Face, you’re required to review | |
| and agree to Google’s usage license. To do this, please ensure you’re logged-in | |
| to Hugging Face and click below. Requests are processed immediately. | |
| extra_gated_button_content: Acknowledge license | |
| # Gemma 1.1 | |
| **Google Model Page**: [Gemma](https://ai.google.dev/gemma/docs) | |
| This model card corresponds to the latest 2B instruct version of the Gemma 1.1 model in Keras. | |
| Keras models can be used with JAX, PyTorch or TensorFlow as numerical backends. | |
| JAX, with its support for SPMD model paralellism, is recommended for large models. | |
| For more information: [distributed training with Keras and JAX](https://keras.io/guides/distribution/). | |
| You can find other models in the Gemma family here: | |
| | | Base | Instruct | | |
| |----|----------------------------------------------------|----------------------------------------------------------------------| | |
| | 2B | [gemma-2b-keras](https://huggingface.co/google/gemma-2b-keras) | [**gemma-1.1-2b-it-keras**](https://huggingface.co/google/gemma-1.1-2b-it-keras) | | |
| | 7B | [gemma-7b-keras](https://huggingface.co/google/gemma-7b-keras) | [gemma-1.1-7b-it-keras](https://huggingface.co/google/gemma-1.1-7b-it-keras) | | |
| For more information about the model, visit https://huggingface.co/google/gemma-1.1-2b-it. | |
| Model Page | |
| : [Gemma](https://ai.google.dev/gemma/docs/gemma) | |
| Resources and Technical Documentation | |
| : [Technical Report](https://goo.gle/gemma) | |
| : [Responsible Generative AI Toolkit](https://ai.google.dev/responsible) | |
| Terms of Use | |
| : [Terms](https://www.kaggle.com/models/google/gemma/license/consent/verify/huggingface?returnModelRepoId=google/gemma-1.1-2b-it-keras) | |
| Authors | |
| ## Loading the model | |
| ```python | |
| import keras_nlp | |
| gemma_lm = keras_nlp.models.GemmaCausalLM.from_preset("hf://google/gemma-1.1-2b-it-keras") | |
| ``` |