Release 2.0.4-beta.9: PyPI-ready with tiktoken workaround

Changes:
- Bundle tiktoken assets locally (mlxk2/assets/whisper/*.tiktoken)
- Monkey-patch mlx-audio to use bundled assets at import time
- Update pyproject.toml: mlx-audio>=0.3.1 from PyPI (no Git install)
- Simplify README: 3 clear installation methods
- Add NOTICE file for tiktoken asset attribution

Fixes: mlx-audio Issue #479 (missing tiktoken assets in PyPI wheels)
Workaround: Temporary until upstream fix available
This commit is contained in:
The BROKE Cluster Team
2026-02-04 14:41:52 +01:00
parent bf7480d042
commit 69a3c19c16
4 changed files with 117 additions and 48 deletions
+10 -41
View File
@@ -85,69 +85,38 @@ This license applies **only** to the `mlx-knife` code and **does not extend** to
## Installation
### Via PyPI (Stable - v2.0.3, Text only)
### 1. PyPI Stable (2.0.3 - Text models only)
```bash
pip install mlx-knife
# Verify
mlxk --version # → mlxk 2.0.3
```
**Requirements:**
- macOS with Apple Silicon (M1/M2/M3/M4)
- Python 3.10-3.12
**Requirements:** macOS Apple Silicon, Python 3.9-3.12
> **Note:** PyPI stable (2.0.3) supports **Text models only**. For Vision + Audio, use the beta version below.
### Via GitHub (Beta - v2.0.4-beta.9, Text + Vision + Audio)
### 2. PyPI Beta (2.0.4-beta.9 - Text + Vision + Audio)
```bash
# Step 1: Base + Vision
pip install "git+https://github.com/mzau/mlx-knife.git@v2.0.4-beta.9#egg=mlx-knife[vision]"
# Step 2: Audio (optional - requires Git install due to PyPI regression)
pip install -e "git+https://github.com/Blaizzy/mlx-audio.git@9349644#egg=mlx-audio"
pip install tiktoken
# Verify
pip install mlx-knife[all]==2.0.4b9
mlxk --version # → mlxk 2.0.4b9
```
**Beta.9 features:**
- **Vision**: mlx-vlm 0.3.10 - Image analysis with EXIF metadata
- **Audio**: mlx-audio (Git) - Whisper STT (WAV, MP3, M4A)
- **Recommended models**: `whisper-large-v3-turbo-4bit`, `pixtral-12b-4bit`
**Requirements:** macOS Apple Silicon, Python 3.10-3.12
**Features:** Audio STT (Whisper), Vision with EXIF metadata, tiktoken workaround bundled
> **⚠️ Audio Installation Note:** mlx-audio 0.3.1 (PyPI) has a tiktoken regression. For audio support, install manually:
> ```bash
> pip install -e "git+https://github.com/Blaizzy/mlx-audio.git@9349644#egg=mlx-audio"
> pip install tiktoken
> ```
### Development Installation
### 3. Developer Installation
```bash
# Clone and install from source
git clone https://github.com/mzau/mlx-knife.git
cd mlx-knife
pip install -e ".[all,dev,test]"
# Step 1: Base + Vision + Dev tools
pip install -e ".[vision,dev,test]"
# Step 2: Audio from Git (PyPI 0.3.1 broken)
pip install -e "git+https://github.com/Blaizzy/mlx-audio.git@9349644#egg=mlx-audio"
pip install tiktoken
# Verify
mlxk --version # → mlxk 2.0.4b9
python -c "import mlx_vlm; print('vision ok')"
python -c "import mlx_audio; print('audio ok')"
# Run tests
pytest -v
```
**Requirements:** macOS Apple Silicon, Python 3.10-3.12
### Migrating from 1.x
If you're upgrading from MLX Knife 1.x, see [MIGRATION.md](MIGRATION.md) for important information about the license change (MIT → Apache 2.0) and behavior changes.