Spike-2B-MLX / README.md
Piecrust's picture
Fix strikethrough: approx tilde -> β‰ˆ
1efd238 verified
|
Raw
History Blame Contribute Delete
2.8 kB
---
license: apache-2.0
base_model: Qwen/Qwen3.5-2B
library_name: mlx
pipeline_tag: text-generation
tags:
- mlx
- vision-language
- tool-calling
- function-calling
- spike
- on-device
language:
- en
- de
thumbnail: https://huggingface.co/Piecrust/Spike-2B-MLX/resolve/main/banner.png
---
<p align="center">
<img src="https://huggingface.co/Piecrust/Spike-2B-MLX/resolve/main/banner.png" alt="Spike-2B-MLX" width="100%">
</p>
# Spike-2B Β· MLX (4-bit)
**Spike** is the on-device assistant in the **Spike AI** iOS app. This is the
**build that runs on your iPhone** β€” 4-bit MLX, served via `mlx-swift`.
πŸ“± **Get it on the App Store:** https://apps.apple.com/app/spike-ai/id6749781844
A LoRA fine-tune of [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B)
(a vision-language model), specialized for Spike's on-device tool-calling β€”
reminders, calendar, Apple Home, maps, web, files, code, and the SSH/agent
toolset β€” **plus vision** (read a flyer β†’ create the event, a note β†’ a reminder,
a receipt β†’ the total). English and German. It emits Spike's text tool grammar:
```text
tool:<name> {"key":"value"}
```
## Files
4-bit MLX weights (`model.safetensors`, β‰ˆ1.7 GB total) + tokenizer, processor,
and chat template. Load with `mlx-swift` / `mlx-vlm` on Apple silicon.
> Qwen3.5 is a new *hybrid* (linear-attention + full-attention) architecture.
> It runs in the Spike app's `mlx-swift` runtime (which implements `qwen3_5`);
> a text-only [GGUF build](https://huggingface.co/Piecrust/Spike-2B-GGUF) is
> also available for llama.cpp servers.
## Eval β€” Spike harness (before β†’ after)
| Metric | Base Qwen3.5-2B | **Spike-2B** |
|---|---:|---:|
| Tool calls (thinking off) | 39.8% | **99.6%** |
| Tool calls (thinking on) | β€” | **96.8%** |
| Vision (image β†’ tool / answer) | 67.5% | **100%** |
| Valid JSON on tool calls | β‰ˆ64% | **100%** |
| Normal-chat tool-leak (lower=better) | β€” | **0%** |
Trained in three stages β€” text + thinking + general + German (β‰ˆ22.5k samples), an
800-image **vision-replay** stage, then a **conversation-repair** stage (distilled
base-model chat + contrastive tool/vision replay) β€” so the model keeps its
`enable_thinking` reasoning and vision, speaks Spike's tool grammar, **and does not
hijack casual chat into tool calls** (normal-chat tool-leak 0%).
## Usage notes
- Trained on Spike's **compact system prompt**; use that exact prompt for best results.
- Supports optional reasoning via the `enable_thinking` chat-template kwarg.
- Vision: pass an image with the user turn; the model reads it and answers or calls a tool.
- Tool calls are plain text `tool:<name> {json}` β€” one per turn.
## License
Derivative of Qwen3.5-2B under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).