An unofficial Apple Silicon conversion of Google DeepMind’s CellGemma E4B. This is not a chat model. Stage 1 emits a ranked list of signed genes from a baseline and perturbation prompt. All 13 upstream dataset-specific Stage 2 expression decoders are included unchanged under decoders/.
What “6-bit” means: MLP projections use 6-bit affine weights (group size 32); attention projections use 8-bit (group size 32); the per-layer embedding lookup uses 8-bit (group size 64). The tied token embedding and per-layer projection/gate linears stay in BF16. No distillation. The measured average is 8.6787 bits per weight; the two main shards total 8.39 GB (decimal). The quantized tensors are the ones benchmarked, not a new conversion.
Download the complete repository. From its root on an Apple Silicon Mac, install the measured runtime in a Python 3.12 virtual environment with python -m pip install -r requirements-mac.txt. This short greedy example uses a bundled benchmark input; it needs neither a Studio installation nor remote model code.
from pathlib import Path
from mlx_lm import load
from mlx_lm.generate import stream_generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load('.', tokenizer_config={'trust_remote_code': False}, trust_remote_code=False)
tokenizer.add_eos_token('<turn|>')
wrapped = Path('examples/k562-input.txt').read_text()
ids = tokenizer.encode(wrapped, add_special_tokens=False) # input already includes BOS
for response in stream_generate(model, tokenizer, ids, max_tokens=32, sampler=make_sampler(temp=0)):
print(response.text, end='', flush=True)
print()
The 32-token example is a load/generation smoke test, not a complete prediction. The benchmark used an 8,192-token cap. For input conventions, decoder reconstruction, intended use, and limitations, see the original model card. Its Transformers loading example is for the original BF16 weights; use MLX-LM for this conversion.
One native run on an Apple M4 Mac mini with 24 GB unified memory, MLX 0.32.2 and MLX-LM 0.32.0. Both cases used greedy decoding and the same saved original-weight Spark BF16 reference. LFC Pearson compares the reconstructed log-fold-change vectors; Spearman compares signed ranks on shared genes.
| Case | Tokens | Finish reason | LFC Pearson | Signed-rank Spearman |
|---|---|---|---|---|
| K562 | 1,705 | stop | 0.817 | 0.939 |
| Tahoe | 8,192 | length limit | 0.877 | 0.942 |
Peak MLX allocation was 8.64 GiB, with 0 GiB net system-wide swap growth. The automated output and memory checks passed; the Studio report is review_needed, not operator-approved. These comparisons measure agreement with the original model on two inputs, not experimental accuracy, clinical validity, or performance on other workloads.
validation.json contains scoped measurements and source/reference identifiers. recipe.json records the precision policy; conversion-runtime.json records conversion library versions. SHA256SUMS covers the release files (excluding itself). Verify with shasum -a 256 -c SHA256SUMS from this directory.
The original model and decoders are by Google DeepMind. MLX Conversion Studio converted the language model to mixed precision. This derivative is not an official Google release. See LICENSE, NOTICE, and the upstream model card.
Have the files? Publish a torrent.
Publish a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo joeynyc/CellGemma-E4B-MLX-6bit-Mixed ./model-foldermodel-00001-of-00002.safetensors 4.8 GiBmodel-00002-of-00002.safetensors 3.1 GiBdecoders/dong/model.safetensors 11.8 KiBdecoders/emeraldbay/model.safetensors 11.8 KiBdecoders/hepg2/model.safetensors 11.8 KiBdecoders/jurkat/model.safetensors 11.8 KiBdecoders/k562/model.safetensors 11.8 KiBdecoders/l1000/model.safetensors 11.8 KiBdecoders/norman/model.safetensors 11.8 KiBdecoders/parse/model.safetensors 11.8 KiBdecoders/rpe1/model.safetensors 11.8 KiBdecoders/sciplex/model.safetensors 11.8 KiBdecoders/tahoe/model.safetensors 11.8 KiBdecoders/tisch/model.safetensors 11.8 KiBdecoders/vcc/model.safetensors 11.8 KiBgoogle/cellgemma-e4b