Instructions to use Genentech/assayllm-handoff-grpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Genentech/assayllm-handoff-grpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Genentech/assayllm-handoff-grpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("Genentech/assayllm-handoff-grpo") model = AutoModelForCausalLM.from_pretrained("Genentech/assayllm-handoff-grpo", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Genentech/assayllm-handoff-grpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Genentech/assayllm-handoff-grpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Genentech/assayllm-handoff-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Genentech/assayllm-handoff-grpo
- SGLang
How to use Genentech/assayllm-handoff-grpo 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 "Genentech/assayllm-handoff-grpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Genentech/assayllm-handoff-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Genentech/assayllm-handoff-grpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Genentech/assayllm-handoff-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Genentech/assayllm-handoff-grpo with Docker Model Runner:
docker model run hf.co/Genentech/assayllm-handoff-grpo
AssayLLM-Handoff-GRPO
Website | Checkpoints | Paper |
Qwen3.6-27B supervised-fine-tuned and jointly GRPO-trained to open a CRISPR-screen campaign that AssayFormer finishes. Given a screen description and everything assayed so far, it returns a ranked list of 100 HGNC gene symbols for each of the first two rounds; the amortized ranker takes over from round three using those observations as context.
This is the LLM half of the Joint AssayLLM-AssayFormer GRPO result in
Biology-in-the-loop: Amortized Adaptive Hit Discovery in CRISPR
Screens.
Usage
vllm serve Genentech/assayllm-handoff-grpo --served-model-name assayllm-handoff-grpo \
--reasoning-parser qwen3 --port 8061 --api-key token-abc123
Within the AssayLoop harness:
Copy configs/lm/collect-qwen3.6-27b.yaml, point lm.model and lm.api_base at that
server, collect the warm start, then hand off:
uv run assayloop run --model null --acq llm_single --screen-set public --full-genome \
--lm-config configs/lm/collect-assayllm-handoff-grpo.yaml
uv run assayloop eval-ranker-handoff \
--checkpoint <assayformer-rl-checkpoint-dir> --ckpt-file model_last.pt \
--warm-dir output/runs --warm-prefix sweep-<id>- --n 2
--n 2 is the handoff point this model was trained for. AssayFormer is a separate
checkpoint; see the AssayLoop repo.
Thinking mode is on, with the Qwen3.6 preset the paper used: temperature=1.0,
top_p=0.95, top_k=20. Those are also the defaults in generation_config.json.
Without the harness:
The checkpoint accepts the same chat-formatted screen prompt and comma-separated output
format as Genentech/assayllm-sft. Load it directly with Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Genentech/assayllm-handoff-grpo"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype="bfloat16", device_map="auto")
Scoring an output
pip install assaybench scores the pipeline's picks against a screen's ground truth. It
carries the screens and the candidate pool as well as the metrics, so nothing else is
needed, and no GPU:
from assaybench import enrichment_factor, gene_universe, load_screens
screens = load_screens("assayloop-test") # the paper's 20-screen test set
universe = gene_universe(screens) # the f2 pool, 21,147 genes
screen = screens[0]
hits = [g for g, h in zip(screen.genes, screen.hits) if h]
picked = [...] # all ten rounds, in order: this model's
# first two, then AssayFormer's eight
enrichment_factor(picked, screen.genes, hits, universe=universe, budget=1000)
Pass universe=. It says which names outside this screen's library are still real genes:
those picks are forgiven and leave the effective budget, everything else is charged as a
miss. Omit it and every out-of-library name is forgiven, hallucinations included, which
can only shrink the denominator, so the EF you get back sits at or above the number in the
table above.
Loading
# text-only -- what you want. Builds 851 tensors, skips the vision tower.
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(REPO, dtype="bfloat16", device_map="auto")
Results
Results are evaluated on AssayBench-Loop.
| Method | EF | nAUC | FH | SF |
|---|---|---|---|---|
| AssayLLM alone (SFT + GRPO) | 3.70 | 0.156 | 0.193 | 0.173 |
| AssayFormer alone (BPMF + GRPO) | 4.83 | 0.172 | 0.232 | 0.100 |
| AssayLLM → AssayFormer, handoff | 5.05 | 0.186 | 0.247 | 0.077 |
| Handoff-trained AssayLLM →AssayFormer | 5.23 | 0.187 | 0.251 | 0.091 |
Citation
@article{edwards2026biologyloop,
title={Biology-in-the-loop: Amortized Adaptive Hit Discovery in CRISPR Screens},
author={Edwards, Carl and De Brouwer, Edward and Li, Xiner and Lee, Namkyeong and
Hajiramezanali, Ehsan and Biton, Anne and Mostafavi, Sara and Scalia, Gabriele},
journal={arXiv preprint arXiv:2609.11877},
url={https://arxiv.org/abs/2609.11877},
year={2026}
}
- Downloads last month
- 194
Model tree for Genentech/assayllm-handoff-grpo
Base model
Qwen/Qwen3.6-27B