Instructions to use zeromodels/moonshine_tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/moonshine_tiny with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/moonshine_tiny") - Keras
How to use zeromodels/moonshine_tiny 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://zeromodels/moonshine_tiny") - Notebooks
- Google Colab
- Kaggle
Upload kf_config.json with huggingface_hub
Browse files- kf_config.json +5 -1
kf_config.json
CHANGED
|
@@ -23,6 +23,10 @@
|
|
| 23 |
"decoder_activation": "silu",
|
| 24 |
"layer_norm_eps": 1e-05,
|
| 25 |
"generate_args": {
|
| 26 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
}
|
|
|
|
| 23 |
"decoder_activation": "silu",
|
| 24 |
"layer_norm_eps": 1e-05,
|
| 25 |
"generate_args": {
|
| 26 |
+
"bos_token_id": 1,
|
| 27 |
+
"pad_token_id": 2,
|
| 28 |
+
"decoder_start_token_id": 1,
|
| 29 |
+
"eos_token_id": 2,
|
| 30 |
+
"max_length": 194
|
| 31 |
}
|
| 32 |
}
|