Text Generation
Transformers
Safetensors
English
deepseek_v3
Mixture of Experts
mixture-of-experts
gravity
txgravity
therapeutics
tdc
trillion-labs
conversational
text-generation-inference
Instructions to use trillionlabs/TxGravity-30B-A5B-Open with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trillionlabs/TxGravity-30B-A5B-Open with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trillionlabs/TxGravity-30B-A5B-Open") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trillionlabs/TxGravity-30B-A5B-Open") model = AutoModelForCausalLM.from_pretrained("trillionlabs/TxGravity-30B-A5B-Open", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trillionlabs/TxGravity-30B-A5B-Open with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trillionlabs/TxGravity-30B-A5B-Open" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trillionlabs/TxGravity-30B-A5B-Open", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trillionlabs/TxGravity-30B-A5B-Open
- SGLang
How to use trillionlabs/TxGravity-30B-A5B-Open 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 "trillionlabs/TxGravity-30B-A5B-Open" \ --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": "trillionlabs/TxGravity-30B-A5B-Open", "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 "trillionlabs/TxGravity-30B-A5B-Open" \ --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": "trillionlabs/TxGravity-30B-A5B-Open", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trillionlabs/TxGravity-30B-A5B-Open with Docker Model Runner:
docker model run hf.co/trillionlabs/TxGravity-30B-A5B-Open
README: full TDC results table + wins summary; SKBP/Trillion co-development
Browse files
README.md
CHANGED
|
@@ -22,6 +22,8 @@ base_model:
|
|
| 22 |
|
| 23 |
**TxGravity-30B-A6B-Open** is a therapeutics-focused, task-specialized model built on the **Gravity-30B-A5B** base. It predicts a broad range of therapeutic properties β small-molecule ADMET, toxicity, drugβtarget interaction, proteinβprotein and peptideβMHC interaction, and more β following the instruction format of the **Therapeutic Data Commons (TDC)** benchmark, in the same spirit as Google's TxGemma.
|
| 24 |
|
|
|
|
|
|
|
| 25 |
It is trained on TDC therapeutic instruction data (single-turn instruction β answer) covering 57 tasks. Answers are formatted as `(A)`/`(B)` for binary classification or a normalized `000`β`1000` bin for regression.
|
| 26 |
|
| 27 |
| Property | Value |
|
|
@@ -39,26 +41,86 @@ It is trained on TDC therapeutic instruction data (single-turn instruction β a
|
|
| 39 |
|
| 40 |
## Performance
|
| 41 |
|
| 42 |
-
Evaluated on the TDC therapeutic benchmark against a reproduced **TxGemma-27B** baseline
|
| 43 |
-
|
| 44 |
-
**16
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
| 53 |
-
|
|
| 54 |
-
|
|
| 55 |
-
|
|
| 56 |
-
|
|
| 57 |
-
|
|
| 58 |
-
|
|
| 59 |
-
|
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
## Usage
|
| 64 |
|
|
|
|
| 22 |
|
| 23 |
**TxGravity-30B-A6B-Open** is a therapeutics-focused, task-specialized model built on the **Gravity-30B-A5B** base. It predicts a broad range of therapeutic properties β small-molecule ADMET, toxicity, drugβtarget interaction, proteinβprotein and peptideβMHC interaction, and more β following the instruction format of the **Therapeutic Data Commons (TDC)** benchmark, in the same spirit as Google's TxGemma.
|
| 24 |
|
| 25 |
+
TxGravity is **co-developed by SK Biopharmaceuticals (SKBP) and Trillion Labs**.
|
| 26 |
+
|
| 27 |
It is trained on TDC therapeutic instruction data (single-turn instruction β answer) covering 57 tasks. Answers are formatted as `(A)`/`(B)` for binary classification or a normalized `000`β`1000` bin for regression.
|
| 28 |
|
| 29 |
| Property | Value |
|
|
|
|
| 41 |
|
| 42 |
## Performance
|
| 43 |
|
| 44 |
+
Evaluated on the TDC therapeutic benchmark against a reproduced **TxGemma-27B** baseline. Over 60 comparable tasks: **16 wins / 26 ties / 18 losses** (6 tasks excluded for lack of a paper-reported comparison). A win/loss requires the margin to exceed the tie threshold; otherwise the task is scored a tie.
|
| 45 |
+
|
| 46 |
+
**Wins (16 tasks)** β TxGravity beats TxGemma-27B on: `bindingdb_ki`, `bindingdb_ic50`, `protein_sabdab`, `ppbr_az`, `caco2_wang`, `lipophilicity_astrazeneca`, `half_life_obach`, `clearance_hepatocyte_az`, `ld50_zhu`, `bioavailability_ma`, `buchwald_hartwig`, `drugcomb_css`, `drugcomb_loewe`, `drugcomb_zip`, `drugcomb_hsa`, `drugcomb_bliss` β spanning binding affinity, ADMET, toxicity, and drug-combination synergy.
|
| 47 |
+
|
| 48 |
+
Highlights: `bindingdb_ki` PCC **0.750** vs -0.112, `bindingdb_ic50` Spearman **0.766** vs 0.643, `protein_sabdab` MAE **0.969** vs 2.332, `ld50_zhu` MAE **0.651** vs 0.776.
|
| 49 |
+
|
| 50 |
+
### Full results
|
| 51 |
+
|
| 52 |
+
Margin is TxGravity - TxGemma, in percentage points (%p) for score metrics or relative percent (%rel) for error metrics (MAE/MSE, lower is better). Up-arrow = higher is better, down-arrow = lower is better.
|
| 53 |
+
|
| 54 |
+
| Task | Metric | N | TxGravity | TxGemma-27B | Margin | Verdict |
|
| 55 |
+
|---|---|---|---|---|---|---|
|
| 56 |
+
| bindingdb_ic50 | Spearman β | 35725 | **0.7660** | 0.6430 | +12.3%p | WIN |
|
| 57 |
+
| bindingdb_ki | PCC β | 11857 | **0.7500** | -0.1120 | +86.2%p | WIN |
|
| 58 |
+
| bioavailability_ma | AUROC β | 128 | **0.7490** | 0.6970 | +5.2%p | WIN |
|
| 59 |
+
| buchwald_hartwig | PCC β | 791 | **0.8920** | 0.8550 | +3.7%p | WIN |
|
| 60 |
+
| caco2_wang | MAE β | 182 | **0.4160** | 0.4660 | +10.7%rel | WIN |
|
| 61 |
+
| clearance_hepatocyte_az | Spearman β | 243 | **0.3240** | 0.2910 | +3.3%p | WIN |
|
| 62 |
+
| drugcomb_bliss | MAE β | 59708 | **3.7370** | 3.9280 | +4.9%rel | WIN |
|
| 63 |
+
| drugcomb_css | MAE β | 59708 | **7.8380** | 9.4180 | +16.8%rel | WIN |
|
| 64 |
+
| drugcomb_hsa | MAE β | 59708 | **3.5840** | 3.7880 | +5.4%rel | WIN |
|
| 65 |
+
| drugcomb_loewe | MAE β | 59708 | **6.4130** | 7.6720 | +16.4%rel | WIN |
|
| 66 |
+
| drugcomb_zip | MAE β | 59708 | **3.0610** | 3.4100 | +10.2%rel | WIN |
|
| 67 |
+
| half_life_obach | Spearman β | 135 | **0.3600** | 0.2890 | +7.1%p | WIN |
|
| 68 |
+
| ld50_zhu | MAE β | 1478 | **0.6510** | 0.7760 | +16.1%rel | WIN |
|
| 69 |
+
| lipophilicity_astrazeneca | MAE β | 840 | **0.5700** | 0.5950 | +4.2%rel | WIN |
|
| 70 |
+
| ppbr_az | MAE β | 559 | **8.2900** | 9.4180 | +12.0%rel | WIN |
|
| 71 |
+
| protein_sabdab | MAE β | 99 | **0.9690** | 2.3320 | +58.4%rel | WIN |
|
| 72 |
+
| ames | AUROC β | 1457 | **0.8410** | 0.8300 | +1.1%p | TIE |
|
| 73 |
+
| bbb_martins | AUROC β | 406 | **0.9190** | 0.8970 | +2.2%p | TIE |
|
| 74 |
+
| bindingdb_patent | PCC β | 49028 | **0.5410** | 0.5140 | +2.7%p | TIE |
|
| 75 |
+
| carcinogens_lagunin | Accuracy β | 56 | **0.8750** | 0.8930 | -1.8%p | TIE |
|
| 76 |
+
| clearance_microsome_az | Spearman β | 221 | **0.5000** | 0.4870 | +1.3%p | TIE |
|
| 77 |
+
| clintox | AUROC β | 297 | **0.7610** | 0.7560 | +0.5%p | TIE |
|
| 78 |
+
| cyp1a2_veith | AUPRC β | 2517 | **0.9310** | 0.9350 | -0.4%p | TIE |
|
| 79 |
+
| cyp2c19_veith | AUROC β | 2534 | **0.8940** | 0.8910 | +0.3%p | TIE |
|
| 80 |
+
| cyp2c9_veith | AUPRC β | 2419 | **0.7920** | 0.7820 | +1.0%p | TIE |
|
| 81 |
+
| cyp2d6_veith | AUPRC β | 2626 | **0.6840** | 0.6620 | +2.2%p | TIE |
|
| 82 |
+
| cyp3a4_veith | AUPRC β | 2467 | **0.8610** | 0.8410 | +2.0%p | TIE |
|
| 83 |
+
| dili | AUROC β | 96 | **0.8930** | 0.8890 | +0.4%p | TIE |
|
| 84 |
+
| herg | AUROC β | 132 | **0.8930** | 0.9000 | -0.7%p | TIE |
|
| 85 |
+
| herg_central | AUROC β | 61379 | **0.8760** | 0.8830 | -0.7%p | TIE |
|
| 86 |
+
| herg_karim | Accuracy β | 2690 | **0.7920** | 0.8000 | -0.8%p | TIE |
|
| 87 |
+
| hia_hou | AUROC β | 117 | **0.9860** | 0.9860 | +0.0%p | TIE |
|
| 88 |
+
| hiv | AUROC β | 8227 | **0.7640** | 0.7930 | -2.9%p | TIE |
|
| 89 |
+
| huri | AUPRC β | 4204 | **0.8080** | 0.7920 | +1.6%p | TIE |
|
| 90 |
+
| mhc2_iedb_jensen | AUROC β | 26856 | **0.8680** | 0.8500 | +1.8%p | TIE |
|
| 91 |
+
| pgp_broccatelli | AUROC β | 245 | **0.9380** | 0.9320 | +0.6%p | TIE |
|
| 92 |
+
| sarscov2_3clpro_diamond | AUROC β | 176 | **0.7470** | 0.7250 | +2.2%p | TIE |
|
| 93 |
+
| skin_reaction | AUROC β | 82 | **0.6510** | 0.6370 | +1.4%p | TIE |
|
| 94 |
+
| tox21 | AUROC β | 15600 | **0.8230** | 0.8430 | -2.0%p | TIE |
|
| 95 |
+
| toxcast | AUROC β | 307282 | **0.8970** | 0.9050 | -0.8%p | TIE |
|
| 96 |
+
| vdss_lombardo | Spearman β | 226 | **0.5820** | 0.5660 | +1.6%p | TIE |
|
| 97 |
+
| weber | AUROC β | 9417 | **0.7180** | 0.7390 | -2.1%p | TIE |
|
| 98 |
+
| bindingdb_kd | PCC β | 1630 | **0.5220** | 0.5960 | -7.4%p | LOSS |
|
| 99 |
+
| butkiewicz | AUROC β | 401997 | **0.7540** | 0.8620 | -10.8%p | LOSS |
|
| 100 |
+
| cyp2c9_substrate_carbonmangels | AUPRC β | 135 | **0.3460** | 0.4730 | -12.7%p | LOSS |
|
| 101 |
+
| cyp2d6_substrate_carbonmangels | AUPRC β | 135 | **0.7080** | 0.7380 | -3.0%p | LOSS |
|
| 102 |
+
| cyp3a4_substrate_carbonmangels | AUROC β | 135 | **0.6410** | 0.6950 | -5.4%p | LOSS |
|
| 103 |
+
| davis | MSE β | 1064 | **0.7600** | 0.6430 | -18.2%rel | LOSS |
|
| 104 |
+
| disgenet | MAE | 10495 | β | β | β | excluded |
|
| 105 |
+
| gdsc1 | PCC | 35462 | β | β | β | excluded |
|
| 106 |
+
| gdsc2 | PCC | 18541 | β | β | β | excluded |
|
| 107 |
+
| kiba | MSE β | 4537 | **0.6370** | 0.4600 | -38.5%rel | LOSS |
|
| 108 |
+
| leenay | Spearman β | 1520 | **0.1510** | 0.2260 | -7.5%p | LOSS |
|
| 109 |
+
| mhc1_iedb_imgt_nielsen | AUROC β | 37197 | **0.9200** | 0.9680 | -4.8%p | LOSS |
|
| 110 |
+
| mirtarbase | Accuracy β | 160033 | **0.5550** | 0.8040 | -24.9%p | LOSS |
|
| 111 |
+
| oncopolypharmacology | PCC β | 4647 | **0.5050** | 0.5690 | -6.4%p | LOSS |
|
| 112 |
+
| pampa_ncats | AUROC β | 408 | **0.6630** | 0.7080 | -4.5%p | LOSS |
|
| 113 |
+
| phase1 | AUROC | 561 | β | β | β | excluded |
|
| 114 |
+
| phase2 | AUROC | 1279 | β | β | β | excluded |
|
| 115 |
+
| phase3 | AUROC | 1200 | β | β | β | excluded |
|
| 116 |
+
| sabdab_chen | AUPRC β | 482 | **0.6580** | 0.7080 | -5.0%p | LOSS |
|
| 117 |
+
| sarscov2_vitro_touret | AUROC β | 298 | **0.4580** | 0.5300 | -7.2%p | LOSS |
|
| 118 |
+
| solubility_aqsoldb | MAE β | 1997 | **0.8550** | 0.8050 | -6.2%rel | LOSS |
|
| 119 |
+
| tap | MAE β | 240 | **5.4400** | 4.7850 | -13.7%rel | LOSS |
|
| 120 |
+
| uspto | Accuracy β | 221648 | **0.0000** | 0.0880 | -8.8%p | LOSS |
|
| 121 |
+
| uspto_yields | PCC β | 170728 | **-0.0571** | 0.1860 | -24.3%p | LOSS |
|
| 122 |
+
|
| 123 |
+
Also included in this repo as [`summary.csv`](./summary.csv).
|
| 124 |
|
| 125 |
## Usage
|
| 126 |
|