bstraehle commited on
Commit
5bf08ed
1 Parent(s): b196335

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -82,8 +82,8 @@ def fine_tune_model(base_model_name, dataset_name):
82
  training_args = Seq2SeqTrainingArguments(
83
  output_dir=f"./{FT_MODEL_NAME}",
84
  num_train_epochs=3, # 37,500 steps
85
- max_steps=1, # overwrites num_train_epochs
86
- push_to_hub=True, # only pushes model, also need to push tokenizer (see below)
87
  # TODO https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments
88
  )
89
 
@@ -105,8 +105,9 @@ def fine_tune_model(base_model_name, dataset_name):
105
 
106
  trainer.train()
107
 
108
- # Push tokenizer to HF
109
 
 
110
  tokenizer.push_to_hub(FT_MODEL_NAME)
111
 
112
  def prompt_model(model_name, system_prompt, user_prompt, sql_context):
 
82
  training_args = Seq2SeqTrainingArguments(
83
  output_dir=f"./{FT_MODEL_NAME}",
84
  num_train_epochs=3, # 37,500 steps
85
+ max_steps=2, # overwrites num_train_epochs
86
+ #push_to_hub=True, # only pushes model, also need to push tokenizer (see below)
87
  # TODO https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments
88
  )
89
 
 
105
 
106
  trainer.train()
107
 
108
+ # Push model and tokenizer to HF
109
 
110
+ model.push_to_hub(FT_MODEL_NAME)
111
  tokenizer.push_to_hub(FT_MODEL_NAME)
112
 
113
  def prompt_model(model_name, system_prompt, user_prompt, sql_context):