Downloads · 30 days
114
14% of all-time downloads
maglun/Gemma-4-E4B-it-Text-MLX-Mixed-3.40bpw
Gemma-4-E4B-it-Text-MLX-Mixed-3.40bpw is a text generation model from maglun. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
Downloads · 30 days
114
14% of all-time downloads
All-time downloads
795
Public
Parameters
7.5B
3.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors3.2 GB · 99%
How the weights are stored.
U327.5B · 100%
From the Hugging Face model README
TEXT-ONLY MLX QUANTIZATION
An experimental text-only MLX affine mixed-precision quantization of google/gemma-4-E4B-it. This is my first public quantization at this model scale, so practical feedback from people who try it is especially welcome. It is intended for local text generation on Apple Silicon using MLX-LM; feedback and discussion are welcome through the maintainer account maglun.
This is a compressed model, not a claim of lossless behavior or a new quality frontier. It was selected as the project's compact validated E4B point and evaluated against the bf16 E4B H0 comparator with thinking enabled.
Fig 1. Bit allocation of model as shown on TensorLens (see link for details)
pip install mlx-lm
python -m mlx_lm.generate \
--model maglun/Gemma-4-E4B-it-Text-MLX-Mixed-3.40bpw \
--prompt "Explain why the sky appears blue." \
--temp 0
The packaged current official Gemma 4 chat template is used by default, with thinking enabled by the tested chat path. For programmatic use, use the standard mlx_lm APIs and the tokenizer files included here. The tested runtime was MLX 0.32.0, MLX-LM 0.31.3, Python 3.12 on an Apple M4 Pro with 64 GB memory.
The current official template includes thinking-channel formatting and tool-call/tool-response message formatting. Tool calling was not a separately scored capability benchmark in this release, so the tool-calling tags describe the packaged interface/template support rather than a quality or reliability guarantee for autonomous tool use.
These are measurements on one Apple M4 Pro Mac mini, with thinking enabled, greedy temperature 0, batch size 1, fresh processes, and no intentional concurrent benchmark load. They are not universal speed claims.
| Measurement | Result |
|---|---|
| Cold load, median (3 trials) | 1.002 s (0.992–1.377 s) |
| 2,048-token prompt; up to 256 generated | 235 tokens, normal stop |
| 2K end-to-end generation, median | 4.769 s (4.765–4.774 s) |
| 2K prefill rate, median | 1,236.00 tok/s (1,233.55–1,236.60) |
| 2K decode rate, median | 78.32 tok/s (78.22–78.52) |
| 2K MLX peak / process RSS | 3.783 / 4.076 GiB |
| 8,192-token functional context | 256 tokens, length finish; 4.117 GiB MLX peak; 4.082 GiB RSS |
Prefill and decode rates come from stock mlx_lm.stream_generate telemetry. Decode rate is not derived from total wall time. Full machine context is retained in the private release evidence.
Release-time evaluation used the current official E4B template, greedy temperature 0, thinking enabled, the same prompt/scorer harness for candidate and bf16 H0, and no optional comparator. All scores use frozen full denominators; operational failures remain incorrect.
| Task / metric | Candidate | bf16 H0 | Difference |
|---|---|---|---|
| IFEval strict prompt | 459/541 (84.84%) | 472/541 (87.25%) | −2.40 pp |
| IFEval strict instruction | 747/834 (89.57%) | 763/834 (91.49%) | −1.92 pp |
| IFEval loose prompt | 474/541 (87.62%) | 488/541 (90.20%) | −2.59 pp |
| IFEval loose instruction | 764/834 (91.61%) | 780/834 (93.53%) | −1.92 pp |
| MMLU-Pro-400 accuracy | 236/400 (59.00%) | 272/400 (68.00%) | −9.00 pp |
| HumanEval+ pass@1 | 135/164 (82.32%) | 147/164 (89.63%) | −7.32 pp |
| GSM8K-400 accuracy | 369/400 (92.25%) | 371/400 (92.75%) | −0.50 pp |
| Aggregate / average† | 3184/3714 (85.73%) | 3293/3714 (88.66%) | −3.66 pp average |
Operational anomalies were retained in the denominator: one candidate IFEval cap hit, five H0 MMLU-Pro watchdog timeouts, and one candidate HumanEval+ evaluator timeout. There were no GSM8K anomalies.
†Totals sum the displayed rows, while the difference is the unweighted average of the seven displayed percentage-point differences. The four IFEval views are counted separately; this descriptive aggregate is not a QRS or a single-suite score.
google/gemma-4-E4B-it@a4c2d58be94dda072b918d9db64ee85c8ed34e3f.ee0ef6023621cff504d758262d4e04895a5af4a2.chat_template.jinja SHA-256: 0a2c8073c878ab1da004bee933a998606537bbb62016310352c7285c3f01c5b5.2f1b4d75d067bae3fe44e676721c7f077d243bc007156cb9c2f8b5836613d082; it is retained only as clearly inert reference material and is not the runtime template.3.4007947088485322 bits/weight, labelled 3.40 bpw using a denominator of 7,463,013,418 parameters.8de1a304992cc0823b5adfa9acf8ca0be00ab55561a48b925d8f28bc3b990759.6624ef34a24eaa2ac2ebac7a1d9905280b1a5ff6ee07957781a0eb72ae92c044.The quantization recipe, source provenance, file hashes, and package manifest are included with this release. This model is explicitly text-only: no image, audio, or multimodal processor support is included.
The public lineage is: bf16 text extraction H0 → AWQ fold → KGB mixed-precision allocation → GPTQ-style rounding/build stage → MLX affine conversion. The policy and calibration hashes, parameter denominator, and output identity are recorded in quantization_recipe.json and the release evidence.
Quantization changes model behavior, including long-form completion and benchmark outcomes. The compact point shows measurable reductions versus H0 on MMLU-Pro and HumanEval+, while GSM8K remains close in this evaluation. Hardware testing covers one Apple M4 Pro configuration. This is an experimental research preview with no company or product support and no additional safety tuning beyond the upstream model. Do not infer broad safety, multilingual, or production-readiness claims from these results.
The package is released under Apache-2.0 terms applicable to the upstream model; see LICENSE. Gemma usage remains subject to Google's Gemma 4 license terms, including applicable attribution and usage requirements.
Please cite the upstream Gemma 4 E4B-it work and identify this repository and exact revision when reporting results. Feedback and corrections are welcome through the maglun maintainer account and repository discussions. This release is related to, but not directly score-comparable with, the earlier Serial 0 E2B release because the model sizes and weights differ.