Text Generation
PEFT
Safetensors
lora
grpo
reinforcement-learning
drug-discovery
bioinformatics
tool-use
gene-ontology
conversational
Instructions to use lokahq/Trinity-Mini-AI-Scientist with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use lokahq/Trinity-Mini-AI-Scientist with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("arcee-ai/Trinity-Mini") model = PeftModel.from_pretrained(base_model, "lokahq/Trinity-Mini-AI-Scientist") - Notebooks
- Google Colab
- Kaggle
File size: 2,527 Bytes
2c17c71 8367f79 338f958 8367f79 2c17c71 bf4885a 2c17c71 bf4885a 2c17c71 e0e3539 2c17c71 76855e4 2c17c71 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | ---
base_model: arcee-ai/Trinity-Mini
library_name: peft
pipeline_tag: text-generation
license: other
tags:
- peft
- lora
- grpo
- reinforcement-learning
- drug-discovery
- bioinformatics
- tool-use
- gene-ontology
---
<p align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/6569f13004643352df96e40f/C8K3iebYRuXgvmpjHNGyl.png" alt="lokahq/Trinity-Mini-AI-Scientist" style="width:100%; max-width:100%;" />
</p>
<p align="center">
<strong>Trinity-Mini-AI-Scientist</strong><br/>
</p>
`Trinity-Mini-AI-Scientist` is a LoRA adapter for
[`arcee-ai/Trinity-Mini`](https://huggingface.co/arcee-ai/Trinity-Mini),
post-trained with Group Relative Policy Optimization (GRPO) for scientific
tool use, drug-discovery workflows, and Gene Ontology reasoning.
This is an adapter, not a standalone model; the base Trinity Mini weights are
required.
## Intended use
The adapter is designed for research workflows that combine:
- grounded use of drug-discovery and biomedical tools;
- evidence-backed synthesis from tool results;
- protein-function reasoning and structured Gene Ontology prediction;
- multi-agent AI-scientist applications.
It is a research model and must not be used as a substitute for qualified
medical, clinical, or laboratory judgment.
## Training
The adapter was trained for 100 GRPO steps with a 16,384-token training
sequence length and a balanced mixture of two environments:
- `lokahq/drug-tool-rl@1`
- `lokahq/bioreason-go-rl@1`
| Setting | Value |
|---|---:|
| LoRA rank / alpha | 64 / 128 |
| Batch size / group size | 256 / 16 |
| Optimizer | Muon |
| Learning rate | 3e-5 |
| Scheduler | Cosine, 8 warmup steps, 5e-6 minimum LR |
| KL coefficient | 1e-3 |
| Maximum tool turns | 12 (training), 8 (evaluation) |
## Evaluation
Accuracy is reported as Avg@1: the score from a single model response on each
held-out evaluation example.
| Evaluation | Metric | Result |
|---|---|---:|
| Drug Tool | Avg@1 | 0.812 |
| BioReason | Avg@1 | 0.863 |
## Usage
```python
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_id = "arcee-ai/Trinity-Mini"
adapter_id = "lokahq/Trinity-Mini-AI-Scientist"
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base_model, adapter_id)
```
|