Upload train_pattern_selector.py with huggingface_hub
Browse files
train_pattern_selector.py
CHANGED
|
@@ -56,7 +56,7 @@ peft_config = LoraConfig(
|
|
| 56 |
task_type="CAUSAL_LM",
|
| 57 |
)
|
| 58 |
|
| 59 |
-
# Training config
|
| 60 |
training_args = SFTConfig(
|
| 61 |
output_dir="./pattern-selector-output",
|
| 62 |
num_train_epochs=3,
|
|
@@ -70,7 +70,6 @@ training_args = SFTConfig(
|
|
| 70 |
push_to_hub=True,
|
| 71 |
hub_model_id="KevinKeller/cognitive-pattern-selector-qwen2.5-7b",
|
| 72 |
report_to="none",
|
| 73 |
-
max_seq_length=4096,
|
| 74 |
)
|
| 75 |
|
| 76 |
print("Starting training...")
|
|
@@ -81,6 +80,7 @@ trainer = SFTTrainer(
|
|
| 81 |
peft_config=peft_config,
|
| 82 |
tokenizer=tokenizer,
|
| 83 |
args=training_args,
|
|
|
|
| 84 |
)
|
| 85 |
|
| 86 |
trainer.train()
|
|
|
|
| 56 |
task_type="CAUSAL_LM",
|
| 57 |
)
|
| 58 |
|
| 59 |
+
# Training config - removed max_seq_length from SFTConfig
|
| 60 |
training_args = SFTConfig(
|
| 61 |
output_dir="./pattern-selector-output",
|
| 62 |
num_train_epochs=3,
|
|
|
|
| 70 |
push_to_hub=True,
|
| 71 |
hub_model_id="KevinKeller/cognitive-pattern-selector-qwen2.5-7b",
|
| 72 |
report_to="none",
|
|
|
|
| 73 |
)
|
| 74 |
|
| 75 |
print("Starting training...")
|
|
|
|
| 80 |
peft_config=peft_config,
|
| 81 |
tokenizer=tokenizer,
|
| 82 |
args=training_args,
|
| 83 |
+
max_seq_length=4096, # Moved here
|
| 84 |
)
|
| 85 |
|
| 86 |
trainer.train()
|