Call post_init() in HfMoondream for Transformers 5 compatibility
#33
by err805 - opened
- 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:
|