refactor: remove suffixes
Browse filesSigned-off-by: admin <[email protected]>
- modeling_colqwen_duo.py +0 -5
modeling_colqwen_duo.py
CHANGED
|
@@ -18,7 +18,6 @@ from tqdm import tqdm
|
|
| 18 |
from enum import Enum
|
| 19 |
|
| 20 |
from transformers import BatchEncoding, BatchFeature
|
| 21 |
-
from transformers.modeling_utils import PreTrainedModel
|
| 22 |
|
| 23 |
from transformers.models.qwen2_vl.modeling_qwen2_vl import Qwen2VLCausalLMOutputWithPast
|
| 24 |
|
|
@@ -247,15 +246,11 @@ class QwenVLEmbeddingProcessorBase(BaseVisualRetrieverProcessor, QwenVLProcessor
|
|
| 247 |
padding: Optional[str] = None,
|
| 248 |
) -> BatchFeature:
|
| 249 |
|
| 250 |
-
if suffix is None:
|
| 251 |
-
suffix = "<pad>" * 10
|
| 252 |
-
|
| 253 |
padded_texts: List[str] = []
|
| 254 |
|
| 255 |
for text in texts:
|
| 256 |
if prefix:
|
| 257 |
text = f"{prefix}: {text}"
|
| 258 |
-
text += suffix
|
| 259 |
padded_texts.append(text)
|
| 260 |
|
| 261 |
text_batch = self(
|
|
|
|
| 18 |
from enum import Enum
|
| 19 |
|
| 20 |
from transformers import BatchEncoding, BatchFeature
|
|
|
|
| 21 |
|
| 22 |
from transformers.models.qwen2_vl.modeling_qwen2_vl import Qwen2VLCausalLMOutputWithPast
|
| 23 |
|
|
|
|
| 246 |
padding: Optional[str] = None,
|
| 247 |
) -> BatchFeature:
|
| 248 |
|
|
|
|
|
|
|
|
|
|
| 249 |
padded_texts: List[str] = []
|
| 250 |
|
| 251 |
for text in texts:
|
| 252 |
if prefix:
|
| 253 |
text = f"{prefix}: {text}"
|
|
|
|
| 254 |
padded_texts.append(text)
|
| 255 |
|
| 256 |
text_batch = self(
|