llama.LLMEngine.train
Train a LLM. This function will submit a training job and continuously poll until the job is completed. You can monitor the job at https://app.lamini.ai/train.
We can choose to persist the data (additive) across multiple save_data
calls and then train on the accumulated data.
Or, if you specify the data as an argument to llama.LLMEngine.train
then Lamini will train only on that data.
Optional Step: If you want to change the default values of the hyper-parameters of the model (like learning rate), you can pass the hyper-parameters you want to modify using the following code
The default values of the hyper-parameters and key values can be found in the llama_config.yaml file in the configs folder in LLAMA. Currently we support most hyper-parameters in huggingface's training arguments, like max_steps, batch_size, num_train_epochs, early_stopping etc.Returns
results: dict
- a dictionary object with fields job_id
and model_name
which can be used to fetch eval results or used to query the finetuned model. In order to query the finetuned model you need to use the new model_name