hackergeek98 commited on
Commit
ef46523
·
verified ·
1 Parent(s): e007d29

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from autotrain import logger
3
+ from autotrain.trainers.common import ALLOW_REMOTE_CODE
4
+ from autotrain.trainers.text_generation import LLMTrainingParams, LLMTrainer
5
+
6
+ def train():
7
+
8
+
9
+ # Define training parameters
10
+ params = LLMTrainingParams(
11
+ model_name="microsoft/phi-4", # Replace with your model
12
+ data_path="lavita/medical-qa-datasets",
13
+ project_name="phi4-training",
14
+ learning_rate=2e-5,
15
+ num_train_epochs=3,
16
+ batch_size=2,
17
+ fp16=True,
18
+ push_to_hub=True,
19
+ repo_id="hackergeek98/phi4-trained",
20
+ )
21
+
22
+ # Initialize and run trainer
23
+ trainer = LLMTrainer(params=params)
24
+ trainer.train()
25
+
26
+ if __name__ == "__main__":
27
+ train()