Skip to main content

Running Fine-tuning via Felafax CLI

New! Get started with fine-tuning your models using the Felafax CLI in a few simple steps.

Setup and Authentication

Install the CLI

pip install pipx
pipx install felafax-cli

Generate and use Auth Token

  1. Visit preview.felafax.ai and create/sign in to your account
  2. Navigate to Tokens page and create a new token
  3. Authenticate your CLI session:
felafax-cli auth login --token <your_token>

Configure Fine-tuning

Generate Configuration

Generate a default config file:
felafax-cli tune init-config

Configuration Parameters

Update your config.yml with these parameters:HuggingFace Settings:
  • HuggingFace token
  • Repository ID
Training Parameters:
  • batch_size
  • max_seq_length
  • num_steps (set to null for full dataset)
  • learning_rate
  • lora_rank
  • eval_interval

Start Fine-tuning

View Available Models

felafax-cli tune start --help

Launch Fine-tuning

Start with your selected model and dataset:
felafax-cli tune start --model <your_selected_model> --config ./config.yml --hf-dataset-id <your_hf_dataset_name>
Example command:
felafax-cli tune start --model llama3-2-1b --config ./config.yml --hf-dataset-id yahma/alpaca-cleaned

Useful Commands

Stream real-time logs:
felafax-cli tune debug --job-id <job_name> -f
View your fine-tuned models:
felafax-cli model list
Chat with your fine-tuned model:
felafax-cli model chat --model-id <model_id>
Main command groups:
  • tune: Manage fine-tuning jobs
  • model: Handle fine-tuned models
  • files: Manage datasets
Get help anytime:
felafax-cli tune --help
Felafax CLI automatically handles TPU provisioning, training execution, and model uploads to HuggingFace Hub.