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.

Keep first gene mentions in the CellGemma model card example

#8
by rpinho1 - opened

The model card's parse_genes passes repeated mentions to the expression decoder. Repeats change the directional ranks and list lengths. A gene mentioned in both directions receives two deltas at the same output index. This patch keeps the first valid mention, matching the hosted demo.

I replayed one saved 8-bit Panobinostat example with the released Tahoe decoder. The response contained 4,096 valid signed mentions for 3,356 distinct genes. The patch changed 2,871 of 19,720 reconstructed expression values by more than 0.00001, with a maximum absolute change of 0.500 in log-normalized expression. A separate NumPy replay reproduced the count.

I ran the following regression test from the repository root. It exits 1 on the published README and 0 with the patch. It needs only the Python standard library.

python - README.md <<'PY'
import ast
from pathlib import Path
import sys

readme = Path(sys.argv[1]).read_text()
example = readme.split("```python\n")[2].split("\n```", 1)[0]
parser = next(node for node in ast.parse(example).body
              if isinstance(node, ast.FunctionDef) and node.name == "parse_genes")
namespace = {}
exec(compile(ast.Module(body=[parser], type_ignores=[]), "<example>", "exec"), namespace)
parse_genes = namespace["parse_genes"]
genes = {"A": 0, "B-2": 1, "C": 2, "D": 3}
assert parse_genes("-a +B-2 +unknown +A +b-2 -C +D -c", genes) == (["B-2", "D"], ["A", "C"])
assert parse_genes("A + - +unknown", genes) == ([], [])
assert parse_genes("+A -C +B-2", genes) == (["A", "B-2"], ["C"])
PY

🤖 Generated with Claude Code

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment