Instructions to use ingenix/Thalamus-Reasoning-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ingenix/Thalamus-Reasoning-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ingenix/Thalamus-Reasoning-9B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ingenix/Thalamus-Reasoning-9B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ingenix/Thalamus-Reasoning-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ingenix/Thalamus-Reasoning-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ingenix/Thalamus-Reasoning-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ingenix/Thalamus-Reasoning-9B
- SGLang
How to use ingenix/Thalamus-Reasoning-9B 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 "ingenix/Thalamus-Reasoning-9B" \ --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": "ingenix/Thalamus-Reasoning-9B", "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 "ingenix/Thalamus-Reasoning-9B" \ --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": "ingenix/Thalamus-Reasoning-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ingenix/Thalamus-Reasoning-9B with Docker Model Runner:
docker model run hf.co/ingenix/Thalamus-Reasoning-9B
Thalamus-Reasoning-9B
Thalamus-Reasoning-9B (TR-9B) is a conversational language model trained to connect quantitative transcriptomic measurements with biological knowledge. It takes bulk and single-cell expression profiles as input alongside text, and was trained across 157 task groups, from cell-type annotation to perturbation-response prediction.
- Code (inference, chat, preparing your own data, evaluation): github.com/IngenixAI/Thalamus-Reasoning
- Paper: Thalamus-Reasoning: A Multimodal Large Language Model for Multi-Sample Omics Reasoning
This release differs from the model described in the paper. It does not use the Funomics input block, so every input can be computed with public tools, and it was trained on a revised data mix, with rebalanced tasks and quality fixes to several training datasets.
Model details
| Developed by | Ingenix.ai |
| Base model | Qwen/Qwen3.5-9B |
| Parameters | 9.2B (bf16) |
| Input | text, plus one 20,029-value vector per expression profile |
| License | Ingenix.ai License |
A linear layer maps each profile vector to one token embedding, which takes the place of an <omics>
placeholder in the prompt. The model was trained with continued pretraining, supervised fine-tuning and
reinforcement learning on biological text, general-purpose text and instructions, and public bulk and
single-cell expression data (GEO, CELLxGENE, DepMap, perturbation screens) paired with annotations and
conversations. The training code, training data and reinforcement-learning pipeline are not released.
Usage
The model needs a profile vector for every sample you ask about. There are two sources:
- Cancer cell lines: this repository includes profiles of 1,673 DepMap cell lines (
depmap/). The chat and web app in the GitHub repository attach them automatically when you name a cell line, so no code is needed. The model also knows many cell lines by name, but only with the profile can it draw on the measured expression. - Your own samples: build vectors from your expression table with
tr-embed(see below).
To call the model directly, install the Thalamus-Reasoning package, which registers the model with vLLM:
pip install "thalamus-reasoning[vllm] @ git+https://github.com/IngenixAI/Thalamus-Reasoning"
from thalamus_reasoning.batch import causal_inference
from thalamus_reasoning.depmap import DEPMAP_SYSTEM, DepMap
from thalamus_reasoning.hub import model_path
# Cell-line names get their DepMap profile: res.text has an <omics> placeholder after each name.
# DEPMAP_SYSTEM tells the model these are untreated baseline profiles.
res, vectors = DepMap().resolve(
"Compare the baseline expression profiles of MCF7 and MDAMB231, explain what the combined pattern suggests "
"about luminal epithelial versus mesenchymal programs. Describe relative expression rather than claiming "
"absolute absence. Keep the answer under 150 words.")
answers = causal_inference(model_path(), [res.text], [vectors], system=DEPMAP_SYSTEM, max_new_tokens=512)
print(answers[0])
An example conversation from the chat (tr-chat --thinking in the GitHub repository):
causal_inference runs vLLM on a list of prompts at once. In each prompt, <omics> marks where a profile goes;
pass one vector per placeholder, in order. One GPU with 40 GB or more is enough.
Your own samples. Profile vectors must be built exactly as in training: the 19,260-gene panel, the same
normalization and a Geneformer block. tr-embed from the package does this:
tr-embed GSE123_counts.tsv.gz --out mine.npz # bulk: TPM, FPKM, read counts or CPM
tr-embed cells.h5ad --out cells.npz # single cells: raw counts
The data preparation guide explains which inputs work and how to check the result.
thalamus_reasoning.load_profiles("mine.npz") returns the vectors by sample ID. Pass them with your own prompts
("Sample A: <omics>\nSample B: <omics>\nWhich sample shows stronger interferon signalling?"), or load the
file into the chat (tr-chat --profiles mine.npz) and refer to samples as @sample_id.
Files in this repository
| Path | Content | License |
|---|---|---|
*.safetensors, config.json, modeling.py, configuration.py, tokenizer, chat_template.jinja |
Model | Ingenix.ai License |
preprocessing/gene_panel.tsv |
19,260-gene axis (Ensembl ID, symbol, Entrez ID, GENCODE v49 length/biotype) | Apache 2.0; annotation from GENCODE (open data) |
preprocessing/gene_aliases.tsv |
HGNC previous symbols / aliases → panel genes | HGNC data (CC0) |
preprocessing/normalization_stats.npz |
Training means / scales for the three input blocks | Apache 2.0 |
preprocessing/geneformer_v2_tokens.tsv, geneformer_v2_special_tokens.json |
Geneformer-V2 token IDs and gene medians for panel genes | Apache 2.0 (from Geneformer) |
depmap/depmap_24q4_embeddings.npy, cell_lines.parquet |
Input vectors for 1,673 DepMap 24Q4 cell lines + names, synonyms, IDs, tissue, disease | DepMap data CC BY 4.0; Cellosaurus names CC BY 4.0 |
eval/geo_omics_qa/ |
GEO-OmicsQA questions (6 × 500) and profile vectors (2,035 GEO samples) | Questions and answers CC BY 4.0 (Ingenix.ai), except passages quoted from the source articles (paper_support), which keep their original terms; vectors derived from public GEO data (NCBI GEO terms) |
eval/human_diseases/ |
1,000-profile subsets per task: vectors, labels, options | CC BY 4.0 (CellWhisperer, Schaefer et al.) |
eval/tabula_sapiens/ |
1,000-cell subsets per task: vectors, labels, options | CC BY 4.0 (Tabula Sapiens, GSE201048) |
eval/perturbqa/ |
PerturbQA test prompts and 4 control-cell profiles | Prompts: CC BY 4.0 (PerturbQA, Wu et al. 2025). Controls: K562/RPE1 from Replogle et al. 2022 (CC BY 4.0), HepG2/Jurkat from Nadig et al. 2025 (GEO terms) |
Evaluation
| Task | Metric | TR-9B | Best baseline |
|---|---|---|---|
| Tabula Sapiens, cell type (top 20) | macro AUROC | 0.920 | 0.948 (CellWhisperer) |
| Tabula Sapiens, tissue | macro AUROC | 0.874 | 0.760 (CellWhisperer) |
| Human Diseases, disease subtype | macro AUROC | 0.943 | 0.839 (CellWhisperer) |
| Human Diseases, tissue | macro AUROC | 0.987 | 0.932 (CellWhisperer) |
| GEO-OmicsQA, yes/no (2 × 500 questions) | accuracy | 0.765 | 0.662 (Gemini 3.8 Flash) |
| GEO-OmicsQA, free text (4 × 500 questions) | judge score | 0.663 | 0.613 (Gemini 3.8 Flash) |
| PerturbQA, direction of change | mean AUROC | 0.761 | 0.688 (SynthPert) |
Baseline scores and protocols are from the paper. TR-9B was scored on
Tabula Sapiens and Human Diseases subsets of 1,000 profiles per task (in eval/); the baselines on other
random samples of the same datasets. SynthPert's score is as reported by its authors.
The eval/ folder holds the inputs of these tasks; the scripts that run them are in the GitHub repository.
Limitations
- For research only, not for clinical decisions.
- Human RNA-seq only. Microarrays, other assays and other species are out of distribution.
tr-embedchecks the input and reports what it detected and any problems; read its report before trusting answers. - The model can be fluent and confidently wrong. It may invent details such as treatments, donor information or mutations, and it is unreliable for exact fold changes or for naming a perturbed gene. State what you know about the samples in the prompt, and check important claims.
- Choosing between candidate labels listed in the prompt (
lm.classify) is more reliable than open-ended identification of tissue or cell type. - DepMap profiles describe cancer cell lines in culture, not tumours.
Support
Questions and bug reports: GitHub Issues. Contact: info@ingenix.ai.
License
The model is released under the Ingenix.ai License. The other files in this repository are not covered by it: they keep their own licenses, listed in Files in this repository, and are included for ease of use.
Citation
@article{sypetkowski2026thalamus,
title = {Thalamus-Reasoning: A Multimodal Large Language Model for Multi-Sample Omics Reasoning},
author = {Sypetkowski, Maciej and Smoliński, Łukasz and Kinas, Remigiusz and Krawczyk, Joanna and
Hofman, Bartłomiej and Możwiłło, Aleksandra and Pikusa, Michał and Jetka, Tomasz and
Powalski, Rafał},
journal = {arXiv preprint arXiv:2605.06728},
year = {2026},
url = {https://arxiv.org/abs/2605.06728}
}
Please also cite Qwen3.5 and Geneformer. If you use the evaluation data, cite DepMap, CellWhisperer, Tabula Sapiens and PerturbQA.
- Downloads last month
- 23