Instructions to use laxmareddyp/gemma-2b-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use laxmareddyp/gemma-2b-finetune with KerasHub:
import keras_hub # Load CausalLM model (optional: use half precision for inference) causal_lm = keras_hub.models.CausalLM.from_preset("hf://laxmareddyp/gemma-2b-finetune", dtype="bfloat16") causal_lm.compile(sampler="greedy") # (optional) specify a sampler # Generate text causal_lm.generate("Keras: deep learning for", max_length=64)import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://laxmareddyp/gemma-2b-finetune") - Keras
How to use laxmareddyp/gemma-2b-finetune with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://laxmareddyp/gemma-2b-finetune") - Notebooks
- Google Colab
- Kaggle
This is a Gemma model uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
This model is related to a CausalLM task.
Model config:
- name: gemma_backbone
- trainable: True
- vocabulary_size: 256000
- num_layers: 18
- num_query_heads: 8
- num_key_value_heads: 1
- hidden_dim: 2048
- intermediate_dim: 32768
- head_dim: 256
- layer_norm_epsilon: 1e-06
- dropout: 0
- query_head_dim_normalize: True
- use_post_ffw_norm: False
- use_post_attention_norm: False
- final_logit_soft_cap: None
- attention_logit_soft_cap: None
- sliding_window_size: 4096
- use_sliding_window_attention: False
This model card has been generated automatically and should be completed by the model author. See Model Cards documentation for more information.
- Downloads last month
- 5