What's inside
- The D1A LoRA adapter (rank 16) and pointer head, trained on Google's quantization-aware-trained int4 trunk
google/gemma-4-E2B-it-qat-w4a16-ct (revision
971342c0): D1A-E2B-it
v0.6's adapter, retrained for one epoch of its all-skills mix on that exact trunk (jonpol01/d1a#341).
base_ct in d1a_config.json names that checkpoint. d1a rebuilds the trunk from it when it loads this adapter, every
int4 weight written as scale × integer, so the adapter runs on the weights it was trained on. Exact in fp32 (D1A_DTYPE=fp32),
rounded in bf16.
- Calibration temperature 1.55, fitted on the MLX build's answers (decision-v7 calibration + PR-label development).
- Loading downloads Gemma 4 E2B-it (about 10 GB) and the QAT checkpoint (about 8 GB).
Run it
Needs d1a with jonpol01/d1a#346 and #348, and on a Mac's GPU (MPS) #354:
pip install "d1a[serve,media] @ git+https://github.com/jonpol01/d1a"D1A_MERGE=0 python -m d1a.serving.serve --run JohnP1/d1a-e2b-it-qat --port 8009
Decisions and chat come from that one server: D1A_MERGE=0 keeps the adapter separate, so chat switches it off and talks as
Gemma 4 E2B-it QAT itself. Photos, voice and video come from the media server, which loads the full model with its encoders
(the QAT checkpoint's own, the vision projection QAT retrained included):
python -m d1a.serving.media --run JohnP1/d1a-e2b-it-qat --port 8010
Checks
On an Apple M1 Max, PyTorch bf16 (MPS), this repo's files as published:
- Decisions: the README's example request answers
billing 0.65 (the MLX build: 0.67).
- Chat: answers and streams.
- Photos, voice and video: the playground's 14 media requests all answered; 27 of 28 answers the same as the MLX build.
- The suites were measured on the MLX build of this adapter (scorecard).
Limits
- Release exception: transfer-v4 −5.2 points against D1A-E2B-it v0.6 (task types outside training). Pin
JohnP1/d1a-e2b-it@v0.6 where those matter.
- PyTorch on a Mac's GPU (MPS) needs d1a with jonpol01/d1a#354, or torch 2.14 or later. Before it, PyTorch's MPS
embedding kernel read part of Gemma 4's per-layer embedding table as zeros: for E2B, token ids from 239,675 (tabs, some CJK,
emoji, and the image start and end tokens; jonpol01/d1a#353, pytorch/pytorch#188756). The MPS checks above ran before that
fix. NVIDIA, the CPU and the MLX build were never affected.
<bos>: trained with id 2 at the start of every record; d1a adds it.
- Questions are in English; the documents can be English or Japanese.
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.