About this project

Troy is a command-line interface designed to simplify the process of fine-tuning and preference-tuning large language models (LLMs) directly on Apple Silicon hardware. Built on top of MLX and mlx-lm, it leverages the unified memory architecture of Macs to enable local training that would typically require workstation-grade GPUs elsewhere. Key features include: - **Simplified Workflow**: Users can configure training tasks using a single YAML file and execute commands like `troy train` to start the process. - **Local Execution**: No need for cloud services or CUDA-compatible GPUs; it runs natively on M1/M2/M3 Macs. - **Model Support**: Compatible with various architectures supported by mlx-lm, including Llama, Qwen, Gemma, Phi, and Mistral. It also supports vision-language models when installed with the optional vision dependencies. - **Comprehensive Toolset**: Beyond training, Troy provides utilities for checking system compatibility (`troy doctor`), chatting with trained models (`troy chat`), evaluating performance (`troy eval`), serving an OpenAI-compatible API (`troy serve`), exporting to GGUF format for other tools, and pushing results to Hugging Face Hub. - **Flexible Training Modes**: Supports Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and ORPO. The tool aims to make advanced model customization accessible to developers and researchers with standard MacBook hardware, handling memory management automatically based on the device's capabilities.