Call post_init() in HfMoondream for Transformers 5 compatibility (#33)
Browse files- Call post_init in HfMoondream (2da5c05d24fdc8077fed37e3a33b768b0d73d266)
Co-authored-by: Ethan Reid <err805@users.noreply.huggingface.co>
- hf_moondream.py +1 -0
hf_moondream.py
CHANGED
|
@@ -43,6 +43,7 @@ class HfMoondream(PreTrainedModel):
|
|
| 43 |
MoondreamConfig.from_dict(config.config), setup_caches=False
|
| 44 |
)
|
| 45 |
self._is_kv_cache_setup = False
|
|
|
|
| 46 |
|
| 47 |
def _setup_caches(self):
|
| 48 |
if not self._is_kv_cache_setup:
|
|
|
|
| 43 |
MoondreamConfig.from_dict(config.config), setup_caches=False
|
| 44 |
)
|
| 45 |
self._is_kv_cache_setup = False
|
| 46 |
+
self.post_init()
|
| 47 |
|
| 48 |
def _setup_caches(self):
|
| 49 |
if not self._is_kv_cache_setup:
|