change image_token_index to image_token_id
Browse files- configuration_magma.py +3 -3
configuration_magma.py
CHANGED
|
@@ -108,19 +108,19 @@ class MagmaConfig(PretrainedConfig):
|
|
| 108 |
>>> configuration = model.config
|
| 109 |
```"""
|
| 110 |
|
| 111 |
-
model_type = "magma"
|
| 112 |
keys_to_ignore_at_inference = ["past_key_values"]
|
| 113 |
|
| 114 |
def __init__(
|
| 115 |
self,
|
| 116 |
vision_config=None,
|
| 117 |
text_config=None,
|
| 118 |
-
|
| 119 |
tie_word_embeddings=False,
|
| 120 |
**kwargs,
|
| 121 |
):
|
| 122 |
self.vision_config = vision_config
|
| 123 |
-
self.image_token_index =
|
| 124 |
|
| 125 |
if isinstance(text_config, dict):
|
| 126 |
text_config["model_type"] = text_config["model_type"] if "model_type" in text_config else "llama"
|
|
|
|
| 108 |
>>> configuration = model.config
|
| 109 |
```"""
|
| 110 |
|
| 111 |
+
model_type = "magma"
|
| 112 |
keys_to_ignore_at_inference = ["past_key_values"]
|
| 113 |
|
| 114 |
def __init__(
|
| 115 |
self,
|
| 116 |
vision_config=None,
|
| 117 |
text_config=None,
|
| 118 |
+
image_token_id=None,
|
| 119 |
tie_word_embeddings=False,
|
| 120 |
**kwargs,
|
| 121 |
):
|
| 122 |
self.vision_config = vision_config
|
| 123 |
+
self.image_token_index = image_token_id
|
| 124 |
|
| 125 |
if isinstance(text_config, dict):
|
| 126 |
text_config["model_type"] = text_config["model_type"] if "model_type" in text_config else "llama"
|