LLMFarm is an open-source app for iOS and macOS that runs large language models (LLMs) locally and offline. It is built on Georgi Gerganov's ggml and llama.cpp, allowing users to load different LLMs and set the corresponding parameters. With LLMFarm, users can test the performance of different LLMs on iOS and macOS and find the model best suited to their project.
Main capabilities:
- Supports multiple inference methods.
- Supports multiple sampling methods, including Temperature (temp, top-k, top-p), Tail Free Sampling (TFS), and Locally Typical Sampling.
- Supports Metal acceleration (not available on Intel Macs).
- Provides model setting templates.
- Supports restoring context state.
- Supports Apple Shortcuts.
- Supported models include GPT2 + Cerebras, Starcoder(Santacoder), StableLM-3b-4e1t, the Deepseek series, LLaVA 1.5 models, LLaVA 1.6 models, MobileVLM 1.7B/3B models, and more.
- For models such as Falcon, Alpaca, GPT4All, Chinese LLaMA / Alpaca, Chinese LLaMA-2 / Alpaca-2, Vigogne (French), Vicuna, Koala, OpenBuddy (multilingual), Pygmalion/Metharme, WizardLM, Baichuan 1 & 2 and their derivative models, Aquila 1 & 2, Mistral AI v0.1, Refact, Persimmon 8B, MPT, Bloom, and others, llama inference needs to be selected in the model settings.
How to use:
- When creating a chat, a JSON file is generated in the "chats" directory, in which users can specify additional inference options.
- For more inference options, refer to the project documentation.
- For the list of supported models, refer to the project documentation.
- llmfarm_core has been moved to a separate repository. To build llmfarm, that repository needs to be cloned recursively.
Use cases:
- On iOS and macOS devices, test and evaluate the performance of different LLMs offline.
- Choose the most suitable local model for a project.
- Use Apple Shortcuts to integrate LLMs into automated workflows.
Limitations and notes:
- The app is currently temporarily unavailable on TestFlight and the App Store.
- Metal acceleration is not available on Intel Macs.
- Some models require manually selecting the llama inference method.
- The project also uses source code from open-source projects such as rwkv.cpp, Mia, LlamaChat, swift-markdown-ui, similarity-search-kit, and others.