Skip to main content

Running Fine-tuning via Felafax Open-source Repo

New! For an easier process, use our managed solution that handles launching Trainium instances, installing dependencies, and provides a ready-to-use fine-tuning notebook! Reach out to us.
a. Go to AWS EC2 console and click on launch instance.b. Give a name to your instance, then browse the AMIs catalog and search for HuggingFace AMI. image imagec. Select Trainium instance type, we’ll use trn1.2xlarge and launch the instance.image
After the instance is live, click on “connect” and follow the instructions to SSH into the instance.
Login to the instance using the ubuntu user.
image

Step 3: Clone and run fine-tuning

a. Clone the repo
git clone https://github.com/felafax/felafax.git
cd felafax
b. Configure hyperparameters in trainers/trainium_llama/pipeline.pyc. Run compilation, which takes around 10 minutes.
neuron_parallel_compile python -m trainers.trainium_llama.pipeline
d. Run fine-tuning.
python -m trainers.trainium_llama.pipeline