Instructions to use keras/phi3_mini_4k_instruct_en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/phi3_mini_4k_instruct_en with KerasHub:
import keras_hub # Load CausalLM model (optional: use half precision for inference) causal_lm = keras_hub.models.CausalLM.from_preset("hf://keras/phi3_mini_4k_instruct_en", 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://keras/phi3_mini_4k_instruct_en") - Keras
How to use keras/phi3_mini_4k_instruct_en with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://keras/phi3_mini_4k_instruct_en") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ Weights are released under the [MIT License](https://opensource.org/license/mit)
|
|
| 8 |
|
| 9 |
## Links
|
| 10 |
|
| 11 |
-
* [Phi-3 Quickstart Notebook](https://www.kaggle.com/code/
|
| 12 |
* [Phi-3 API Documentation](https://keras.io/api/keras_hub/models/phi3/)
|
| 13 |
* [Phi-3 Model Card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)
|
| 14 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
@@ -20,7 +20,7 @@ Keras and KerasHub can be installed with:
|
|
| 20 |
|
| 21 |
```
|
| 22 |
pip install -U -q keras-hub
|
| 23 |
-
pip install -U -q keras
|
| 24 |
```
|
| 25 |
|
| 26 |
Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instruction on installing them in another environment see the [Keras Getting Started](https://keras.io/getting_started/) page.
|
|
|
|
| 8 |
|
| 9 |
## Links
|
| 10 |
|
| 11 |
+
* [Phi-3 Quickstart Notebook](https://www.kaggle.com/code/laxmareddypatlolla/phi-3-quickstart)
|
| 12 |
* [Phi-3 API Documentation](https://keras.io/api/keras_hub/models/phi3/)
|
| 13 |
* [Phi-3 Model Card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)
|
| 14 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
|
|
| 20 |
|
| 21 |
```
|
| 22 |
pip install -U -q keras-hub
|
| 23 |
+
pip install -U -q keras
|
| 24 |
```
|
| 25 |
|
| 26 |
Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instruction on installing them in another environment see the [Keras Getting Started](https://keras.io/getting_started/) page.
|