Gemmra NidΔna for Pharmacovigilance
AI-powered drug safety review with auditable reasoning. One fine-tuned model that automates 4 critical pharmacovigilance tasks β from 30 minutes per case to 10β20 seconds. Targeting the $8.3B β $15β18B PV market.
Four Tasks. One Model.
Gemmra performs all four critical ICSR assessment tasks with auditable reasoning β each one previously requiring 30 minutes of expert review.
Seriousness Classification
Classifies adverse events against ICH E2A seriousness criteria β death, hospitalization, disability, life-threatening.
MedDRA Coding
Maps adverse event narratives to standardized MedDRA Preferred Terms using BioDEX-derived medical terminology.
Labelling Assessment
Determines whether the adverse event is already listed in the drug's approved labelling.
WHO-UMC Causality
Assesses the causal relationship between drug and adverse event using WHO-UMC methodology.
See Gemmra think.
Real model outputs with extended thinking traces. Each assessment follows regulatory frameworks (ICH E2A for seriousness, WHO-UMC for causality) β producing the audit trail that pharmaceutical companies and agencies like FDA require.
Thinking Trace
Pharmacovigilance expert.
Assess seriousness per ICH E2A criteria.
Death (DE), Life-threatening (LT), Hospitalization (HO), Disability (DS), Congenital anomaly (CA).
Patient: 69-year-old female.
Drug: ACTEMRA.
Adverse events: Acute kidney injury, ALT increased, AST increased, Blood glucose decreased, Blood potassium increased, CRP increased, Cardiac arrest, Fibrin D dimer increased, Haemodialysis, Inflammatory marker increased, Platelet count decreased, Pulmonary embolism, Serum ferritin increased, Therapy non-responder.
Outcome: "The patient did not survive the clinical episode." -> Death (DE).
Outcome: "The patient suffered permanent functional limitation." -> Disability (DS).
Clinical severity: Cardiac arrest and pulmonary embolism are life-threatening conditions. -> Life-threatening (LT).
Treatment: Haemodialysis suggests hospitalization or intensive care. -> Hospitalization (HO).
DE (Death): Yes. The patient died.
LT (Life-threatening): Yes. The clinical situation was critical.
HO (Hospitalization): Yes. The severity of the event required hospitalization.
DS (Disability): Yes. Permanent functional limitation is noted.
CA (Congenital anomaly): No. Not applicable.
The case meets multiple seriousness criteria (DE, LT, HO, DS).
Final classification: Serious. SERIOUS: YES
Criteria met: DE (Death), LT (Life-threatening), HO (Hospitalization), DS (Disability)
Rationale: The clinical outcome meets multiple seriousness categories, confirming serious classification. Thinking Trace
Pharmacovigilance expert.
Extract evidence and assess causality using WHO-UMC criteria.
31-year-old female. YESCARTA. Follicular lymphoma.
Cytokine release syndrome. 5 days.
Temporal Relationship: The 5-day interval between drug start and event onset is within the expected window for this type of reaction.
Dechallenge: No dechallenge information is available β this key criterion cannot be evaluated.
Rechallenge: The drug was not reintroduced, so rechallenge evidence is absent.
Confounders: No obvious confounders identified between the drug indication and the adverse event.
Alternatives: The adverse event is distinct from the treated condition, reducing confounding risk.
Concomitants: No concomitant medications were reported β the suspect drug is the sole agent.
Temporal: Strong (5 days).
Dechallenge: Unknown.
Rechallenge: Not performed.
Confounders: None.
The evidence is suggestive but not conclusive. The temporal link is strong, but the absence of dechallenge/rechallenge data limits the assessment to 'Possible'. WHO-UMC Causality: Possible
Evidence:
- Temporal: Strong (5-day interval, within expected window)
- Dechallenge: Unknown (key criterion cannot be evaluated)
- Rechallenge: Not performed
- Confounders: None identified
- Alternatives: AE distinct from treated condition
- Concomitants: Sole agent Base model vs. Gemmra.
Same model, same hardware. The difference is data-first fine-tuning β plus auditable reasoning traces and 100% format compliance.
Base model evaluated with format-friendly prompts & thinking disabled (250 samples). Gemmra evaluated on 3,645 decontaminated samples with zero prompt engineering.
| Task | Metric | Base Gemma 4β | Gemmra (SFT) | Improvement | Samples |
|---|---|---|---|---|---|
| T1 Seriousness | F1 Score | 0.977 | 0.995 | +1.8% | 1,013 |
| T2 MedDRA Coding | Weighted | 0.311 | 0.667 | +114% | 845 |
| T3 Labelling | F1 Score | 0.782 | 0.801 | +2.4% | 995 |
| T4 Causality | Weighted | 0.845 | 0.986 | +16.7% | 792 |
| Composite Score | Average | 0.729 | 0.862 | +18.2% | 3,645 |
| Format Compliance | All tasks | N/Aβ‘ | 100% | β | 3,645 |
β Base evaluated with task-specific format instructions & enable_thinking=False β‘Format compliance not measured for base model
The data-first debugging journey.
We never changed the model architecture. Every improvement came from fixing the training data.
First SFT checkpoint (0.23 epoch). T1/T4 already strong β model gets seriousness and causality right early.
Found abstract[:500] truncation hiding ground truth from 92% of T2 training data. One line fix β T2 jumped 2.1Γ.
Forensic audit found 62% NO / 38% YES label imbalance in T3. Rebalancing to 50:50 restored T3 from 0.286 to 0.884.
Validated across 3,645 decontaminated samples. T2 improved further at scale (0.572β0.667). Composite confirmed at 0.862.
Three approaches. One conclusion.
We explored SFT, weight interpolation, and reinforcement learning. Each proved the same thing: data quality is the bottleneck, not the algorithm.
SFT
ShippedSupervised fine-tuning with completion-only loss. Data quality drove all gains β 4 iterative data fixes over 7 days.
WiSE-FT
AlternativeWeight interpolation explored to recover reasoning depth. Ξ±=0.9 trades ~4% accuracy for 10Γ richer thinking traces β a research contribution, not the primary model.
DAPO/GRPO
Validated CeilingDAPO (a frontier GRPO variant) on SFT gained only +0.003 composite, then reward variance collapsed. Both approaches prove SFT captured all learnable signal.
WiSE-FT Ξ± Sweep β Exploring the Accuracy vs. Reasoning Trade-Off
Blending fine-tuned weights with pre-trained weights at different Ξ± values. Higher Ξ± = more SFT format, lower Ξ± = more base model reasoning.
| Ξ± | Composite | T1 F1 | T2 | T3 F1 | T4 | Format | Reasoning |
|---|---|---|---|---|---|---|---|
| 1.0 (SFT) | 0.862 | 0.995 | 0.667 | 0.801 | 0.986 | 100% | 45 words |
| 0.9 | 0.825 | 0.985 | 0.532 | 0.852 | 0.930 | 99% | 400+ words |
| 0.8 | 0.782 | 0.971 | 0.416 | 0.825 | 0.915 | 99.5% | 400+ words |
| 0.7 | 0.703 | 0.939 | 0.286 | 0.867 | 0.720 | 99.5% | 400+ words |
Ξ±=1.0 (pure SFT) is the primary model with highest accuracy. Ξ±=0.9 recovers deeper clinical reasoning at a ~4% accuracy cost β useful when audit trail depth matters more than raw metrics. T3 improved from 0.801β0.852 as base model clinical knowledge mixed in.
End-to-End Pipeline.
Three interconnected pipelines β from raw FDA data to validated clinical AI.
Every step is reproducible, open source, and documented.
End-to-End Pipeline.
Every step is reproducible, open source, and documented.
FDA FAERS + BioDEX + OnSIDES β 32,355 training pairs across 4 task types
bf16 LoRA SFT on Gemma 4 31B-it β 95 GB VRAM on AMD MI300X (192 GB HBM3)
3,645 decontaminated samples β composite 0.862 across T1βT4 pharmacovigilance tasks
Built for Production.
How Gemmra aligns with enterprise pharmaceutical operations and AMD hardware strategy.
TCS Life Sciences
TCS Life Sciences is a Leader in pharmacovigilance operations (Everest Group PEAK Matrix), serving top global pharmaceutical companies. Drug safety case processing is a core operational challenge for these clients β averaging 100K+ cases/year per company. Gemmra directly addresses this by automating the four most time-consuming pharmacovigilance assessments.
AMD MI300X Advantage
Our training requires 95 GB VRAM for bf16 LoRA across all linear layers of a 31B model. This is physically impossible on any single NVIDIA GPU (A100/H100 max at 80 GB). AMD MI300X's 192 GB HBM3 is the enabling technology β zero quantization means higher quality gradients and a better final model.
Data Challenges We Solved
We claim "data-first debugging" β here's the evidence:
Engineered on AMD MI300X.
Full bf16 precision, zero quantization, LoRA r=64. Every architectural choice leverages AMD's 192 GB HBM3 advantage.
bf16 LoRA Training
Full bf16 precision with LoRA rank 64 on MI300X. Zero quantization = zero gradient noise. LoRA r=64
Extended Thinking Mode
Gemma 4's native thinking mode generates visible reasoning traces β the audit trail regulators require. enable_thinking=True
Data-First Debugging
Our biggest gain came from fixing one data pipeline bug, not hyperparameter tuning. Data quality > model tricks. 2.1Γ improvement
Gemmra-Bench v1.0
Novel 4-level hierarchical scoring: exact β synonym β fuzzy β SOC match. 3,645 decontaminated evaluation samples across 4 PV tasks. Open Benchmark
MI300X Inference
8.5s per case Β· 6.7 tok/s Β· 500ms TTFT Β· 61 GB / 192 GB VRAM (31.8%)
Published Negative Results
RL (DAPO/GRPO) on SFT gained only +0.003 composite, then reward variance collapsed. WiSE-FT trades 4% accuracy for richer reasoning. Both prove SFT captured all learnable signal. Scientific Rigor
Built by Two Engineers.
TCS & AMD AI Hackathon 2026 β Fine-Tuning Track
Explore Gemmra.
Fine-tuned Gemma 4 31B for pharmacovigilance. Open source. Built on AMD MI300X.