Upload folder using huggingface_hub
Browse files
examples/prt14_qwen25vl/train_prt14.py
CHANGED
|
@@ -158,7 +158,13 @@ def main(cfg: DictConfig):
|
|
| 158 |
|
| 159 |
# 0. Load processor (Lightweight, needed for dataset)
|
| 160 |
logger.info(f"Loading Processor: {cfg.model.model_id}")
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
dataset_cls = PRTDataset
|
| 163 |
|
| 164 |
# 1. Load dataset (Fail fast)
|
|
|
|
| 158 |
|
| 159 |
# 0. Load processor (Lightweight, needed for dataset)
|
| 160 |
logger.info(f"Loading Processor: {cfg.model.model_id}")
|
| 161 |
+
# Strictly limit resolution for T4 (Avoids OOM in SDPA)
|
| 162 |
+
processor = AutoProcessor.from_pretrained(
|
| 163 |
+
cfg.model.model_id,
|
| 164 |
+
trust_remote_code=True,
|
| 165 |
+
min_pixels=256*256,
|
| 166 |
+
max_pixels=640*640, # Restrict to ~640px to reduce token count drastically
|
| 167 |
+
)
|
| 168 |
dataset_cls = PRTDataset
|
| 169 |
|
| 170 |
# 1. Load dataset (Fail fast)
|