OncoAgent, an open-source AI framework built during an AMD and Lablab.ai hackathon, uses a dual-tier architecture aimed at privacy-preserving decision support for oncology. According to the project's published paper, researchers fine-tuned the system on 266,854 clinical cases in roughly 50 minutes using AMD Instinct MI300X hardware and sequence packing, claiming a 56x throughput acceleration over standard training.
Architectural Decomposition and Complexity Routing
OncoAgent processes clinical queries across an eight-node LangGraph stateful graph designed to avoid context saturation in multi-comorbidity cases. Before calling specialized models, an additive scoring formula evaluates factors like cancer rarity, staging, genetic mutations, and treatment history.
Queries scoring below a 0.5 complexity threshold are routed to Tier 1, a 9B-parameter Qwen 3.5 model for rapid triage. More complex cases—such as Stage IV pancreatic carcinoma with multiple mutations—route to Tier 2, a 27B-parameter Qwen 3.6 model intended for deeper reasoning.
Key Features of the Pipeline
- Dual-Tier QLoRA Fine-Tuning: Trained on the OncoCoT dataset of 266,854 real and synthetic cases using 4-bit NormalFloat4 quantisation and Unsloth acceleration.
- Four-Stage Corrective RAG: Retrieves from 70+ NCCN and ESMO guidelines using PubMedBERT embeddings, a 0.10 distance floor, cross-encoder re-ranking, and document grading.
- Deterministic Reflexion Safety: A Critic node runs code-based checks for schema formatting, safety violations, and grounding entailment, with up to two feedback retry loops.
- Local-only operation: Runs entirely on local hardware with ChromaDB, so patient data does not leave the host environment, according to the project description.
Hardware Optimisation and Development Constraints
The paper reports that sequence packing on MI300X hardware enabled full-dataset fine-tuning in about 50 minutes, running natively on ROCm with 192 GB HBM3 memory. The team says early iterations hit tokenisation conflicts under standard HuggingFace pipelines, prompting a migration to Unsloth's FastLanguageModel to avoid out-of-memory errors. Document grading reportedly failed when using Qwen 3.5 for that stage, and the team switched to Qwen 2.5 Instruct to get consistent RAG confidence scores.
Context
OncoAgent is a hackathon project, not a deployed clinical product, and its claims — including the 56x acceleration figure and zero-data-exfiltration guarantee — come from the team's own published paper rather than independent verification or clinical validation. It nonetheless offers a concrete technical example of combining tiered open models with local hardware and guideline-based retrieval for a privacy-sensitive use case.