Initial commit: AI-Trainer Unsloth MoE & GRPO Control Center with Web Dashboard and Pipeline Scripts

This commit is contained in:
drjones
2026-08-13 06:43:28 -07:00
commit 2651d18463
660 changed files with 76761 additions and 0 deletions

32
scripts/train_grpo.py Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""
train_grpo.py - Unsloth Harness-Grounded GRPO Training Script
"""
import re
def reward_hard_execution(completions) -> list:
rewards = []
for text in completions:
match = re.search(r"```bash\n(.*?)\n```", text, re.DOTALL)
if match:
rewards.append(3.0)
else:
rewards.append(-2.0)
return rewards
def reward_anti_hesitation(completions) -> list:
rewards = []
for text in completions:
idx = text.find("```")
if idx != -1 and idx < 25:
rewards.append(2.0)
else:
rewards.append(-1.0)
return rewards
def main():
print("[*] Unsloth GRPO Trainer initialized.")
print("[*] Hard Execution Rewards Active (+3.0 / -2.0).")
if __name__ == "__main__":
main()