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
Feature request: physical perturbations (heat / hyperthermia) as a perturbation modality
Hi, and thank you for releasing CellGemma openly β the residual-from-mean-shift design is elegant, and the CAR T sensitization screen is a great demonstration of what this enables.
I work on magnetic hyperthermia (heating tumours with magnetic nanoparticles under an alternating magnetic field), and I'd like to ask about a perturbation class that doesn't seem representable yet: physical perturbations, in particular heat.
The current perturbation types β small molecules (name / SMILES / concentration), CRISPR, cytokines, clinical treatments β are all chemical or genetic. Hyperthermia is an established oncology modality, and the heat response is a highly conserved, HSF1-driven transcriptional program, which suggests it might be unusually learnable. Questions researchers in this field would love to screen in silico include:
- Which non-lethal thermal doses maximize immune-related programs (antigen presentation, chemokines) for combination with immunotherapy, rather than just killing cells?
Three concrete questions:
- Is there a recommended way to express a physical perturbation β e.g. temperature Γ duration, or cumulative thermal dose in CEM43 β in the perturbation text today?
- Would the team consider including physical-perturbation datasets in future fine-tuning?
- For community fine-tunes that add a new perturbation axis: is there guidance on extending the prompt format and training a new ExpressionDecoder?