cellgemma-q4-v1)Pre-quantized Q4_0 (block size 32, 18 bytes/block) weights for google/cellgemma-e4b, sharded into 36 binary files (<= 128 MiB each) so every tensor fits within standard WebGPU maxStorageBufferBindingSize limits and runs comfortably on 8 GB GPUs (including in-browser WebGPU via Wasm and native Vulkan via wgpu).
google/cellgemma-e4b (Gemma4ForCausalLM, gemma4_text, 42 layers, 4.5B effective / 7.73B total params, 282,240 vocab)| Metric | Value |
|---|---|
| Format | cellgemma-q4-v1 (Q4_0 block-32, 256-byte aligned, LE) |
| Shards | 36 files (shard-000.bin .. shard-035.bin) |
| Max Shard Size | 133,594,624 bytes (127.41 MiB, <= 128 MiB) |
| Total Weight Size | 4,350,358,804 bytes (4.052 GiB) |
embed_tokens (4 row-shards) |
406,425,600 bytes (387.60 MiB) |
PLE (42 per-layer tables) |
1,706,987,520 bytes (1.590 GiB) |
| Transformer + Norms + PLE Proj | 2,236,945,684 bytes (2.083 GiB) |
| Total GPU VRAM (GPU PLE mode) | ~4.33 GiB (4,429.63 MB measured on RX 6600 XT 8GB) |
| Total GPU VRAM (CPU PLE mode) | ~2.74 GiB (2,801.72 MB measured on RX 6600 XT 8GB) |
manifest.json — shard & tensor index (709 tensors)shard-000.bin .. shard-035.bin — Q4_0 weights + F32 norms/scalarsconfig.json — original Gemma 4 text configtokenizer.json — extended 282,240-token vocabulary (with ~20K HGNC gene symbols)controls_sample.json — baseline control cell expression profileskg_sentences.json — knowledge-graph gene descriptions for CRISPR/cytokine promptsdecoders/<dataset>/ — all 13 Stage 2 ExpressionDecoder MLPs (dong, emeraldbay, hepg2, jurkat, k562, l1000, norman, parse, rpe1, sciplex, tahoe, tisch, vcc)cellgemma-wasm-wgpuThis repository hosts the 4.052 GiB Q4_0 weights, tokenizer, baseline controls, gene knowledge graph, and 13 Stage 2 ExpressionDecoders. Pair it with the Rust/Wasm + WebGPU FlashAttention-style engine and interactive Perturbation Lab UI at lhemerly/cellgemma-wasm-wgpu:
git clone https://github.com/lhemerly/cellgemma-wasm-wgpu
cd cellgemma-wasm-wgpu
python3 scripts/serve.py --port 8080
Open http://localhost:8080 in a WebGPU-enabled browser, then paste this URL into the Model Loader -> Custom URL field:
https://huggingface.co/lhemerly/cellgemma-e4b-q4-webgpu/resolve/main
From the browser UI you can:
ExpressionDecoders, adjust Temperature / Top-P / Top-K / Seed, stream +GENE/-GENE DEGs live, and compare runs side-by-side.Download these quantized weights into models/cellgemma-e4b-q4/ inside the cloned repo:
git clone https://github.com/lhemerly/cellgemma-wasm-wgpu
cd cellgemma-wasm-wgpu
# Using HuggingFace CLI:
hf download lhemerly/cellgemma-e4b-q4-webgpu --local-dir models/cellgemma-e4b-q4
# Or using Git LFS:
# git lfs install
# git clone https://huggingface.co/lhemerly/cellgemma-e4b-q4-webgpu models/cellgemma-e4b-q4
python3 scripts/serve.py --port 8080
The WebGPU Lab automatically detects /models/cellgemma-e4b-q4/manifest.json on startup (or you can pick any local model folder via the Folder picker).
wgpu Vulkan / Metal / DX12)Once the weights are in models/cellgemma-e4b-q4/, run native GPU inference directly from Rust:
# GPU PLE mode (~4.33 GiB VRAM)
cargo run --release -p cellgemma-cli -- \
--model-dir models/cellgemma-e4b-q4 \
--dataset tahoe \
--max-new-tokens 128
# CPU PLE offload mode (~2.74 GiB VRAM)
cargo run --release -p cellgemma-cli -- \
--model-dir models/cellgemma-e4b-q4 \
--dataset tahoe \
--ple-cpu \
--max-new-tokens 128
shard-028.bin 127 MiBshard-032.bin 127 MiBshard-033.bin 125 MiBshard-020.bin 122 MiBshard-023.bin 122 MiBshard-034.bin 121 MiBshard-019.bin 121 MiBshard-022.bin 121 MiBshard-025.bin 120 MiBshard-026.bin 118 MiBshard-031.bin 118 MiBshard-029.bin 117 MiBshard-027.bin 117 MiBshard-030.bin 117 MiBshard-017.bin 116 MiBshard-004.bin 116 MiBshard-005.bin 116 MiBshard-006.bin 116 MiBshard-007.bin 116 MiBshard-008.bin 116 MiBshard-009.bin 116 MiBshard-010.bin 116 MiBshard-011.bin 116 MiBshard-012.bin 116 MiBshard-013.bin 116 MiBshard-014.bin 116 MiBshard-015.bin 116 MiBshard-016.bin 116 MiBshard-018.bin 114 MiBshard-021.bin 114 MiBshard-024.bin 114 MiBshard-035.bin 101 MiBshard-000.bin 97 MiBshard-001.bin 97 MiBshard-002.bin 97 MiBshard-003.bin 97 MiBdecoders/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