Skip to content

Latest commit

 

History

History
51 lines (26 loc) · 1.9 KB

Pluginization.md

File metadata and controls

51 lines (26 loc) · 1.9 KB

Pluginization

Pluginization is an important capability introduced in SWIFT 3.0. We hope to allow developers to customize the development process more naturally through pluginization.

callback

Examples can be found here.

Callbacks are registered into the trainer before constructing the trainer. The example provides a simple version of the EarlyStop scheme.

Customized Trainer

Examples can be found here.

Users can inherit existing trainers and implement their own training logic here, such as customizing data loaders, customizing compute_loss, etc. The example demonstrates a trainer for a text-classification task.

Customized Loss

Examples can be found here.

Users can customize their own loss implementation plan here.

Customized Loss Scale

Examples can be found here.

Users can customize the loss scale here, allowing for different weight definitions for different tokens.

Customized Metric

Examples can be found here.

Users can customize evaluation metrics used during the cross-validation phase here.

Customized Optimizer

Examples can be found here.

Users can add their own optimizer and lr_scheduler implementations here.

Customized Tools

Examples can be found here.

Users can add tools formatted for Agents here.

Customized Tuner

Examples can be found here.

Users can add new custom tuners here.