Upload HfMoondream
Browse files- config.json +9 -2
- hf_moondream.py +2 -2
config.json
CHANGED
|
@@ -6,8 +6,15 @@
|
|
| 6 |
"AutoConfig": "hf_moondream.HfConfig",
|
| 7 |
"AutoModelForCausalLM": "hf_moondream.HfMoondream"
|
| 8 |
},
|
| 9 |
-
"config": {
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"torch_dtype": "bfloat16",
|
| 12 |
"transformers_version": "4.51.1"
|
| 13 |
}
|
|
|
|
| 6 |
"AutoConfig": "hf_moondream.HfConfig",
|
| 7 |
"AutoModelForCausalLM": "hf_moondream.HfMoondream"
|
| 8 |
},
|
| 9 |
+
"config": {
|
| 10 |
+
"skills": [
|
| 11 |
+
"query",
|
| 12 |
+
"caption",
|
| 13 |
+
"detect",
|
| 14 |
+
"point"
|
| 15 |
+
]
|
| 16 |
+
},
|
| 17 |
+
"model_type": "moondream3",
|
| 18 |
"torch_dtype": "bfloat16",
|
| 19 |
"transformers_version": "4.51.1"
|
| 20 |
}
|
hf_moondream.py
CHANGED
|
@@ -27,11 +27,11 @@ def extract_question(text):
|
|
| 27 |
|
| 28 |
class HfConfig(PretrainedConfig):
|
| 29 |
_auto_class = "AutoConfig"
|
| 30 |
-
model_type = "
|
| 31 |
|
| 32 |
def __init__(self, **kwargs):
|
| 33 |
super().__init__(**kwargs)
|
| 34 |
-
self.config = {}
|
| 35 |
|
| 36 |
|
| 37 |
class HfMoondream(PreTrainedModel):
|
|
|
|
| 27 |
|
| 28 |
class HfConfig(PretrainedConfig):
|
| 29 |
_auto_class = "AutoConfig"
|
| 30 |
+
model_type = "moondream3"
|
| 31 |
|
| 32 |
def __init__(self, **kwargs):
|
| 33 |
super().__init__(**kwargs)
|
| 34 |
+
self.config = {"skills": ["query", "caption", "detect", "point"]}
|
| 35 |
|
| 36 |
|
| 37 |
class HfMoondream(PreTrainedModel):
|