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
Greedy decoding collapses to "+" genes only for some prompts (3.6% of our runs); 2 isolated cases reproduce on CPU in float32
Summary
With google/cellgemma-e4b and greedy decoding, some runs reach a point where the sign pattern breaks. Before that point the output alternates "+GENE -GENE" as expected. After it, the model emits "+" genes only. In 278 of 8,448 runs the model then ended the output with its own end-of-sequence token (no "-" gene appears after the break in 275 of those 278). In 27 runs it never ended the output and the run went to the 8,192 token limit. That is 305 runs, 3.6% of the total. We do not know whether the 278 shorter outputs are defects or legitimate lists. We know only that their sign pattern broke in the same way as the 27.
On the 2 prompts we isolated (both HepG2), the collapse reproduces on CPU in float32 at the same word and the same token step as on Apple MPS in bfloat16. At that step the logit for "+" exceeds the logit for "-" by 10.16 to 17.19, and the end-of-sequence logit is about -19. For these 2 prompts the collapse is therefore not a rounding effect of the MPS backend.
Two limits matter. All 8,448 runs used a blind compound code, and with the real compound name 1 of the 2 isolated prompts still collapses on CPU and the other does not. For 1 MCF7 pair, changing the batch size changed whether the run collapsed, so numerical noise can decide the outcome for prompts near the edge.
We are not claiming a root cause, and we did not look inside the model.
How we ran it
- The stop rule "100 distinct up genes and 100 distinct down genes" is our own
StoppingCriteria(DepthStopin ourrb_lib.py), checked every 32 tokens. The model card does not define it. It also means we observed only the first 100 genes per sign for most runs, so the 3.6% counts collapses that happened before that point. - We used greedy decoding:
do_sample=False,max_new_tokens=8192. The model card recommends sampling (do_sample=True,temperature=0.7,max_new_tokens=8192). We have not tested sampling. - Model:
google/cellgemma-e4b, revision6212145e0131d3744171739ea5232afc6aaa7c76(read from therefs/mainentry in our local Hugging Face cache, and equal to the current main revision on the Hub; the cache holds no snapshot folder, so we also hold sha256 values for the 3 safetensors files and can share them).dtype=torch.bfloat16(float32 for the CPU runs),attn_implementationsdpa, left padding, attention mask passed togenerate(). - Software and hardware: Apple M5 Max (MPS backend), macOS 27.2.1, Python 3.12.14, torch 2.15.0, transformers 5.25.0.
- Prompts: the model card template, with the compound name replaced by a blind code such as
CMPD-0171, a SMILES string, andConcentration: 5 uM. - Conditioning: Tahoe decoder and controls for HepG2 and HT-29, sci-Plex decoder and controls for MCF7.
- Runs: 3 cell lines with 2,816 runs each, 8,448 in total, covering marine natural products, decoys and controls. "Production runs" below means these 8,448 runs.
- A "word" is one whitespace-delimited token of the output such as
+EZR, and each word is 2 model tokens (sign, gene). Words are counted from 0. - Not tested: CUDA, sampling, and any other machine.
1. The collapse reproduces on CPU in float32
We isolated 2 collapsing prompts, both CMPD-0171 on HepG2 Tahoe controls, plus 1 clean prompt for comparison. Each ran at batch size 1 on CPU in float32 (500 new tokens) and on MPS in bfloat16 (run twice in one process). Control cells are numbered by our own index, with the Tahoe control cell id in brackets.
| Prompt | Backend | First "+ +" pair | Collapse token step | "-" genes before it | "+" minus "-" logit at that step | End-of-sequence logit |
|---|---|---|---|---|---|---|
CMPD-0171, cell 49 (96_185_085-lib_1930) |
CPU float32 | words 166 and 167 | 334 | 83 | 15.66 | -19.24 |
| CMPD-0171, cell 49 | MPS bfloat16 | words 166 and 167 | 334 | 83 | 17.19 | -18.25 |
CMPD-0171, cell 28 (96_145_119-lib_1965) |
CPU float32 | words 166 and 167 | 334 | 83 | 10.16 | -18.75 |
| CMPD-0171, cell 28 | MPS bfloat16 | words 166 and 167 | 334 | 83 | 14.88 | -19.88 |
The clean prompt (CMPD-0171, cell 6, 95_009_103-lib_1949) alternates strictly on every sign: 249 of 249 on CPU float32 (500 tokens) and 207 of 207 on MPS bfloat16 (416 tokens).
The two MPS runs of each prompt gave the same text and the same token ids, and their top-5 logits matched at every recorded step.
The CPU runs stopped at 500 tokens. They show the collapse and its logits, and they do not show that a CPU run would reach the 8,192 token limit.
With the real compound name (cycloartenol) in place of the blind code, on CPU in float32 (500 tokens), cell 49 still collapses at word 167 with 83 "-" genes before it. Cell 28 does not collapse in 250 words (125 "-" genes). We ran only these 2 prompts with the real name.
2. How common it is
We count a run as collapsed when its sign pattern breaks and the run then ends on end-of-sequence or at the 8,192 token limit, instead of reaching our depth rule.
| Line | Runs | Ended by end-of-sequence | Hit the 8,192 token limit | Collapsed | Share of runs |
|---|---|---|---|---|---|
| HT-29 (Tahoe) | 2,816 | 39 | 0 | 39 | 1.4% |
| HepG2 (Tahoe) | 2,816 | 77 | 2 | 79 | 2.8% |
| MCF7 (sci-Plex) | 2,816 | 162 | 25 | 187 | 6.6% |
| Total | 8,448 | 278 | 27 | 305 | 3.6% |
Of the 8,421 runs that did not hit the limit, 8,109 alternate strictly on every transition. The other 312 break alternation: 278 end on end-of-sequence, 32 break only after both signs had already reached 100 distinct genes (30 with a "+ +" pair and 2 with a "- -" pair, an overshoot of our stop check), and 2 break before that depth and then still reach it (1 with a stray non-gene word, 1 with a "+ +" pair at word 203). In all 278 end-of-sequence runs the first break is a "+ +" pair. In 275 of the 278, no "-" gene appears after it. The 27 runs that hit the limit are the collapses in which end-of-sequence never arrived. Alternation breaks therefore total 339 (312 plus 27), of which 305 are collapses by the definition above.
Collapses occur across compound groups. For decoy compounds alone, 6 of 384 runs collapse on HT-29, 9 of 384 on HepG2 and 46 of 384 on MCF7.
3. The 27 runs that hit the limit
The 27 runs are 25 MCF7 and 2 HepG2. All 27 share this pattern:
- 97.66% to 98.97% of the words are "+" tokens.
- Between 42 and 95 distinct "-" genes appear in the whole output (42 to 95 for MCF7, 83 for both HepG2 runs).
- The first alternation break is at word 85 to 191 (word 167 for both HepG2 runs).
- The last "-" word is exactly 2 words before the first break, in 27 of 27 runs.
- After the break the output is "+" genes only until the limit.
Our stop rule needs 100 distinct "-" genes, and these runs have fewer than 100, so the rule did not fire and they ran to 8,192 tokens.
On repetition: in the 2 HepG2 runs the first repeated word comes after the break (words 332 and 344 in production, break at word 167). In MCF7 the first repeated word comes before the break in 13 of 25 runs (9 of those repeats are "+" words and 4 are "-" words), after it in 11, and at the same word in 1. Repetition does not consistently come before or after the break, and the stop-rule explanation above does not depend on it.
4. Which inputs trigger it
The evidence for a pair effect is small: 1 compound on 10 control cells, 3 other compounds on 1 cell, and 2 collapsing pairs, both with the same compound. All runs in this table are batch size 1 on MPS in bfloat16.
| Compound | Control cell | Result | Words | Distinct "+" / "-" genes |
|---|---|---|---|---|
| CMPD-0171 | cell 49 | hit the limit | 4,095 | 1,743 / 83 |
| CMPD-0171 | cell 28 | hit the limit | 4,093 | 1,895 / 83 |
| CMPD-0171 | cell 6 | depth 100 reached | 208 | 104 / 103 |
| CMPD-0171 | cells 14, 1, 3, 5, 7, 10, 20 | depth 100 reached in all 7 | 208 each | 103 or 104 in each sign |
| CMPD-0170 | cell 49 | depth 100 reached | 208 | 104 / 104 |
| CMPD-0172 | cell 49 | depth 100 reached | 208 | 104 / 103 |
| CMPD-0173 | cell 49 | depth 100 reached | 208 | 103 / 104 |
- CMPD-0171 collapses on 2 of the 10 control cells tested and is clean on the other 8. Cell 49 is clean for the 3 other compounds tested.
- In production on HepG2, CMPD-0171 has 8 runs and 2 of them hit the limit. 0 of the other 2,808 HepG2 runs hit it. Both ran at batch size 4, after our pipeline fell back from batch size 8 following an out-of-memory error.
- The 2 HepG2 pairs collapse at batch size 1 and on CPU in float32. We did not test batch size 8 for them: the one attempt, on cell 49, ran out of MPS memory (52.42 GiB limit), and we did not record at which token.
- MCF7 collapses that hit the limit are spread over 12 control cells and 17 compounds (CMPD-0182 has 4, CMPD-0025 has 3).
- For the 1 MCF7 pair we re-ran in isolation (CMPD-0181, sci-Plex cell 40), batch size mattered. At batch size 1 the run alternated strictly and reached depth 100 (208 words). At batch sizes 4 and 8 the first "+ +" pair came at word 137, no "-" gene followed, and the run ended on end-of-sequence at 262 and 294 words. In production this pair hit the 8,192 token limit in a batch of 8 with different batch partners. We did not re-run the other 24 MCF7 limit runs.
Our reading: collapse depends on the specific (compound, control cell) pair, both HepG2 hits involve CMPD-0171, and for the 1 MCF7 pair we tested, the outcome also changed with batch size or batch partners. This rests on few cases, and the blind code is a possible confound (section 1).
5. Mitigations we tried
All runs are batch size 1, greedy, on the 2 collapsing pairs and the clean pair. The mask bans a gene token under both signs.
| Mitigation | cell 49 | cell 28 | cell 6 (clean) |
|---|---|---|---|
| None | limit, 4,095 words | limit, 4,093 words | depth 100 reached, 208 words |
| A. Mask already-emitted gene tokens, keep our stop rule | limit, 4,096 words, 4,012 distinct "+" and 83 "-" | limit, 4,097 words, 4,010 distinct "+" and 83 "-" | not run |
| B. Stop at 100 distinct genes in total (checked every 16 tokens), no mask | stops at 104 words, 52 "+" / 52 "-" | not run | not run |
| B with mask | stops at 104 words, 52 "+" / 52 "-" | stops at 104 words, 52 "+" / 52 "-" | stops at 104 words, 52 "+" / 52 "-" |
| C. Mask, force the sign to alternate, keep the 100 up and 100 down rule | depth 100 reached, 208 words | depth 100 reached, 208 words | depth 100 reached, 208 words |
- A fails. Masking alone does not stop the collapse. The model keeps emitting new "+" genes (more than 4,000 distinct) and does not reach 100 distinct "-" genes, so repeated genes are not the cause. The mask did not cover the first gene, and the model sometimes wrote bare signs or malformed words in place of the banned gene.
- B ends every run, but on these 2 prompts it stops at word 104, before the collapse at word 167, so the lists it returns were never exposed to the collapse. On a run that collapses earlier (for example at word 85 in MCF7) it would still return an imbalanced list. It also returns about 52 "+" and 52 "-" genes in our tests instead of the 100 and 100 that a depth of 100 asks for.
- C reached full depth on all 3 prompts. It forces a "-" gene at steps where the model prefers "+" by 10 to 17 logit units. We have not checked whether the gene lists it produces are any good downstream, and 278 of our runs ended on the model's own end-of-sequence with fewer than 100 distinct "-" genes, so forcing alternation may remove a real signal. We use C as a diagnostic only, tested on 3 prompts. We do not recommend it unless the maintainers confirm that strict alternation is the intended format.
- A patience rule is the safeguard we think is sounder, and we have not tested it: stop when no new "-" gene has appeared for N tokens, and return a status flag instead of reporting success. It would also fire on legitimate lists that have fewer down genes, which is why the flag matters.
6. Batch size and padding on MPS in bfloat16
We expect some batch size and padding sensitivity in bfloat16. We report it because for the MCF7 pair in section 4 it changed whether the run collapsed.
| Case | Batch size 1 vs 4: first differing word | Batch size 1 vs 8: first differing word |
|---|---|---|
| CMPD-0171, cell 6 (Tahoe, clean) | 14 | 14 |
| CMPD-0171, cell 49 (Tahoe, collapsing) | 20 | not available (out of memory) |
| CMPD-0181, sci-Plex cell 40 | 6 | 6 |
- For the clean Tahoe case, the Jaccard overlap of the first 100 "+" genes between batch size 1 and 4 is 0.852, and of the first 100 "-" genes 0.626. Between batch size 1 and 8 it is 0.835 and 0.639.
- At batch size 1, adding 8 or 64 masked pad tokens also changed the text.
- On CPU in float32, with 8 or 64 masked left-pad tokens the step-0 logits change by at most 3.4e-05 and all 60 tokens tested match the unpadded run. On MPS in bfloat16 the step-0 logits change by up to 0.625 and the text diverges at token 29 of 60. That size fits bfloat16 rounding, although we did not test MPS in float32 or eager attention to confirm it. The collapse gaps of 10 to 17 in section 1 are far larger.
- Repeatability held when batch size, padding and batch partners were all the same: the same prompt run twice at batch size 1 gave the same text for 3 of 3 prompts, and 32 production HT-29 runs regenerated at their original batch size 8 with the same partners matched in every field in 32 of 32 runs.
- It did not hold when any of them changed in the cases we tested. For CMPD-0181 on cell 40, production (batch size 8, different partners) hit the limit, while our isolation run at batch size 8 ended on end-of-sequence at 294 words. We also regenerated 8 production MCF7 runs (batch 62, originally batch size 8) at batch size 4, and only 4 of the 8 matched the original in every field.
| CMPD-0181, sci-Plex cell 40 | Stop reason | Words | Distinct "+" / "-" genes |
|---|---|---|---|
| Batch size 1 | depth 100 reached | 208 | 103 / 104 |
| Batch size 4 | end-of-sequence | 262 | 190 / 68 |
| Batch size 8 | end-of-sequence | 294 | 219 / 68 |
This is 1 sci-Plex prompt in 3 batch conditions, so we cannot say whether sci-Plex is more sensitive than Tahoe.
Suggestion and questions
We suggest a patience rule (section 5) in place of relying on the 8,192 token limit as the main safeguard.
- Is strictly alternating "+" and "-" output the intended format, or can a run that emits only "+" genes occur by design?
- Have you seen this collapse on CUDA, or with sampling at temperature 0.7?
- Are some (compound, control cell) pairs known to put the model into this state?
Related report
Discussion 9 on this repository reports runs reaching 8,192 tokens without end-of-sequence (15.1% for Tahoe in that report, in a 772 run benchmark). We have not compared decoding settings or prompts with that report, so we do not know whether it describes the same behaviour.
What we can attach
- the exact prompt text for the 3 isolation prompts (cells 49, 28 and 6 for CMPD-0171), each 4,170 tokens long,
- the
generate()call and theDepthStopcode, - the result files from the isolation tests (one JSON record per run, with the full generated text) and the scripts that produced them,
- the CPU float32 and MPS logit records from section 1,
- the production run records for the 27 runs that hit the limit.
The job text for CMPD-0171 starts Drug name: CMPD-0171\nDrug SMILES: CC(C)=CCC[C@@H](C)[C@H]1CC[C@@]2(C)... (a triterpenoid sterol, cycloartenol), with Concentration: 5 uM.
Limits of this report
- All results come from 1 machine (Apple M5 Max). CUDA is untested.
- Greedy decoding only. We have not run the model card's sampling settings, and we have not run CPU past 500 tokens.
- The 2 isolated collapsing pairs are both CMPD-0171 on HepG2, and all 8,448 production runs used blind compound codes.
- Isolation batch partners were unrelated prompts from the same line. Production partners were different.
- This report covers generation behaviour only. We make no biological claim.
Thank you for the careful isolation work. The cross-backend reproduction is the strong part here: the same word and token step on CPU in float32 as on MPS in bfloat16, with the plus logit ahead by 10.16 to 17.19 and the end-of-sequence logit near -19, rules out a rounding effect of the MPS backend for these 2 prompts. The stated limits are just as useful: 305 of 8,448 runs (3.6%), a blind compound code throughout, one of the 2 prompts no longer collapsing with the real compound name, and batch size deciding the outcome for one MCF7 pair near the edge. We also note the run used greedy decoding while the model card recommends sampling, untested here, so the sampling comparison is the natural next read.
Adding a data point on the sampling comparison (do_sample=True, temperature=0.7, max_new_tokens=512, Apple M3 Pro MPS bfloat16) that @emailfrom noted:
Across 515 pre-registered perturbation runs spanning 8 of the 13 pretrained decoders (parse, dong, tahoe, l1000, emeraldbay, sciplex, jurkat, tisch) on primary human vitiligo cohorts (GSE272551, GSE231794, GSE203262), we observed 0% +-only sign collapse β alternating +GENE -GENE balance held throughout.
However, sampling at T = 0.7 surfaced two distinct Stage-1 stochastic failure modes worth flagging alongside your greedy findings:
- Bimodal attractor switching on opposing multi-cytokine prompts (5-seed audit, 75 runs across
parse&dong): When concatenating an antagonist against an agonist storm (IFNG+IL15+IL1RN),parsesplit3/5suppressed seeds (IFN/JAK +0.95β0.99) vs.2/5full-storm seeds (+1.29β1.30, Welchp = 0.331), anddongstill split2/5vs.3/5(p = 0.242), whereas co-directional storms (IFNG+IL15+IL1B) stayed tightly unimodal (SD = 0.030). Single-seed (seed=42) winners forIL22(-18.3%) andIL4(-15.8%) collapsed completely to null across 5 seeds (p = 0.89,p = 0.94). - Rare single-draw heat-shock stress attractor on isolated primary lineages: In our 296-run 6-lineage dual-decoder (
parse+dong) PBMC atlas, 3 of 4IL1B-stimulatedMonocyte/DCstrata reproduced the canonical myeloid program (+CCL3, +CCL4, +SOD2, +IL1B, +TNFAIP6, +CCL2), whileparseon progressive-vitiligo monocytes jumped atseed=42into a pure heat-shock attractor (+HSPA1A, +HSPA1B, +HSPA6, +HSPH1, +DNAJB1, +HSPB1, flippingIL1Bto-1.80). Pairingparse+dongcaught it immediately, anddongcut both combinatorial SD (2.7Γ) and real inter-donor biological SD (1.48Γ).
All 515 raw runs (including per-seed outputs and cache keys) are open in re-cep/vitiligo-cellgemma-benchmark if useful for comparing sampling vs. greedy stability.
Thank you, Recep, for adding this data point. The 0% collapse under sampling across 515 runs sharpens the contrast with the greedy-decoding collapse reported in this thread, and the multi-seed check retiring single-seed hits is exactly the discipline these scores need. The bimodal switching on opposing prompts is a useful caution for anyone reading single-seed results.
@emailfrom We ran the sampling comparison on the 27 prompts that hit the 8,192 token limit under greedy decoding (2 HepG2, 25 MCF7). We did not rerun the other 8,421 production runs, so the numbers below cover only these 27 prompts.
Settings
- Decoding:
do_sample=True,temperature=0.7,max_new_tokens=8192, following the model card README (section "1. Sampling Parameters" and thegenerate()example). We did not passtop_kortop_pingenerate(), sotop_k=64andtop_p=0.95came from the model'sgeneration_config.json(that file defaults totemperature=1.0; we overrode it to 0.7). - Run setup: 5 seeds per prompt (seeds 1, 2, 3, 4 and 5), 135 runs in total. Same prompts (prompt token counts matched the greedy runs on all 135 rows), same blind compound codes, same
DepthStoprule (100 distinct "+" genes and 100 distinct "-" genes), batch size 1, Apple M5 Max, MPS intorch.bfloat16, torch 2.15.0, transformers 5.25.0, same model revision6212145e0131d3744171739ea5232afc6aaa7c76.
Results on the 27 greedy-capped prompts
We use the same collapse definition as the original post: a sign-pattern break and a stop other than depth_reached. By that rule, 55 of 135 runs collapsed and 80 of 135 reached the depth stop.
| Line | Prompts | Runs | Reached depth | Ended on end-of-sequence | Hit 8,192 token limit | Collapsed |
|---|---|---|---|---|---|---|
| HepG2 (Tahoe) | 2 | 10 | 1 | 9 | 0 | 9 |
| MCF7 (sci-Plex) | 25 | 125 | 79 | 42 | 4 | 46 |
| Total | 27 | 135 | 80 | 51 | 4 | 55 |
- Per prompt (out of 5 seeds): 26 of 27 prompts reached depth on at least 1 seed. 5 of 27 reached depth on all 5 seeds (all MCF7). 1 of 27 reached depth on 0 seeds: HepG2 CMPD-0171 cell 49 ended on end-of-sequence on all 5 seeds. The other HepG2 prompt (CMPD-0171 cell 28) reached depth on seed 2 only and ended on end-of-sequence on the other 4 seeds. Both HepG2 prompts are the same compound on 2 control cells.
- In all 55 collapsed runs the first break was a "+ +" pair, and no "-" gene appeared after it. All 55 had at least 100 distinct "+" genes and fewer than 100 distinct "-" genes. Across the 51 end-of-sequence runs, median distinct "+" genes was 311 (min 206, max 2,258) and median distinct "-" genes was 89 (min 50, max 98); 0 of 51 reached 100 distinct "-" genes.
- The 4 runs that still hit the 8,192 token limit were all MCF7, all with a "+ +" first break, no "-" gene after it, and all up-heavy: 1,956 to 2,419 distinct "+" genes (median 2,359.5) and 92 to 95 distinct "-" genes (median 95).
- Across the 80 runs that reached depth, median distinct "+" genes was 103 (min 100, max 107) and median distinct "-" genes was 104 (min 101, max 111). 2 of the 80 (both MCF7 CMPD-0181 cell 36, seeds 4 and 5) had a "+ +" pair at word 203, after both signs had already reached 101 distinct genes, and then 5 further "+" words before the depth check fired at 416 tokens. That is an overshoot of our 32-token stop check, not a collapse.
On these 27 prompts, sampling reduces 8,192 token truncations from 27 of 27 greedy runs to 4 of 135 sampled runs, and 26 of 27 prompts reached depth on at least 1 seed. It does not remove the up-heavy collapse pattern: 55 of 135 runs still collapsed under our definition, 4 still hit 8,192 tokens, and HepG2 CMPD-0171 cell 49 reached depth on 0 of 5 seeds. As in the original post, we do not know whether the 51 end-of-sequence runs are defects or legitimate lists.
Limits
- Scope: these 27 prompts were selected because they hit 8,192 tokens under greedy decoding. They are not a random sample of the 8,448 runs. We did not test the 278 greedy end-of-sequence runs, and we did not test prompts that finished cleanly under greedy decoding. We cannot give an overall collapse rate under sampling.
- Batch size: all 135 sampled runs used batch size 1. In the production greedy runs, the 25 MCF7 prompts were generated at batch size 8, and the 2 HepG2 prompts at batch size 4. Under greedy decoding at batch size 1, both HepG2 prompts still hit 8,192 tokens, and 1 of the 25 MCF7 prompts (CMPD-0181 cell 40) reached depth instead of collapsing. We did not rerun the other 24 MCF7 prompts at batch size 1 under greedy decoding, so part of the MCF7 change may come from batch size 1 rather than from sampling.
- The 2 HepG2 prompts are 1 compound (CMPD-0171) on 2 control cells, so the 9 of 10 versus 46 of 125 split is not a cell-line comparison.
- All 135 runs used a blind compound code. We did not test real compound names under sampling. We also did not test CUDA, CPU sampling, or other temperatures, including the
generation_config.jsondefault of 1.0.
On the vitiligo sampling comparison
@re-cep Thank you for the data point. Two differences matter before the 2 sets of numbers are read together. Your runs use max_new_tokens=512, about 256 output words at 2 tokens per word, with no depth stop, while ours use 8,192 tokens and a stop at 100 distinct genes of each sign. Our up-heavy runs have a median of 311 distinct "+" genes, and the 4 runs that still hit the cap reach 1,956 to 2,419, so that tail cannot appear inside 512 tokens. Your prompts are cytokines on primary human cells read out through parse, dong and 6 other decoders, while ours are blinded small molecules on cell lines read out through the tahoe and sci-Plex decoders. We therefore read your 0% result as evidence about your setting rather than a correction of ours, and we note that 31 of 519 run records in your public files list n_down as 0, so the 2 collapse definitions may not be the same.
Your 2 failure modes do line up with what we see. The 5-seed split on IFNG+IL15+IL1RN is visible in your deposited per-seed values for parse (0.948, 0.989, 1.297, 1.294, 0.949), and the heat-shock run is in the atlas file with IL1B at -1.80 alongside +HSPA1A, +HSPA1B, +HSPA6, +HSPH1, +DNAJB1 and +HSPB1. We could not locate the single-seed IL22 and IL4 values of -18.3% and -15.8% in the public files. Both modes support the point we draw from our own 5-seed runs: a single sampled seed at temperature 0.7 should not be reported on its own.
@aclisham @emailfrom Thanks for checking our actual files and catching that. My earlier claim about 0% sign collapse was wrong, and I want to correct it properly.
I had not scanned the raw output strings at the token level across all 508 cached runs before commenting; I was looking at summary tables from the earlier bulk PBMC runs. I just ran your exact check across all 508 cached predictions (do_sample=True, temperature=0.7, max_new_tokens=512, unblinded cytokine, drug, and gene names):
- Only "+" genes from the start (
n_down = 0): 31 of 508 runs (6.1%), matching the 31 records you spotted inraw/*.json. All 31 stopped on EOS early (6 to 164 "+" genes, median 20; none hit the 512 token cap). - Switched to "+ +" midway through with no "-" gene afterward (
n_down > 0): 89 of 508 runs (17.5%). 81 hit the 512 token cap and 8 stopped on EOS (median 72 "-" genes before the break; 57 of 89 broke before reaching 100 "-" genes). - Opposite direction ("- -" with no "+" gene afterward): only 7 of 508 runs (1.4%), so 120 up tails against 7 down tails.
- Breakdown by decoder (both groups combined):
parse51/228 (22.4%: 11 pure, 40 midway),dong41/190 (21.6%: 14 pure, 27 midway),tahoe10/47 (21.3%: 3 pure, 7 midway),jurkat15/30 (50.0%: 2 pure, 13 midway),tisch3/4 (75.0%: 1 pure, 2 midway);l1000,emeraldbay, andsciplexwere 0/3 each.
So our runs actually back up and extend what you found rather than contradicting it: the asymmetric "+" collapse still shows up at temperature=0.7 with real unblinded names across 5 decoders, often well before 512 tokens. As a bonus check on our own atlas, filtering out the collapsed runs pushed parse vs dong concordance across lineages from r = +0.751 up to r = +0.819 (p = 6.4e-13, 49 of 84 balanced pairs).
For the single seed IL22 (18.3%) and IL4 (15.8%) numbers, they are in data/cure_combinatorial_rescues.jsonl (config cure_combinatorial_rescues, and raw/cellgemma_cure_pathway_screen.json under axis3b_combinatorial_rescues) stored as positive fractions in rescue_pct_ifn_reduction: 0.183 for IFNG+IL15+IL22 (1.2640 to 1.0327) and 0.1582 for IFNG+IL15+IL4 (1.2640 to 1.0641).
Really appreciate the careful check. Catching mistakes like this is the main reason we put all raw runs up in public.
Thanks for running this β we appreciate the sampling comparison on the exact 27 greedy-capped prompts. Sampling cuts 8,192-token truncations from 27 of 27 greedy runs to 4 of 135, and 26 of 27 prompts reach depth on at least one seed, yet 55 of 135 still collapse, every first break a "+ +" pair with no "-" gene after it, and HepG2 CMPD-0171 cell 49 reaches depth on 0 of 5 seeds. We note the stated limits too: a selected set rather than a random sample, and batch size 1 against 8 and 4 in production, so part of the MCF7 change may come from batch size rather than sampling alone.
Thanks for correcting the record so fully β we appreciate it. The token-level scan across all 508 cached runs settles it: 31 pure "+"-only runs (6.1%) and 89 midway switches (17.5%), 120 up tails against 7 down, across five decoders at temperature 0.7 with unblinded names, often well before 512 tokens. That backs up and extends the greedy finding rather than contradicting it. We also note the bonus check: filtering the collapsed runs lifts parse against dong concordance from r = +0.751 to +0.819, and thanks for pinpointing the IL22 and IL4 values in cure_combinatorial_rescues.jsonl. Public raw runs made the correction possible, exactly as stated.