Text Classification
MLX
Safetensors
English
Japanese
gemma4
d1a
decision-model
pull-requests
apple-silicon
quantized
8-bit precision
on-device
Run this model with HF Jobs
Run JohnP1/d1a-e4b-it-mlx-q8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/JohnP1/d1a-e4b-it-mlx-q8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/JohnP1/d1a-e4b-it-mlx-q8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use JohnP1/d1a-e4b-it-mlx-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use JohnP1/d1a-e4b-it-mlx-q8 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download JohnP1/d1a-e4b-it-mlx-q8 --local-dir d1a-e4b-it-mlx-q8
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
D1A-E4B-it v0.6: README.md
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273---license: apache-2.0base_model: google/gemma-4-E4B-itlibrary_name: mlxpipeline_tag: text-classificationlanguage: [en, ja]tags: [d1a, decision-model, pull-requests, mlx, apple-silicon, quantized, 8-bit, on-device]---
<p align="center"><img src="https://huggingface.co/JohnP1/d1a-e4b-it-mlx-q8/resolve/main/d1a-avatar.png" width="200" alt="D1A avatar: an anime girl with silver-white and dark purple hair, round glasses and headphones on a round #D1A badge"></p>
# D1A-E4B-it v0.6 · MLX 8-bit
**A small decision model for Apple Silicon: give it a document and a few questions, and it picks the answers.** Each questionis yes/no, multiple choice or a score; D1A returns a calibrated probability for every option in one forward pass, with nogenerated text, so every answer is a valid option.
This is the 8-bit MLX build of [JohnP1/d1a-e4b-it](https://huggingface.co/JohnP1/d1a-e4b-it) v0.6, with the adapter mergedinto its weights. Scores, training and limits are on that card; how far this build moves from the served chat build is below.
```pythonfrom d1a import D1A # pip install "d1a[serve,mlx,media] @ git+https://github.com/jonpol01/d1a" (needs jonpol01/d1a#261)m = D1A.load("JohnP1/d1a-e4b-it-mlx-q8@v0.6")m.decide("The customer was charged twice for the same order and wants a refund today.", {"team": {"type": "choice", "instructions": "Which team handles this?", "criteria": {"billing": None, "shipping": None, "support": None}}, "angry": {"type": "noul", "instructions": "Is the customer angry?"}})```
**Not a chat model.** This build has the adapter merged into its weights, so it answers D1A decisions only; text generatedfrom it would come from a changed backbone, not Gemma 4 E4B-it. To chat with the same model that decides, build an unmergedfolder from the adapter: see [Enable chat](https://huggingface.co/JohnP1/d1a-e4b-it#enable-chat).
**`<bos>`: encode with it.** The Gemma 4 E4B-it tokenizer adds no `<bos>`, but this model was trained with one at the startof every record (`d1a_config.json` records `leading_ids: [2]`). If you encode requests yourself, prepend id 2.
## What's inside
- the LoRA adapter merged into Gemma 4 E4B-it (revision `ee0ef602`); linear layers and token embeddings 8-bit (group 64), per-layer embeddings 4-bit;- pointer head fp32 (`head.safetensors`);- calibration temperature 1.55 in `d1a_config.json`, the run's, not refitted for this build; no use-case temperatures;- 6.1 GB on disk for the text model, plus 0.9 GB of photo, voice and video encoders in `media/` (unchanged from the -it base).
## Against the served build
Same code, this build against the unmerged 8-bit chat build the Mac mini serves (`quality_gate.py`, Apple M1 Max): 145 demo requests (202 questions) and 92 PR-labeler states (276 questions).- **1 of 202** demo answers and **3 of 276** labeler answers change; largest probability change 0.073;- model time 1.01× the chat build's.
Numbers on the [D1A-E4B-it card](https://huggingface.co/JohnP1/d1a-e4b-it) were measured on the chat build, so they carry over to this build within those flips.
## Run it
```bashpip install "d1a[serve,mlx,media] @ git+https://github.com/jonpol01/d1a"python -m d1a.serving.serve --run JohnP1/d1a-e4b-it-mlx-q8@v0.6 --port 8009```
## Limits
- Everything on the [D1A-E4B-it card](https://huggingface.co/JohnP1/d1a-e4b-it#limits) applies.- **The adapter is merged**, so this build cannot chat (above).- **`<bos>`**: requests encoded without the leading id 2 are out of distribution.
## Versions
| Tag | What it is ||---|---|| **`v0.6`** | **MLX 8-bit build of D1A-E4B-it v0.6 (adapter merged)** |
## License and data
Apache-2.0. Base model: Gemma 4 by Google (Apache-2.0). Code: [github.com/jonpol01/d1a](https://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.README.mdAdded+73