Spaces:
Runtime error
Runtime error
vineetshukla.work@gmail.com commited on
Commit ·
8b03007
1
Parent(s): 0413c85
feat(training): scale dataset to 500 prompts and add hub export cell for full hackathon training run
Browse files- training/colab_train_v2.py +13 -3
training/colab_train_v2.py
CHANGED
|
@@ -93,14 +93,14 @@ def make_prompt(bug):
|
|
| 93 |
f"Fix the function:"
|
| 94 |
)
|
| 95 |
|
| 96 |
-
#
|
| 97 |
prompts = []
|
| 98 |
-
for i in range(
|
| 99 |
bug = BUG_DATASET[i % len(BUG_DATASET)]
|
| 100 |
prompts.append({"prompt": make_prompt(bug), "bug_index": i % len(BUG_DATASET)})
|
| 101 |
|
| 102 |
dataset = Dataset.from_list(prompts)
|
| 103 |
-
print(f"✅
|
| 104 |
|
| 105 |
|
| 106 |
# ============================================================
|
|
@@ -221,3 +221,13 @@ trainer = GRPOTrainer(
|
|
| 221 |
print("🚀 Sparking up Unsloth GRPO Engine...")
|
| 222 |
trainer.train()
|
| 223 |
print("\n✅ UNSLOTH TRIAL TRAINING COMPLETE! Model is completely viable.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
f"Fix the function:"
|
| 94 |
)
|
| 95 |
|
| 96 |
+
# Full hackathon training dataset (500 items to fit in 4hr Colab window)
|
| 97 |
prompts = []
|
| 98 |
+
for i in range(500):
|
| 99 |
bug = BUG_DATASET[i % len(BUG_DATASET)]
|
| 100 |
prompts.append({"prompt": make_prompt(bug), "bug_index": i % len(BUG_DATASET)})
|
| 101 |
|
| 102 |
dataset = Dataset.from_list(prompts)
|
| 103 |
+
print(f"✅ Full Dataset loaded: {len(dataset)} items")
|
| 104 |
|
| 105 |
|
| 106 |
# ============================================================
|
|
|
|
| 221 |
print("🚀 Sparking up Unsloth GRPO Engine...")
|
| 222 |
trainer.train()
|
| 223 |
print("\n✅ UNSLOTH TRIAL TRAINING COMPLETE! Model is completely viable.")
|
| 224 |
+
|
| 225 |
+
# ============================================================
|
| 226 |
+
# CELL 6: Push Final Model Adapters to HF Hub
|
| 227 |
+
# ============================================================
|
| 228 |
+
# NOTE: Run this cell separately AFTER training completes.
|
| 229 |
+
# You must have authorized HuggingFace via logging in (huggingface-cli login)
|
| 230 |
+
#
|
| 231 |
+
# model.push_to_hub("your-username/codesensei-unsloth-qwen3-1.7b", token="your_hf_token")
|
| 232 |
+
# tokenizer.push_to_hub("your-username/codesensei-unsloth-qwen3-1.7b", token="your_hf_token")
|
| 233 |
+
# print("✅ Successfully pushed Unsloth LoRA adapters to Hub!")
|