Apple Silicon conversion of google/cellgemma-e4b, pinned to 6212145e0131d3744171739ea5232afc6aaa7c76.
Original model and ExpressionDecoders by Google DeepMind. This is an independent community conversion.
Apache-2.0; see upstream model card for attribution, datasets, methods and limitations.
CellGemma is not a chatbot. It predicts ranked residual gene changes relative to a mean-shift baseline. Use the exact upstream preamble, turn format, gene vocabulary and dataset-matched decoder. This export includes all ExpressionDecoder weights, means, control samples and knowledge-graph descriptions. Decoders retain their original safetensors names and support both PyTorch and the Cellarium MLX implementation.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load("bsisduck/cellgemma-e4b-mlx-4bit")
# Build `prompt` with the exact upstream CellGemma template, NOT apply_chat_template.
# It must include the preamble, perturbation, Source, Mean Global prediction, Target.
# tokenizer.encode(prompt, add_special_tokens=False) avoids a duplicate BOS.
tokenizer.add_eos_token("<turn|>")
# output = generate(model, tokenizer, prompt=tokenizer.encode(prompt, add_special_tokens=False),
# max_tokens=8192, sampler=make_sampler(temp=0.7, top_p=0.95, top_k=64))
Use mlx-lm==0.32.2, mlx==0.32.5, transformers==5.25.0 or compatible versions.
The E4B name refers to effective compute parameters, not total stored parameters.
4-bit conversion changes numerical predictions; equivalence in biological benchmark quality is not established.
See conversion.json for provenance and validation.json for measured technical checks.
Research use only. Outputs are hypotheses requiring validation, not clinical advice or treatment recommendations.
model.safetensors 4.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