Commit
·
7286a83
1
Parent(s):
ee342e6
Fix dependency versions and import order
Browse files- Remove pinned transformers version (4.57.0 is yanked)
- Import unsloth before other ML libraries for optimizations
- Let UV resolve latest compatible versions
- iconclass-vlm-sft.py +5 -3
iconclass-vlm-sft.py
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
# dependencies = [
|
| 4 |
# "unsloth",
|
| 5 |
# "datasets",
|
| 6 |
-
# "transformers
|
| 7 |
-
# "trl
|
| 8 |
# "huggingface-hub[hf_transfer]",
|
| 9 |
# "pillow",
|
| 10 |
# "torch",
|
|
@@ -37,11 +37,13 @@ import sys
|
|
| 37 |
from datetime import datetime
|
| 38 |
from typing import Any, Dict
|
| 39 |
|
|
|
|
|
|
|
|
|
|
| 40 |
import torch
|
| 41 |
from datasets import load_dataset
|
| 42 |
from huggingface_hub import HfApi, ModelCard, login
|
| 43 |
from trl import SFTConfig, SFTTrainer
|
| 44 |
-
from unsloth import FastVisionModel, UnslothVisionDataCollator
|
| 45 |
|
| 46 |
logging.basicConfig(
|
| 47 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|
|
|
|
| 3 |
# dependencies = [
|
| 4 |
# "unsloth",
|
| 5 |
# "datasets",
|
| 6 |
+
# "transformers",
|
| 7 |
+
# "trl",
|
| 8 |
# "huggingface-hub[hf_transfer]",
|
| 9 |
# "pillow",
|
| 10 |
# "torch",
|
|
|
|
| 37 |
from datetime import datetime
|
| 38 |
from typing import Any, Dict
|
| 39 |
|
| 40 |
+
# Import unsloth first for optimizations
|
| 41 |
+
from unsloth import FastVisionModel, UnslothVisionDataCollator
|
| 42 |
+
|
| 43 |
import torch
|
| 44 |
from datasets import load_dataset
|
| 45 |
from huggingface_hub import HfApi, ModelCard, login
|
| 46 |
from trl import SFTConfig, SFTTrainer
|
|
|
|
| 47 |
|
| 48 |
logging.basicConfig(
|
| 49 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|