renpas22 commited on
Commit ·
85ab8c2
1
Parent(s): a745b26
Add placeholder train_sft method
Browse files
src/reasoning/step_level_cot.py
CHANGED
|
@@ -323,6 +323,30 @@ class StepLevelCoTTrainer:
|
|
| 323 |
|
| 324 |
return dataset
|
| 325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
def train_prm(
|
| 327 |
self,
|
| 328 |
train_dataset: StepDataset,
|
|
|
|
| 323 |
|
| 324 |
return dataset
|
| 325 |
|
| 326 |
+
def train_sft(
|
| 327 |
+
self,
|
| 328 |
+
max_steps: int = 10000,
|
| 329 |
+
learning_rate: float = 2e-5,
|
| 330 |
+
save_steps: int = 1000,
|
| 331 |
+
eval_steps: int = 500,
|
| 332 |
+
) -> None:
|
| 333 |
+
"""
|
| 334 |
+
Supervised Fine-Tuning phase for the base model.
|
| 335 |
+
|
| 336 |
+
Args:
|
| 337 |
+
max_steps: Maximum training steps
|
| 338 |
+
learning_rate: Learning rate for SFT
|
| 339 |
+
save_steps: Save checkpoint every N steps
|
| 340 |
+
eval_steps: Evaluate every N steps
|
| 341 |
+
"""
|
| 342 |
+
logger.info("Starting Supervised Fine-Tuning (SFT)")
|
| 343 |
+
logger.info(f"Max steps: {max_steps}, LR: {learning_rate}")
|
| 344 |
+
|
| 345 |
+
# For now, this is a placeholder that will be implemented with proper dataset loading
|
| 346 |
+
# The actual SFT training would use HuggingFace Trainer or similar
|
| 347 |
+
logger.info("SFT training placeholder - to be implemented with proper dataset integration")
|
| 348 |
+
logger.warning("Skipping SFT phase - method needs full implementation")
|
| 349 |
+
|
| 350 |
def train_prm(
|
| 351 |
self,
|
| 352 |
train_dataset: StepDataset,
|