Spaces:
Paused
Paused
Commit ·
ec247a4
1
Parent(s): 680e6f8
update
Browse files
examples/tutorials/dpo/ultrachat/step_2_train_sft_model_deepspeed.py
CHANGED
|
@@ -207,7 +207,7 @@ def main():
|
|
| 207 |
)
|
| 208 |
if is_main_process:
|
| 209 |
print(f"train_dataset count filtered: {len(train_dataset)}")
|
| 210 |
-
|
| 211 |
sft_config = SFTConfig(
|
| 212 |
output_dir=args.output_model_dir,
|
| 213 |
dataset_text_field="formated_text",
|
|
@@ -225,6 +225,10 @@ def main():
|
|
| 225 |
lr_scheduler_type="cosine",
|
| 226 |
seed=3407,
|
| 227 |
report_to="none",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
)
|
| 229 |
|
| 230 |
trainer = SFTTrainer(
|
|
|
|
| 207 |
)
|
| 208 |
if is_main_process:
|
| 209 |
print(f"train_dataset count filtered: {len(train_dataset)}")
|
| 210 |
+
|
| 211 |
sft_config = SFTConfig(
|
| 212 |
output_dir=args.output_model_dir,
|
| 213 |
dataset_text_field="formated_text",
|
|
|
|
| 225 |
lr_scheduler_type="cosine",
|
| 226 |
seed=3407,
|
| 227 |
report_to="none",
|
| 228 |
+
max_length=1024 if debug_mode else 4096,
|
| 229 |
+
dataset_kwargs={
|
| 230 |
+
"skip_prepare_dataset": True,
|
| 231 |
+
}
|
| 232 |
)
|
| 233 |
|
| 234 |
trainer = SFTTrainer(
|