Instructions to use ehsanhon/my-finetuned-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use ehsanhon/my-finetuned-model with KerasHub:
import keras_hub # Load CausalLM model (optional: use half precision for inference) causal_lm = keras_hub.models.CausalLM.from_preset("hf://ehsanhon/my-finetuned-model", 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://ehsanhon/my-finetuned-model") - Keras
How to use ehsanhon/my-finetuned-model 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://ehsanhon/my-finetuned-model") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from ehsanhon/my-finetuned-model: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/ehsanhon/my-finetuned-model/resolve/main/README.md
- Command line
-
hf download hf://ehsanhon/my-finetuned-model/README.md
-
curl -L -o README.md https://huggingface.co/ehsanhon/my-finetuned-model/resolve/main/README.md
1.01 kB
| library_name: keras-hub | |
| pipeline_tag: text-generation | |
| This is a [`Gemma` model](https://keras.io/api/keras_hub/models/gemma) 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](https://huggingface.co/docs/hub/model-cards) for more information. | |