Update runners/KAGGLE_BUILD_SARUS_SFT_V2_DATASET.txt with user enhancements
Browse files
runners/KAGGLE_BUILD_SARUS_SFT_V2_DATASET.txt
CHANGED
|
@@ -1,26 +1,27 @@
|
|
| 1 |
-
# ==============================================================================
|
| 2 |
-
# 🚀 ViuAI Sarus-500M — SFT v2 Pure Chat Dataset Builder (Kaggle 1-Click)
|
| 3 |
-
# ==============================================================================
|
| 4 |
-
# Run this entire block in a single Kaggle Notebook cell.
|
| 5 |
-
# It streams and builds ~200,000 pure conversational samples (0% math, 0% code)
|
| 6 |
-
# and uploads directly to Hugging Face!
|
| 7 |
-
# ==============================================================================
|
| 8 |
-
|
| 9 |
-
# 1. Install required packages
|
| 10 |
-
!pip install -q tokenizers datasets huggingface_hub numpy
|
| 11 |
-
|
| 12 |
-
# 2. Fetch the builder script from Hugging Face
|
| 13 |
-
import os, shutil
|
| 14 |
-
from huggingface_hub import hf_hub_download
|
| 15 |
-
|
| 16 |
-
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
| 1 |
+
# ==============================================================================
|
| 2 |
+
# 🚀 ViuAI Sarus-500M — SFT v2 Pure Chat Dataset Builder (Kaggle 1-Click)
|
| 3 |
+
# ==============================================================================
|
| 4 |
+
# Run this entire block in a single Kaggle Notebook cell.
|
| 5 |
+
# It streams and builds ~200,000 pure conversational samples (0% math, 0% code)
|
| 6 |
+
# and uploads directly to Hugging Face!
|
| 7 |
+
# ==============================================================================
|
| 8 |
+
|
| 9 |
+
# 1. Install required packages
|
| 10 |
+
!pip install -q tokenizers datasets huggingface_hub numpy
|
| 11 |
+
|
| 12 |
+
# 2. Fetch the builder script from Hugging Face
|
| 13 |
+
import os, shutil
|
| 14 |
+
from huggingface_hub import hf_hub_download
|
| 15 |
+
|
| 16 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 17 |
+
if HF_TOKEN:
|
| 18 |
+
os.environ["HF_TOKEN"] = HF_TOKEN
|
| 19 |
+
REPO_ID = "ViuAI/ViuAI-500M"
|
| 20 |
+
|
| 21 |
+
os.makedirs("code", exist_ok=True)
|
| 22 |
+
p = hf_hub_download(repo_id=REPO_ID, filename="code/build_sft_v2_chat_dataset.py", token=HF_TOKEN, force_download=True)
|
| 23 |
+
shutil.copy(p, "code/build_sft_v2_chat_dataset.py")
|
| 24 |
+
print("✅ build_sft_v2_chat_dataset.py ready!")
|
| 25 |
+
|
| 26 |
+
# 3. Launch Builder with LIVE Real-Time Terminal Output (-u unbuffered)
|
| 27 |
+
!python -u code/build_sft_v2_chat_dataset.py --phase all --upload_hf
|