keras-hub-nightly 0.23.0.dev202510080414__py3-none-any.whl → 0.24.0.dev202511080419__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. keras_hub/layers/__init__.py +6 -0
  2. keras_hub/models/__init__.py +36 -0
  3. keras_hub/src/layers/modeling/reversible_embedding.py +6 -0
  4. keras_hub/src/models/causal_lm.py +5 -0
  5. keras_hub/src/models/depth_anything/depth_anything_presets.py +38 -1
  6. keras_hub/src/models/dinov2/dinov2_layers.py +3 -1
  7. keras_hub/src/models/dinov3/__init__.py +5 -0
  8. keras_hub/src/models/dinov3/dinov3_backbone.py +263 -0
  9. keras_hub/src/models/dinov3/dinov3_image_converter.py +8 -0
  10. keras_hub/src/models/dinov3/dinov3_layers.py +1013 -0
  11. keras_hub/src/models/dinov3/dinov3_presets.py +4 -0
  12. keras_hub/src/models/gemma/gemma_presets.py +22 -0
  13. keras_hub/src/models/gemma3/gemma3_presets.py +39 -0
  14. keras_hub/src/models/image_to_image.py +5 -0
  15. keras_hub/src/models/inpaint.py +5 -0
  16. keras_hub/src/models/mobilenetv5/__init__.py +9 -0
  17. keras_hub/src/models/mobilenetv5/mobilenetv5_attention.py +699 -0
  18. keras_hub/src/models/mobilenetv5/mobilenetv5_backbone.py +396 -0
  19. keras_hub/src/models/mobilenetv5/mobilenetv5_blocks.py +890 -0
  20. keras_hub/src/models/mobilenetv5/mobilenetv5_builder.py +436 -0
  21. keras_hub/src/models/mobilenetv5/mobilenetv5_image_classifier.py +157 -0
  22. keras_hub/src/models/mobilenetv5/mobilenetv5_image_classifier_preprocessor.py +16 -0
  23. keras_hub/src/models/mobilenetv5/mobilenetv5_image_converter.py +10 -0
  24. keras_hub/src/models/mobilenetv5/mobilenetv5_layers.py +462 -0
  25. keras_hub/src/models/mobilenetv5/mobilenetv5_presets.py +15 -0
  26. keras_hub/src/models/mobilenetv5/mobilenetv5_utils.py +146 -0
  27. keras_hub/src/models/parseq/__init__.py +5 -0
  28. keras_hub/src/models/parseq/parseq_presets.py +15 -0
  29. keras_hub/src/models/qwen3_moe/__init__.py +5 -0
  30. keras_hub/src/models/qwen3_moe/qwen3_moe_presets.py +30 -0
  31. keras_hub/src/models/siglip/siglip_presets.py +15 -0
  32. keras_hub/src/models/smollm3/smollm3_backbone.py +211 -0
  33. keras_hub/src/models/smollm3/smollm3_causal_lm.py +310 -0
  34. keras_hub/src/models/smollm3/smollm3_causal_lm_preprocessor.py +84 -0
  35. keras_hub/src/models/smollm3/smollm3_layers.py +757 -0
  36. keras_hub/src/models/smollm3/smollm3_tokenizer.py +60 -0
  37. keras_hub/src/models/smollm3/smollm3_utils.py +56 -0
  38. keras_hub/src/models/stable_diffusion_3/stable_diffusion_3_presets.py +3 -3
  39. keras_hub/src/models/text_to_image.py +5 -0
  40. keras_hub/src/utils/preset_utils.py +9 -2
  41. keras_hub/src/utils/tensor_utils.py +3 -1
  42. keras_hub/src/utils/timm/convert_mobilenetv5.py +321 -0
  43. keras_hub/src/utils/timm/preset_loader.py +8 -4
  44. keras_hub/src/utils/transformers/convert_dinov3.py +106 -0
  45. keras_hub/src/utils/transformers/convert_smollm3.py +139 -0
  46. keras_hub/src/utils/transformers/preset_loader.py +6 -0
  47. keras_hub/src/version.py +1 -1
  48. keras_hub/tokenizers/__init__.py +6 -0
  49. {keras_hub_nightly-0.23.0.dev202510080414.dist-info → keras_hub_nightly-0.24.0.dev202511080419.dist-info}/METADATA +1 -1
  50. {keras_hub_nightly-0.23.0.dev202510080414.dist-info → keras_hub_nightly-0.24.0.dev202511080419.dist-info}/RECORD +52 -24
  51. {keras_hub_nightly-0.23.0.dev202510080414.dist-info → keras_hub_nightly-0.24.0.dev202511080419.dist-info}/WHEEL +0 -0
  52. {keras_hub_nightly-0.23.0.dev202510080414.dist-info → keras_hub_nightly-0.24.0.dev202511080419.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,4 @@
1
+ """DINOV3 model preset configurations."""
2
+
3
+ # Metadata for loading pretrained model weights.
4
+ backbone_presets = {}
@@ -206,4 +206,26 @@ backbone_presets = {
206
206
  },
207
207
  "kaggle_handle": "kaggle://keras/vaultgemma/keras/vault_gemma_1b_en/2",
208
208
  },
209
+ "c2s_scale_gemma_2_2b_en": {
210
+ "metadata": {
211
+ "description": (
212
+ "A 2 billion parameter, single-cell biology-aware model "
213
+ "built on the Gemma-2 architecture."
214
+ ),
215
+ "params": 2614341888,
216
+ "path": "gemma",
217
+ },
218
+ "kaggle_handle": "kaggle://keras/cell2sentence/keras/c2s_scale_gemma_2_2b_en/1",
219
+ },
220
+ "c2s_scale_gemma_2_27b_en": {
221
+ "metadata": {
222
+ "description": (
223
+ "A 27 billion parameter, single-cell biology-aware model "
224
+ "built on the Gemma-2 architecture."
225
+ ),
226
+ "params": 27227128320,
227
+ "path": "gemma",
228
+ },
229
+ "kaggle_handle": "kaggle://keras/cell2sentence/keras/c2s_scale_gemma_2_27b_en/1",
230
+ },
209
231
  }
@@ -181,4 +181,43 @@ backbone_presets = {
181
181
  },
182
182
  "kaggle_handle": "kaggle://keras/gemma3/keras/gemma3_instruct_270m/4",
183
183
  },
184
+ "medgemma_instruct_4b": {
185
+ "metadata": {
186
+ "description": (
187
+ "A 4 billion parameter model based on Gemma 3. "
188
+ "This model is trained for performance on medical text"
189
+ "and image comprehension and is optimized for medical"
190
+ "applications that involve a text generation component."
191
+ ),
192
+ "params": 4300079472,
193
+ "path": "gemma3",
194
+ },
195
+ "kaggle_handle": "kaggle://keras/medgemma/keras/medgemma_instruct_4b/1",
196
+ },
197
+ "medgemma_instruct_27b": {
198
+ "metadata": {
199
+ "description": (
200
+ "A 27 billion parameter model based on Gemma 3. "
201
+ "This model trained for performance on medical text "
202
+ "and image comprehension and is optimized for medical "
203
+ "applications that involve a text generation component."
204
+ ),
205
+ "params": 27432406640,
206
+ "path": "gemma3",
207
+ },
208
+ "kaggle_handle": "kaggle://keras/medgemma/keras/medgemma_instruct_27b/1",
209
+ },
210
+ "medgemma_instruct_27b_text": {
211
+ "metadata": {
212
+ "description": (
213
+ "A 27 billion parameter text-only model based on Gemma 3. "
214
+ "This model is trained for performance on medical text "
215
+ "comprehension and is optimized for medical applications "
216
+ "that involve a text generation component."
217
+ ),
218
+ "params": 27009002240,
219
+ "path": "gemma3",
220
+ },
221
+ "kaggle_handle": "kaggle://keras/medgemma/keras/medgemma_instruct_27b_text/1",
222
+ },
184
223
  }
@@ -415,3 +415,8 @@ class ImageToImage(Task):
415
415
  # Image-to-image.
416
416
  outputs = [generate(*x) for x in inputs]
417
417
  return self._normalize_generate_outputs(outputs, input_is_scalar)
418
+
419
+ def _post_quantize(self, mode, **kwargs):
420
+ super()._post_quantize(mode, **kwargs)
421
+ # Reset the compiled generate function.
422
+ self.generate_function = None
@@ -518,3 +518,8 @@ class Inpaint(Task):
518
518
  # Inpaint.
519
519
  outputs = [generate(*x) for x in inputs]
520
520
  return self._normalize_generate_outputs(outputs, input_is_scalar)
521
+
522
+ def _post_quantize(self, mode, **kwargs):
523
+ super()._post_quantize(mode, **kwargs)
524
+ # Reset the compiled generate function.
525
+ self.generate_function = None
@@ -0,0 +1,9 @@
1
+ from keras_hub.src.models.mobilenetv5.mobilenetv5_backbone import (
2
+ MobileNetV5Backbone,
3
+ )
4
+ from keras_hub.src.models.mobilenetv5.mobilenetv5_presets import (
5
+ backbone_presets,
6
+ )
7
+ from keras_hub.src.utils.preset_utils import register_presets
8
+
9
+ register_presets(backbone_presets, MobileNetV5Backbone)