File size: 5,618 Bytes
48f238c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
license: apache-2.0
base_model: Qwen/Qwen3.6-27B
tags:
  - oncology
  - medical
  - qwen3
  - amd
  - rocm
  - mi300x
  - clinical
  - multi-agent
datasets:
  - MaximoLopezChenlo/OncoAgent-Clinical-266K
language:
  - en
  - es
pipeline_tag: text-generation
---

# 🧬 OncoAgent v1.0 β€” 27B (Tier 2)

**Advanced Reasoning Model for Complex Oncology Cases**

[![AMD](https://img.shields.io/badge/AMD-MI300X-ed1c24?logo=amd&logoColor=white)](https://www.amd.com/en/products/accelerators/instinct/mi300x.html)
[![ROCm](https://img.shields.io/badge/ROCm-7.2-ed1c24)](https://rocm.docs.amd.com/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

> **AMD Developer Hackathon 2026** Β· Deployed on AMD Instinctβ„’ MI300X Β· ROCm 7.2

## Model Description

OncoAgent v1.0 27B is the **Tier 2 (advanced reasoning)** model in the OncoAgent multi-agent oncology triage system. It leverages the full capacity of [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) with a specialized clinical oncology system prompt and RAG-grounded inference.

This model is activated for **complex cases** that require deeper reasoning:
- Multi-line therapy planning (Stage III/IV cancers)
- Rare tumor types with limited guideline coverage
- Cases requiring cross-guideline synthesis (NCCN + ESMO)
- Differential diagnosis with conflicting biomarkers

## Architecture Role

In the OncoAgent dual-tier architecture, the 27B model is the "deep thinker":

```
Clinical Case β†’ Router Agent
                    β”‚
                    β”œβ”€β”€ Simple/Common β†’ [Tier 1: 9B LoRA] β†’ Fast Triage
                    β”‚
                    └── Complex/Rare  β†’ [Tier 2: 27B]     β†’ Deep Analysis
                                              β”‚
                                              ↓
                                        Specialist Agent
                                              β”‚
                                              ↓
                                        Critic (Reflexion Loop)
                                              β”‚
                                              ↓
                                     Validated Recommendation
```

### Routing Criteria (Tier 1 β†’ Tier 2 Escalation)

| Trigger | Example |
|---|---|
| Stage III/IV disease | Metastatic breast cancer |
| Rare tumor types | Merkel cell carcinoma |
| Multi-drug regimens | Combination immunotherapy |
| Conflicting data | HER2-low with BRCA mutation |
| Low RAG confidence | Cross-encoder score < 0.70 |

## Configuration

This model uses the base Qwen3.6-27B with OncoAgent's specialized system prompt and Corrective RAG pipeline. The configuration includes:

| Parameter | Value |
|---|---|
| **Base Model** | Qwen/Qwen3.6-27B |
| **Precision** | BF16 (native MI300X Matrix Cores) |
| **Context Window** | 32,768 tokens |
| **Serving Engine** | vLLM with PagedAttention |
| **GPU Memory** | ~55% of MI300X 192GB HBM3 |
| **Tensor Parallelism** | 1 (single MI300X) |

## System Prompt

```
You are OncoAgent-Specialist, a board-certified oncologist AI assistant.
You provide evidence-based treatment recommendations grounded EXCLUSIVELY
in the retrieved clinical guidelines (NCCN/ESMO).

RULES:
1. NEVER invent treatments. If the evidence is not in the provided context,
   state: "InformaciΓ³n no concluyente en las guΓ­as provistas."
2. Always cite the guideline source (NCCN/ESMO) and evidence category.
3. Structure your response with: Clinical Summary, Diagnostic Findings,
   Treatment Recommendation, and Evidence Level.
4. Consider comorbidities, contraindications, and patient-specific factors.
5. For Stage IV cases, include discussion of clinical trial eligibility.
```

## vLLM Deployment (AMD MI300X)

```bash
# Serve Tier 2 on MI300X
python -m vllm.entrypoints.openai.api_server \
    --model Qwen/Qwen3.6-27B \
    --dtype bfloat16 \
    --tensor-parallel-size 1 \
    --gpu-memory-utilization 0.55 \
    --max-model-len 32768 \
    --port 8001
```

### Dual-Model Deployment

```bash
# Run both tiers simultaneously on MI300X (192GB HBM3)
# Tier 1 (9B): ~45% GPU memory β†’ Port 8000
# Tier 2 (27B): ~55% GPU memory β†’ Port 8001
bash deploy/start_vllm.sh both
```

## Safety Features

OncoAgent v1.0 27B operates within a multi-layered safety framework:

1. **Anti-Hallucination Policy** β€” Model is constrained to RAG-retrieved context only
2. **Reflexion Critic Loop** β€” Output is validated by a dedicated Critic agent
3. **Diagnostic Rigor Check** β€” Treatment recommendations require confirmed pathology
4. **PHI Sanitization** β€” Zero patient health information in logs
5. **HITL Gate** β€” Stage IV cases can trigger human-in-the-loop review

## Links

- πŸ”— **Demo:** [HF Space](https://huggingface.co/spaces/MaximoLopezChenlo/OncoAgent)
- πŸ”— **GitHub:** [maximolopezchenlo-lab/OncoAgent](https://github.com/maximolopezchenlo-lab/OncoAgent)
- πŸ”— **Tier 1 Model:** [OncoAgent-v1.0-9B](https://huggingface.co/MaximoLopezChenlo/OncoAgent-v1.0-9B)
- πŸ”— **Dataset:** [OncoAgent-Clinical-266K](https://huggingface.co/datasets/MaximoLopezChenlo/OncoAgent-Clinical-266K)

## Citation

```bibtex
@misc{oncoagent2026,
  title={OncoAgent: Multi-Agent Oncology Triage System},
  author={Lopez Chenlo, Maximo},
  year={2026},
  howpublished={AMD Developer Hackathon 2026},
  url={https://github.com/maximolopezchenlo-lab/OncoAgent}
}
```

## License

Apache 2.0 β€” This model configuration is for **research and educational purposes only**. Not intended for direct clinical use without professional medical oversight.