ANEMLL
ANEMLL (pronounced like "animal") is an open-source project focused on accelerating the porting of Large Language Models (LLMs) to tensor processors, starting with the Apple Neural Engine (ANE).
The goal is to provide a fully open-source pipeline from model conversion to inference for common LLM architectures running on ANE.
This enables seamless integration and on-device inference for low-power applications on edge devices, ensuring maximum privacy and security.
This is critical for autonomous applications, where models run directly on the device without requiring an internet connection.
For more information, visit the ANEMLL GitHub repository.
License
ANEMLL is licensed under the MIT License.
The model is based on Meta's LLaMA 3.2 and may require a separate license.
This test model is exclusively for the Meta's LLaMA architecture converted for CoreML, released before the official launch of the ANEMLL repository and minimal documentation. It is intended for early adopters only who requested an early release.
Requirements
- macOS Sequoia with Apple Neural Engine and 8GB RAM or more
- CoreML Tools and HuggingFace Transformers libraries
- Python 3.9
chat.py
provides a sample inference script.chat_full.py
provides a sample inference script with history and conversation management.
Installation
- Download the model from Hugging Face:
# Install required tools
pip install huggingface_hub
# Install Git LFS (Large File Support)
# macOS with Homebrew:
brew install git-lfs
# Or Ubuntu/Debian:
# sudo apt-get install git-lfs
# Initialize Git LFS
git lfs install
# Clone the repository with model files
git clone https://huggingface.co/anemll/anemll-Meta-Llama-3.2-1B-ctx512_0.3.0
- Extract model files:
# Navigate to cloned directory
cd anemll-Meta-Llama-3.2-1B-ctx512_0.3.0
# Pull LFS files (model weights)
git lfs pull
# Extract CoreML model files
find . -type f -name "*.zip" -exec unzip {} \;
- Install dependencies:
pip install coremltools transformers
Coremltools:
See coremltools installation guide at https://coremltools.readme.io/v4.0/docs/installation
How to Run
- Basic chat interface:
python chat.py --meta ./meta.yaml
- Full conversation mode with history:
python chat_full.py --meta ./meta.yaml
Note: The first time the model loads, macOS will take some time to place it on the device. Subsequent loads will be instantaneous. Use Ctrl-D to exit, Ctrl-C to interrupt inference.
More Info Please check following links for later updates:
anemll-Meta-Llama-3.2-1B-ctx512_0.3.0
This is a CoreML model converted using ANEMLL for Apple Neural Engine inference.
Available Distributions
Standard Distribution
- Contains zipped MLMODELC files
- Suitable for macOS and development
iOS Distribution
- Contains unzipped MLMODELC files
- Ready for iOS deployment
- Includes offline tokenizer support
Model Information
- Context Length: %CONTEXT_LENGTH%
- Batch Size: %BATCH_SIZE%
- Number of Chunks: %NUM_CHUNKS%
Quick Start
Test in iOS/macOS App
Try our sample Chat-Bot app on TestFlight:
- Install TestFlight from App Store
- Join beta test: TestFlight Link
- App includes a small demo model pre-installed
- You can add custom models via HuggingFace URLs
- The TestFlight app works on both iOS and macOS
- Demonstrates proper model integration and provides a reference implementation
- iOS requires unzipped MLMODELC files and config.json for offline tokenizer
- macOS supports both zipped and unzipped model formats
- Downloads last month
- 7