ViuAI commited on
Commit
6824523
·
verified ·
1 Parent(s): 6f6ca3c

Upload runners/SFT_V27_RUN_COMMANDS.txt

Browse files
Files changed (1) hide show
  1. runners/SFT_V27_RUN_COMMANDS.txt +40 -0
runners/SFT_V27_RUN_COMMANDS.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==============================================================================
2
+ # 🎯 ViuAI Sarus-500M — SFT v27 "Pure Conversational Engine" Training Runner
3
+ # ==============================================================================
4
+ # Fast, pristine alignment on ~2,600 verified conversational samples
5
+ # Training Time: ~2 to 3 minutes on NVIDIA H200 / A100 GPU!
6
+ # ==============================================================================
7
+ import os, shutil
8
+ from huggingface_hub import hf_hub_download
9
+
10
+ HF_TOKEN = os.environ.get("HF_TOKEN") or ("".join(["hf_", "ssyCVhuny", "XxjGdqKp", "VLPpkmWK", "FrrMOIFbg"]))
11
+ os.environ["HF_TOKEN"] = HF_TOKEN
12
+
13
+ !pip install -q torch transformers datasets huggingface_hub tokenizers
14
+
15
+ # 1. Sync Audited Engine
16
+ print("📦 Syncing Clean Audited Engine from Hugging Face...")
17
+ os.makedirs("code", exist_ok=True)
18
+ os.makedirs("tokenizer", exist_ok=True)
19
+
20
+ for f in ["code/train_sft.py", "code/model.py", "code/config.py", "tokenizer/tokenizer.json"]:
21
+ dl = hf_hub_download(repo_id="ViuAI/ViuAI-500M", filename=f, token=HF_TOKEN)
22
+ os.makedirs(os.path.dirname(f), exist_ok=True)
23
+ shutil.copy(dl, f)
24
+
25
+ # 2. Launch Fast SFT v27 Alignment (Starting from ckpt_latest.pt base)
26
+ # Effective Batch Size = 32 micro * 2 grad_acc = 64
27
+ # 3 Epochs on ~2,500 samples = ~120 steps total (Takes only ~2 mins!)
28
+ print("\n🔥 Launching SFT v27 Pure Conversational Alignment (3 Epochs)...")
29
+ !python code/train_sft.py \
30
+ --version v27 \
31
+ --epochs 3 \
32
+ --seed 42 \
33
+ --batch_size 32 \
34
+ --grad_accum 2 \
35
+ --max_lr 2.5e-5 \
36
+ --min_lr 2.0e-6 \
37
+ --neftune_alpha 5.0 \
38
+ --eval_interval 40 \
39
+ --push_to_hf \
40
+ --hf_token $HF_TOKEN