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 metadata.json from ehsanhon/my-finetuned-model: direct link, hf CLI and curl.
- Browser
- Download file 184 Bytes
-
https://huggingface.co/ehsanhon/my-finetuned-model/resolve/main/metadata.json
- Command line
-
hf download hf://ehsanhon/my-finetuned-model/metadata.json
-
curl -L -o metadata.json https://huggingface.co/ehsanhon/my-finetuned-model/resolve/main/metadata.json
184 Bytes
| { | |
| "keras_version": "3.8.0", | |
| "keras_hub_version": "0.19.1", | |
| "parameter_count": 2506172416, | |
| "date_saved": "2025-03-04@17:03:19", | |
| "tasks": [ | |
| "CausalLM" | |
| ] | |
| } |