The following four files showcase how to finetune GPT-J model using the @metaflow_ray decorator with @kubernetes.
-
gpu_profile.pycontains the@gpu_profiledecorator, and is available here. It is used in the fileflow.py -
dataloader.pycontains helper functions to split text and tokenize it. -
trainer.pycontains utilities to train the GPT-J model using thetransformerslibrary. -
flow.pyuses@metaflow_raywith@kubernetesto finetune the GPT-J model. It also passes ingpurequirement to@kubernetesand theScalingConfigof theTorchTrainer.
- The flow can be run using
python flow.py --no-pylint --environment=fast-bakery run. This leveragesfast-bakeryfor blazingly fast docker image builds on the Outerbounds platform.