Skip to content

Commit

Permalink
minor additions
Browse files Browse the repository at this point in the history
Close GPTTrainerConfig( on line 965
analytics_enabled=False for Gradio (stop it complaining about new versions of Gradio)
demo.queue().launch( line 2387 to launch Gradio.
  • Loading branch information
erew123 authored Oct 20, 2024
1 parent fbffe0a commit bb314fa
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ def train_gpt(language, num_epochs, batch_size, grad_acumm, train_csv, eval_csv,


print(f"[FINETUNE] Learning Scheduler {lr_scheduler}, params {lr_scheduler_params}")

# training parameters config
config = GPTTrainerConfig(
epochs=num_epochs,
Expand Down Expand Up @@ -952,6 +953,8 @@ def train_gpt(language, num_epochs, batch_size, grad_acumm, train_csv, eval_csv,
lr_scheduler=lr_scheduler,
# it was adjusted accordly for the new step scheme
lr_scheduler_params=lr_scheduler_params,
test_sentences=[],
)
progress(0, desc="Model is currently training. See console for more information")
# init the model from config
model = GPTTrainer.init_from_config(config)
Expand Down Expand Up @@ -2381,4 +2384,14 @@ def train_model(language, train_csv, eval_csv, learning_rates, model_to_train, n
fn=delete_voice_sample_contents,
outputs=[final_progress_data],
)
model_to_train.change(basemodel_or_finetunedmodel_choice, model_to_train, None)
model_to_train.change(basemodel_or_finetunedmodel_choice, model_to_train, None)

demo.queue().launch(
show_api=False,
inbrowser=True,
share=False,
debug=False,
server_port=7052,
server_name="127.0.0.1",
)

0 comments on commit bb314fa

Please sign in to comment.