Instructions to use JohnP1/d1a-e2b-it-mlx-q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use JohnP1/d1a-e2b-it-mlx-q4 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download JohnP1/d1a-e2b-it-mlx-q4 --local-dir d1a-e2b-it-mlx-q4
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
![]()
D1A-E2B-it v0.6 · MLX 4-bit (experimental)
A small decision model for Apple Silicon: give it a document and a few questions, and it picks the answers. Each question is yes/no, multiple choice or a score; D1A returns a calibrated probability for every option in one forward pass, with no generated text, so every answer is a valid option.
This is the 4-bit MLX build of JohnP1/d1a-e2b-it v0.6, an experimental build
for on-device apps that already load Gemma 4 E2B-it. It is quantized from the same run as the 8-bit build
JohnP1/d1a-e2b-it-mlx-q8; no separate training. The iPhone proof of
concept it was made for went a different way (2026-10-13, iPhone 17 Pro): D1A ran as an unmerged LoRA adapter on the
app's own mlx-community/gemma-4-e2b-it-4bit, rather than as these merged weights.
- 0 of 42 answers differ from the Mac; 0.52 s per request.
- The adapter loads in 0.05 s and adds 25 MB.
- With the adapter off, the model's hidden states are bit-identical to the base, so generation, vision and audio keep base quality.
These merged weights remain the simple route on a Mac, or for an app that does not already hold Gemma.
The -it model is below JohnP1/d1a-e2b v0.6 where it has been measured (severity −4.3 points on newer PRs, media 21/28 against 25/28 agreement with E4B v0.6, both on the 8-bit build), and E4B v0.6 remains the PR labeler. This 4-bit build has not been scored on any evaluation set. Its only check so far is the Mac comparison below.
<bos>: encode with it. The Gemma 4 E2B-it tokenizer adds no <bos>, but this model was trained with one at the start
of every record. d1a from jonpol01/d1a#261 on (merged as b4b0f989) puts it back (bos_token_id 2; d1a_config.json records leading_ids: [2]). An app
that encodes requests itself must prepend id 2.
What's inside
- the LoRA adapter merged into Gemma 4 E2B-it (revision
3e22461f); linear layers and token embeddings 4-bit (group 64), per-layer embeddings 4-bit (4.5 bits per weight overall); - pointer head fp32 (
head.safetensors), the same file as the 8-bit build; - calibration temperature 1.41 in
d1a_config.json, the run's, not refitted for 4-bit; - 2.5 GB on disk for the text model, plus 0.9 GB of photo, voice and video encoders in
media/(the same files as the 8-bit build, unchanged from the -it base).
Mac check on an Apple M1 Max, 28 real requests of up to 512 tokens (42 questions), against the fp32 PyTorch rebuild of the 8-bit export: p50 190 ms, p95 318 ms per request (28 requests), 14 s to load; 4 of 42 answers change (2 of 40 clear-cut ones, where the reference's top answer leads by more than 0.05); largest probability change 0.339.
Results of the 8-bit build (same run)
487 hermes-agent pull requests created after every PR in the training mix, MLX 8-bit at served temperatures, paired 95% bootstrap intervals (details on the 8-bit card):
| Question | E2B-it v0.6 (8-bit) | E2B v0.6 (8-bit) | E4B v0.6 | E2B-it − E2B v0.6 |
|---|---|---|---|---|
| Severity (P0–P4) | 72.9% | 77.2% | 79.1% | −4.3 [−7.8, −1.0] |
| Change type | 87.3% | 87.5% | 90.6% | −0.2 [−3.1, +2.7] |
Photos, voice and video (8-bit build): all 14 demo requests answered; 21 of 28 answers match E4B v0.6 (E2B v0.6: 25 of 28). The card suites (transfer-v4, hard, devtools, documents, decision-v7, JGLUE) are not measured yet on either build.
The bar registered for this run before training (jonpol01/d1a#227, Bar B) failed on severity and media. It is published by the owner's decision of 2026-10-12 for an iOS proof of concept.
Run it
Needs d1a with jonpol01/d1a#261:
pip install "d1a[serve,mlx] @ git+https://github.com/jonpol01/d1a"
python -m d1a.serving.serve --run JohnP1/d1a-e2b-it-mlx-q4@v0.6 --port 8009
or in-process: from d1a import D1A; D1A.load("JohnP1/d1a-e2b-it-mlx-q4@v0.6").decide(state, questions).
Limits
- Not scored on any evaluation set at 4 bits. Expect it to differ from the 8-bit build's numbers; the Mac check above is the only measurement.
- Everything on the 8-bit card applies: experimental, below E2B v0.6 on severity and media, not a PR labeller (E4B v0.6 is),
most suites not measured, gate tool calls through D1A's fail-safe thresholds (
d1a.agents.presets.advise), zero-shot media measured on 14 demo requests. <bos>: requests encoded without the leading id 2 are out of distribution.- Questions are in English. The documents can be English or Japanese.
Versions
| Tag | What it is |
|---|---|
v0.6 |
MLX 4-bit build of D1A-E2B-it v0.6 (experimental) |
License and data
Apache-2.0. Base model: Gemma 4 by Google (Apache-2.0). Code: github.com/jonpol01/d1a, built on Kev by Jared Palmer (Apache-2.0). Japanese decision data derived from JGLUE by Yahoo Japan Corporation and Waseda University (CC BY-SA 4.0). Pull-request data from NousResearch/hermes-agent (MIT); the labelled PR dataset itself, including the recent PRs, is private.
- Downloads last month
- -
4-bit