Instructions to use keras/gpt_oss_120b_en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/gpt_oss_120b_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/gpt_oss_120b_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/gpt_oss_120b_en") - Keras
How to use keras/gpt_oss_120b_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/gpt_oss_120b_en") - Notebooks
- Google Colab
- Kaggle
Ctrl+K
- assets
- 1.52 kB
- 3.64 kB
- 913 Bytes
- 192 Bytes
- 42.1 kB
- 13.2 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 12.9 GB xet
- 4.25 GB xet
- 1.47 kB
- 3.24 kB
- 631 Bytes