Upload runners/SFT_V19_TESTING_KAGGLE.txt with huggingface_hub
Browse files
runners/SFT_V19_TESTING_KAGGLE.txt
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
# ==============================================================================
|
| 2 |
# 🧪 ViuAI Sarus-500M — SFT v19 Complete 1-Click Kaggle Testing & Benchmark
|
| 3 |
# ==============================================================================
|
| 4 |
-
# Run this entire cell in a fresh Kaggle Notebook cell.
|
| 5 |
-
# Works on GPU (T4 / P100 / A100 / H100) or CPU.
|
| 6 |
# ==============================================================================
|
| 7 |
|
| 8 |
import os
|
|
@@ -55,21 +54,15 @@ if not os.path.exists(ckpt_local):
|
|
| 55 |
shutil.copy(dl_ckpt, ckpt_local)
|
| 56 |
print(f" ✅ Synced {ckpt_local}")
|
| 57 |
|
| 58 |
-
# 3. Setup
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
mod = importlib.util.module_from_spec(spec)
|
| 64 |
-
sys.modules[module_name] = mod
|
| 65 |
-
spec.loader.exec_module(mod)
|
| 66 |
-
return mod
|
| 67 |
-
|
| 68 |
-
model_module = load_module_from_file("custom_viuai_model", "code/model.py")
|
| 69 |
-
config_module = load_module_from_file("custom_viuai_config", "code/config.py")
|
| 70 |
-
|
| 71 |
-
ViuAI = model_module.ViuAI
|
| 72 |
-
ViuAIConfig = config_module.ViuAIConfig
|
| 73 |
|
| 74 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 75 |
dtype = torch.bfloat16 if (torch.cuda.is_available() and torch.cuda.is_bf16_supported()) else torch.float16 if torch.cuda.is_available() else torch.float32
|
|
|
|
| 1 |
# ==============================================================================
|
| 2 |
# 🧪 ViuAI Sarus-500M — SFT v19 Complete 1-Click Kaggle Testing & Benchmark
|
| 3 |
# ==============================================================================
|
| 4 |
+
# Run this entire cell in a fresh Kaggle Notebook cell (GPU T4 / P100 / CPU).
|
|
|
|
| 5 |
# ==============================================================================
|
| 6 |
|
| 7 |
import os
|
|
|
|
| 54 |
shutil.copy(dl_ckpt, ckpt_local)
|
| 55 |
print(f" ✅ Synced {ckpt_local}")
|
| 56 |
|
| 57 |
+
# 3. Setup Python Path & Direct Module Imports
|
| 58 |
+
code_dir = os.path.abspath("code")
|
| 59 |
+
if code_dir not in sys.path:
|
| 60 |
+
sys.path.insert(0, code_dir)
|
| 61 |
+
if os.path.abspath(".") not in sys.path:
|
| 62 |
+
sys.path.insert(0, os.path.abspath("."))
|
| 63 |
|
| 64 |
+
from config import ViuAIConfig
|
| 65 |
+
from model import ViuAI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 68 |
dtype = torch.bfloat16 if (torch.cuda.is_available() and torch.cuda.is_bf16_supported()) else torch.float16 if torch.cuda.is_available() else torch.float32
|