Run this model with HF Jobs
Run google/cellgemma-e4b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/google/cellgemma-e4b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/google/cellgemma-e4b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/google/cellgemma-e4b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/google/cellgemma-e4b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use google/cellgemma-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/cellgemma-e4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="google/cellgemma-e4b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("google/cellgemma-e4b") model = AutoModelForCausalLM.from_pretrained("google/cellgemma-e4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use google/cellgemma-e4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "google/cellgemma-e4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/cellgemma-e4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/google/cellgemma-e4b
- SGLang
How to use google/cellgemma-e4b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "google/cellgemma-e4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/cellgemma-e4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "google/cellgemma-e4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/cellgemma-e4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use google/cellgemma-e4b with Docker Model Runner:
docker model run hf.co/google/cellgemma-e4b
VCC decoder drops current HGNC symbols when its axis uses older names
I compared the released VCC mean-shift keys to the checkpoint's registered gene symbols. The keys match all 18,080 Arc VCC feature names after uppercasing. Of those names, 468 are outside the registered gene set. I found a one-to-one match by Ensembl ID to a registered symbol for 368 of the 468 using HGNC.
In a local 50-token bfloat16 run for MTFR1, CellGemma emitted +H4C16. The released VCC axis has HIST4H4 (Ensembl ENSG00000197837). The model-card parser uses exact symbol lookup, so it dropped the mention and left that gene at the mean-shift value. Mapping it to the published VCC column changed its predicted log-expression shift by 0.0103.
I also replayed full saved 8-bit completions for the same 50 public validation targets. Exact lookup dropped 654 mappable mentions across 49 targets. Remapping kept Pearson Δ at about 0.084 and raised Δ RMSE from 0.11397 to 0.11413. The replay holds the model completions and expression references fixed. The paper's evaluation preprocessing is unverified here.
Could you publish the VCC column-to-Ensembl-to-model-symbol crosswalk and clarify which symbol set the reported VCC evaluation used for prompts and reconstruction?
import json
from urllib.request import Request, urlopen
def load(url):
with urlopen(Request(url, headers={'Accept': 'application/json'}), timeout=20) as response:
return json.load(response)
root = 'https://huggingface.co/google/cellgemma-e4b/resolve/6212145e0131d3744171739ea5232afc6aaa7c76/'
axis = {gene.upper() for gene in load(root + 'decoders/vcc/mean_delta_global.json')}
registered = load(root + 'kg_sentences.json')
hgnc = load('https://rest.genenames.org/fetch/symbol/H4C16')['response']['docs'][0]
assert (len(axis), len(axis - registered.keys())) == (18080, 468)
assert 'H4C16' in registered and 'H4C16' not in axis
assert 'HIST4H4' in axis and 'HIST4H4' in hgnc['prev_symbol']
assert hgnc['ensembl_gene_id'] == 'ENSG00000197837'
print([word[1:] for word in '+H4C16'.split() if word.startswith('+') and word[1:] in axis])
# []
🤖 Generated with Claude Code