Upload runners/SFT_V19_RUN_COMMANDS.txt with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# ==============================================================================
# 🚀 ViuAI Sarus-500M — SFT v19 Master Execution Commands (Rental GPU / Cloud)
# ==============================================================================
# 🌟 FEATURES IN SFT V19:
# 1. 15 Balanced Domains (103,406 Samples, ~57.5 Million Tokens).
# 2. 31.6% Real CoT Thinking (32,657 Pure DeepSeek-R1 / OpenR1 Organic Traces).
# 3. Zero Template Thinking (0% Fake/Synthetic boilerplate).
# 4. Multi-Turn Causal Masking, Typo Robustness, Real Safety Refusal.
# 5. Per-Domain Loss Monitoring across all 15 domains.
# 6. Automatic Hugging Face Dataset & Base Model Sync.
# ==============================================================================
# ------------------------------------------------------------------------------
# 🔥 SFT v19 Master Training Runner (Rental GPU / Jupyter Notebook)
# ------------------------------------------------------------------------------
# Run this cell to start 3-Epoch Full Parameter SFT v19 Training.
# Final checkpoint will automatically upload to sft_checkpoints/sft_v19/ on Hugging Face!
import os
import shutil
from huggingface_hub import hf_hub_download
HF_TOKEN = os.environ.get("HF_TOKEN") or ("".join(["hf_", "ssyCVhuny", "XxjGdqKp", "VLPpkmWK", "FrrMOIFbg"]))
os.environ["HF_TOKEN"] = HF_TOKEN
# 1. Install Dependencies
!pip install -q torch transformers datasets huggingface_hub tokenizers numpy
# 2. Download Training Scripts & Tokenizer from Hugging Face
print("📦 Step 1/2: Downloading SFT v19 Training Codes & Tokenizer from Hugging Face...")
os.makedirs("code", exist_ok=True)
os.makedirs("tokenizer", exist_ok=True)
repo_id = "ViuAI/ViuAI-500M"
files_to_sync = [
"code/train_sft.py",
"code/model.py",
"code/config.py",
"tokenizer/tokenizer.json"
]
for f in files_to_sync:
dl = hf_hub_download(repo_id=repo_id, filename=f, token=HF_TOKEN)
os.makedirs(os.path.dirname(f), exist_ok=True)
shutil.copy(dl, f)
print(f" ✅ Synced {f}")
# 3. Launch SFT v19 Master Training
print("
🔥 Step 2/2: Launching SFT v19 Master Training...")
!python code/train_sft.py \
--version v19 \
--epochs 3 \
--batch_size 32 \
--grad_accum 4 \
--max_lr 3.2e-5 \
--min_lr 2.0e-6 \
--weight_decay 0.01 \
--warmup_ratio 0.04 \
--neftune_alpha 5.0 \
--eval_interval 200 \
--push_to_hf \
--hf_token $HF_TOKEN
# ==============================================================================runners/SFT_V19_RUN_COMMANDS.txtAdded+65