Upload configuration_dots.py with huggingface_hub
Browse files- configuration_dots.py +1 -3
configuration_dots.py
CHANGED
@@ -3,7 +3,6 @@ from transformers.configuration_utils import PretrainedConfig
|
|
3 |
from transformers.models.qwen2 import Qwen2Config
|
4 |
from transformers import Qwen2_5_VLProcessor, AutoProcessor
|
5 |
from transformers.models.auto.configuration_auto import CONFIG_MAPPING
|
6 |
-
from transformers.video_processing_utils import BaseVideoProcessor
|
7 |
|
8 |
|
9 |
class DotsVisionConfig(PretrainedConfig):
|
@@ -69,8 +68,7 @@ class DotsOCRConfig(Qwen2Config):
|
|
69 |
|
70 |
class DotsVLProcessor(Qwen2_5_VLProcessor):
|
71 |
def __init__(self, image_processor=None, tokenizer=None, chat_template=None, **kwargs):
|
72 |
-
|
73 |
-
super().__init__(image_processor, tokenizer, video_processor=dummy_processor, chat_template=chat_template)
|
74 |
self.image_token = "<|imgpad|>" if not hasattr(tokenizer, "image_token") else tokenizer.image_token
|
75 |
self.image_token_id = 151665 if not hasattr(tokenizer, "image_token_id") else tokenizer.image_token_id
|
76 |
|
|
|
3 |
from transformers.models.qwen2 import Qwen2Config
|
4 |
from transformers import Qwen2_5_VLProcessor, AutoProcessor
|
5 |
from transformers.models.auto.configuration_auto import CONFIG_MAPPING
|
|
|
6 |
|
7 |
|
8 |
class DotsVisionConfig(PretrainedConfig):
|
|
|
68 |
|
69 |
class DotsVLProcessor(Qwen2_5_VLProcessor):
|
70 |
def __init__(self, image_processor=None, tokenizer=None, chat_template=None, **kwargs):
|
71 |
+
super().__init__(image_processor, tokenizer, chat_template=chat_template)
|
|
|
72 |
self.image_token = "<|imgpad|>" if not hasattr(tokenizer, "image_token") else tokenizer.image_token
|
73 |
self.image_token_id = 151665 if not hasattr(tokenizer, "image_token_id") else tokenizer.image_token_id
|
74 |
|