Skip to main content

felafax

Project description

Felafax -- tune LLaMa3.1 on Google Cloud TPUs for 30% lower cost and scale seamlessly!

image

Felafax is a framework for continued-training and fine-tuning open source LLMs using XLA runtime. We take care of neceessary runtime setup and provide a Jupyter notebook out-of-box to just get started.

  • Easy to use.
  • Easy to configure all aspects of training (designed for ML researchers and hackers).
  • Easy to scale training from a single TPU VM with 8 cores to entire TPU Pod containing 6000 TPU cores (1000X)!

Goal

Our goal at felafax is to build infra to make it easier to run AI workloads on non-NVIDIA hardware (TPU, AWS Trainium, AMD GPU, and Intel GPU).

Currently supported models

  • LLaMa-3.1 JAX. $${\color{red}New!}$$

    • Translated the model from PyTorch to JAX.
    • Implements 2-way data parallel and 2-way model parallel training.
    • The multi-GPU training works on NVIDIA GPUs and TPUs!
    • Supports full-precision training.
  • LLaMa-3/3.1 PyTorch XLA.

    • Supports LoRA and full-precision training.
  • Gemma2 2B, 9B, 27B on Cloud TPUs.

    • Supports fast full-precision training.
  • LLaMa-3.1 405B will be available on our cloud platform at felafax.ai -- sign-up for the waitlist!

Setup

For a hosted version with a seamless workflow, please visit app.felafax.ai 🦊.

If you prefer a self-hosted training version, follow the instructions below. These steps will guide you through launching a TPU VM on your Google Cloud account and starting a Jupyter notebook. With just 3 simple steps, you'll be up and running in under 10 minutes. 🚀

  1. Install gcloud command-line tool and authenticate your account (SKIP this STEP if you already have gcloud installed and have used TPUs before! 😎)

     # Download gcloud CLI
     curl https://sdk.cloud.google.com | bash
     source ~/.bashrc
    
     # Authenticate gcloud CLI
     gcloud auth login
    
     # Create a new project for now
     gcloud projects create LLaMa3-tunerX --set-as-default
    
     # Config SSH and add
     gcloud compute config-ssh --quiet
    
     # Set up default credentials
     gcloud auth application-default login
    
     # Enable Cloud TPU API access
     gcloud services enable compute.googleapis.com tpu.googleapis.com storage-component.googleapis.com aiplatform.googleapis.com
    
  2. Spin up a TPU v5-8 VM 🤠.

    sh ./launch_tuner.sh
    

    Keep an eye on the terminal -- you might be asked to input SSH key password and need to put in your HuggingFace token.

  3. Clone the repo and install dependencies

    git clone https://github.com/felafax/felafax.git
    cd felafax
    pip install -r requirements.txt
    
  4. Open the Jupyter notebook at https://localhost:888 and start fine-tuning!

Credits:

Contact

If you have any questions, please contact us at founders@felafax.ai.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

felafax-1.0.8.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

felafax-1.0.8-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

Details for the file felafax-1.0.8.tar.gz.

File metadata

  • Download URL: felafax-1.0.8.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.9 Darwin/22.5.0

File hashes

Hashes for felafax-1.0.8.tar.gz
Algorithm Hash digest
SHA256 2b984ae9efeb79cbddf6b9e3b6a3f074ae113dbe604b7a81d45f95c79e1b9372
MD5 219741065efb6524d4ec4f5bc640adea
BLAKE2b-256 aeed6f603e96e7fded10c595632695299c6510b677918e8ec105bb9f0af8a902

See more details on using hashes here.

File details

Details for the file felafax-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: felafax-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.9 Darwin/22.5.0

File hashes

Hashes for felafax-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 83cd4838c6c8c21975ead81c75334c057a0071762b43b808e9ce563ff8876cb1
MD5 152006a7918a89daa1a840190317eba3
BLAKE2b-256 f83c85b4cf47086f02ac6cbf4cb6dd42fea68bf17d3e97ad7eb134dcb10de227

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page