Learn how to train models on your device using Simplifine.
//TODO - Update with the config schema
Note: This workflow is specifically designed for cloud-based training. For on-device training, refer to the On-Device Training Workflow section.
train_engine
This workflow is optimized for training on your own infrastucture.
WandB logging can be passed as the value of the arguement report_to
in the training arguments objects passed to the trainer. It can be fully deactivated as follows:
WandB logging is enabled by default.
You can provide the name of a Hugging Face (HF) dataset if you’d like to use a pre-existing dataset. Ensure that you adjust the keys
, response_template
, and template
to match your dataset’s structure.
If you don’t want to use a Hugging Face dataset, set from_hf to False and provide a local dataset. The example below shows how to manually create a dataset:
Choose a model for training.
Large models may cause OOM errors, especially in environments with limited GPU memory. Consider using smaller models or utilizing Simplifine’s other GPU offerings.
Finally, use the train_engine.hf_sft function to start training in the cloud. The parameters allow you to control the training process, including whether to use mixed-precision training (fp16
), distributed data parallel (ddp
), and more
For efficient cloud training, consider adjusting gradient_accumulation_steps and using mixed-precision (fp16=True
) to reduce memory usage.
Learn how to train models on your device using Simplifine.
//TODO - Update with the config schema
Note: This workflow is specifically designed for cloud-based training. For on-device training, refer to the On-Device Training Workflow section.
train_engine
This workflow is optimized for training on your own infrastucture.
WandB logging can be passed as the value of the arguement report_to
in the training arguments objects passed to the trainer. It can be fully deactivated as follows:
WandB logging is enabled by default.
You can provide the name of a Hugging Face (HF) dataset if you’d like to use a pre-existing dataset. Ensure that you adjust the keys
, response_template
, and template
to match your dataset’s structure.
If you don’t want to use a Hugging Face dataset, set from_hf to False and provide a local dataset. The example below shows how to manually create a dataset:
Choose a model for training.
Large models may cause OOM errors, especially in environments with limited GPU memory. Consider using smaller models or utilizing Simplifine’s other GPU offerings.
Finally, use the train_engine.hf_sft function to start training in the cloud. The parameters allow you to control the training process, including whether to use mixed-precision training (fp16
), distributed data parallel (ddp
), and more
For efficient cloud training, consider adjusting gradient_accumulation_steps and using mixed-precision (fp16=True
) to reduce memory usage.