dad1909 commited on
Commit
620854f
·
verified ·
1 Parent(s): 4deeced

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -107,11 +107,11 @@ trainer = SFTTrainer(
107
  train_dataset=dataset,
108
  dataset_text_field="text",
109
  max_seq_length=max_seq_length,
110
- dataset_num_proc=2,
111
  packing=False,
112
  args=TrainingArguments(
113
- per_device_train_batch_size=2,
114
- gradient_accumulation_steps=2,
115
  learning_rate=2e-4,
116
  fp16=not is_bfloat16_supported(),
117
  bf16=is_bfloat16_supported(),
@@ -141,13 +141,4 @@ model.push_to_hub_merged(
141
  save_method="merged_16bit",
142
  token=True
143
  )
144
- print("Model pushed to hub successfully.")
145
-
146
- # Gradio app
147
- print("Launching Gradio app...")
148
- def greet(name):
149
- return "Hello " + name + "!!"
150
-
151
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
152
- demo.launch()
153
- print("Gradio app launched.")
 
107
  train_dataset=dataset,
108
  dataset_text_field="text",
109
  max_seq_length=max_seq_length,
110
+ dataset_num_proc=20,
111
  packing=False,
112
  args=TrainingArguments(
113
+ per_device_train_batch_size=20,
114
+ gradient_accumulation_steps=20,
115
  learning_rate=2e-4,
116
  fp16=not is_bfloat16_supported(),
117
  bf16=is_bfloat16_supported(),
 
141
  save_method="merged_16bit",
142
  token=True
143
  )
144
+ print("Model pushed to hub successfully.")