Instructions to use xmattwest/saccade-d1-2b-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use xmattwest/saccade-d1-2b-adapters with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("xmattwest/saccade-d1-2b-adapters") config = load_config("xmattwest/saccade-d1-2b-adapters") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Saccade v2.0 Adapters (d1-2B / LFM3 Browser Reflex Suite)
Saccade is a sub-1 GiB local browser reflex layer for coding agents (Claude Code, Codex, Antigravity, OpenCode, Cursor, and 30+ MCP clients). Instead of sending 3,000 to 6,000 raw DOM tokens to a frontier cloud model on every click, Saccade runs six FP16 LoRA adapters (96 MB total on disk) on a single shared LiquidAI/d1-2B-MLX-4bit backbone (1.00 GiB active RAM for DOM work, 1.35 GiB when vision pages in, 0.00 GiB when idle).
- Overview & Benchmarks: https://shelltoho.me/tools/saccade/
- Source Code & Rust Relay (
MIT): https://github.com/xmattwest/saccade - Architecture Study (Inside LFM3): https://shelltoho.me/pubs/inside-lfm3/
Included LoRA Adapters
All adapters attach rank-8 (alpha = 16.0) FP16 LoRA weights across all 24 hybrid convolution-attention layers (q_proj, k_proj, v_proj, o_proj, in_proj, out_proj, w1, w2, w3) of LiquidAI/d1-2B (pinned commit a6bce774e6dde338dcc3036ceb5d91f78bf4c19e) and execute seamlessly on LiquidAI/d1-2B-MLX-4bit (0.17 ms average hot-swap latency):
| Adapter Folder | Task & Head Layout | Training Data | Key Held-Out Test Result |
|---|---|---|---|
d1_reflex_v2/ |
Single-pass joint [pick, destructive, injection] (Choice + 2 Noul heads) |
McGill-NLP/WebLINX + Headless Chrome capture.js snapshots + deepset/prompt-injections (1,500 train) |
76.07% Top-1 (83.46% M4 slice), 66.67% coverage at >= 90% precision (+25.0 pp over zero-shot), 1.0000 firewall AUROC (100% hazard recall, 0% benign false alarms, 100% localhost QA allow rate) |
d1_som_grounder/ |
Set-of-Marks [1]..[12] visual UI badge Choice (<canvas> & unlabeled <svg> icons) |
mlfoundations/Click-100k (1,150 train) |
87.67% on 300 held-out ScreenSpot test images (85.0% on 4-bit Apple M4), up +67.0 pp from 20.67% raw Box coordinates |
d1_pointer_etl/ |
Zero-token Read span-pointer (text, number, date, BOS0 null abstention) |
rajpurkar/squad_v2 + Chrome multi-field SaaS cards (900 train) |
97.03% BOS0 null abstention accuracy (+6.9 pp), 100.0% multi-field Chrome card exact accuracy (0 generated tokens, 482 ms live) |
d1_handoff_guard/ |
Standalone 2-slot [destructive, injection] pre-CDP middleware firewall |
Chrome capture.js Danger Zone + deepset/prompt-injections |
1.0000 AUROC (100.0% destructive & prompt-injection recall on direct click/fill/eval calls) |
d1_aftermath_tm/ |
Post-action [before, after] crop + ARIA diff state classifier |
Chrome capture.js state transitions (4 classes) |
100.0% 4-class transition accuracy (advanced, validation_error, noop, loading) |
d1_quickjs_etl/ |
Causal LFM3 generation (CausalD1View) for multi-step QuickJS synthesis & nested JSON |
JSONSchemaBench + Chrome QuickJS reference pairs |
100.0% QuickJS syntax & ARIA ref validity (0 hallucinated eXX refs) |
Live Headless Chrome Savings (Stock vs. Saccade v2.0)
Measured end-to-end against real Google Chrome over CDP across Sprint issue filtering, 127.0.0.1 QA database resets, live production repo-deletion traps, prompt-injected support tickets, unlabeled <svg> toolbar icons, 4-field subscription cards, and 3-page invoice pagination:
- Wall-Clock Time: Cut from
25.01 s(stockbrowse) to13.16 s(1.90xfaster), and1.43xfaster than two-pass Saccade v1.0 (18.81 s). - Cloud Tokens: Cut from
3,396tokens (10cloud turns) to1,046tokens (-69.2%); across a 20-workflow (100-step) SaaS suite, cloud tokens dropped-70.6%(122,627to36,058). - Pre-CDP Safety & Privacy: Blocked
2 / 2live destructive and prompt-injected actions before CDP dispatch (0DOM mutations vs.2 / 2executed on stock), allowed100%of explicitlocalhostQA resets (p = 0.0000), and scrubbed100%of outbound emails, SSNs, cards, and API keys in254 us.
Quickstart (Apple Silicon MLX + Rust browse)
# 1. Clone Saccade and build the native Rust binary:
git clone https://github.com/xmattwest/saccade.git && cd saccade
cargo build --manifest-path rust-browse/Cargo.toml --release -p browse
# 2. Bootstrap MLX venv, pull the 96 MB LoRA suite + 1.25 GB d1-2B-MLX-4bit backbone, and link globally:
./bin/saccade-engine --setup
# 3. Pair Chrome with the `browse` extension (https://chromewebstore.google.com/detail/mfnicocicmmlkpjnaffgihfjhdgjkdjg) and register across all MCP agents:
./rust-browse/target/release/browse pair
./rust-browse/target/release/browse install --yes
Background Chrome startup (relay update)
The current Saccade Rust relay
can start your paired Chrome profile in the background on macOS when a browser
tool runs with no browser connected. Parallel calls share one attempt, with an
8-second reconnect budget and a 20-second cooldown after failure. It uses the
paired browse extension, not Chrome DevTools remote debugging. Status and
tool-discovery calls do not launch Chrome.
Update the code with git pull --ff-only, rebuild the Rust binary, and restart
the shared relay. The controls are BROWSE_AUTO_LAUNCH (default true, disabled
by 0 or false), BROWSE_CHROME_APP (default Google Chrome),
BROWSE_CHROME_PROFILE (auto-detected directory name), and
BROWSE_AUTO_LAUNCH_TIMEOUT_MS (default 8000). An ambiguous profile requires
an explicit override; the relay does not enable a disabled extension.
No adapter update is needed. This changes relay startup behavior only. The six adapter files and the inference results above are unchanged. The live reconnect check kept Chrome open; a fully closed Chrome launch and different-profile fallback were not live-tested in that check.
Direct Python Sidecar Usage
from pathlib import Path
from sidecar.server import SaccadeSidecarService
svc = SaccadeSidecarService(Path("sidecar/adapters"), lazy_vision=True)
# Single-pass DOM ref choice + environment-aware pre-CDP firewall (~600 ms, 1.00 GiB RAM)
verdict = svc.handle({
"method": "act_and_guard",
"params": {
"subgoal": "Click the Past Due Only button",
"user_goal": "Filter billing invoices to past due",
"page_url": "https://billing.example.com/invoices",
"snapshot": '- main "Billing":\n - button "All Invoices" [ref=e1]\n - button "Past Due Only" [ref=e2]',
},
})
print(verdict)
Scope & Limitations
- Hardware Target: Optimized for Apple Silicon Macs (
M1throughM4,>= 8 GBunified memory) viamlxandmlx-vlm. Training scripts targetBF16PyTorch on a single 24 GB NVIDIA GPU (RTX 4090). - Calibrated Abstention, Not Autonomous Planning: Saccade handles clear UI micro-steps, schema reads, and paginated table sweeps locally. When confidence falls below its calibrated threshold (
tau), it abstains and returns a< 0.5 msBM25-foveated, PII-redacted snapshot so the frontier model makes the call. - Defense in Depth:
d1_reflex_v2andd1_handoff_guardpause high-risk mutations viabrowse.handoff()for human confirmation; they complement rather than replace origin allowlists (allowedOrigins) and read-only tab modes (readOnly: true).
Citation & License
Released under the MIT License. Built on LiquidAI/d1-2B and anomalyco/browse (MIT).
@software{west2026saccade,
author = {West, Matt},
title = {Saccade: A Sub-1 GiB Local LFM3 Browser Reflex Layer for Coding Agents},
year = {2026},
url = {https://shelltoho.me/tools/saccade/}
}
Quantized