Spaces:
Sleeping
Sleeping
File size: 1,809 Bytes
03fcaa7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "6a261750",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"!cd ~/app/Ontology-architect\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a4dfd78c",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"# Run SFT first (teaches the model what valid theories look like)\n",
"cd ~/app/Ontology-architect\n",
"python -m scripts.train_sft \\\n",
" --config configs/dual_fluid_demo.json \\\n",
" --model-id Qwen/Qwen2.5-Coder-1.5B-Instruct \\\n",
" --data artifacts/curriculum/oracle.jsonl \\\n",
" --output-dir artifacts/sft_checkpoint \\\n",
" --max-steps 200 \\\n",
" --batch-size 2\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "267a95d0",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"# Run GRPO on the SFT'd model\n",
"python -m scripts.train_gro \\\n",
" --config configs/dual_fluid_demo.json \\\n",
" --model-id artifacts/sft_checkpoint \\\n",
" --group-size 2 \\\n",
" --max-steps 50 \\\n",
" --output-dir artifacts/checkpoints"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a85271b5",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"# Watch the training progress in real-time\n",
"tail -f ~/app/Ontology-architect/artifacts/checkpoints/group_reward_samples.jsonl"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|