Troy is a powerful tool designed to simplify the process of fine-tuning Large Language Models (LLMs) directly on your Mac, leveraging the capabilities of Apple Silicon and the MLX framework. It streamlines the entire workflow, from data preparation to model training and deployment, all managed through a single YAML configuration file and a simple command-line interface.
Effortless Fine-Tuning: Train LoRA or QLoRA models on your Mac without the need for CUDA or cloud infrastructure. Troy handles the complexities, allowing you to focus on model performance.
Unified Memory Optimization: Takes full advantage of Apple Silicon's unified memory, enabling the training of significantly larger models than typically possible on consumer hardware.
Integrated Workflow: A single `troy.yaml` file defines your entire training run, supporting various tasks like Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and Ordered Preference Optimization (ORPO).
Automated Processes: Troy automatically detects data formats, infers optimal batch sizes based on available memory, and manages validation splits.
Data Generation & Augmentation: Utilize `troy data synth` to generate datasets locally using a teacher model or leverage `troy mesh` to distribute data generation across multiple iPhones on your Wi-Fi network.
Cross-Platform Deployment: Export your trained models in formats like GGUF for use with popular platforms such as llama.cpp, Ollama, and LM Studio, or export for iOS to run directly on your iPhone.
iPhone Integration: The iPhone can act as both a data generation node in a mesh network and a deployment target for your fine-tuned models, enabling fully local, offline inference.
Developer Friendly: Open-source with an Apache-2.0 license, Troy is built with Python and Swift, offering a transparent and customizable solution for LLM development.