TCS & AMD AI Hackathon 2026

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.

0
0
0
ICH E2A Compliant
AMD MI300X Optimized
Auditable Reasoning
gemmra β€” inference
Click terminal to take control

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

Validation Score 0.995 F1

Classifies adverse events against ICH E2A seriousness criteria β€” death, hospitalization, disability, life-threatening.

MedDRA Coding

Validation Score 0.667 Weighted

Maps adverse event narratives to standardized MedDRA Preferred Terms using BioDEX-derived medical terminology.

Labelling Assessment

Validation Score 0.801 F1

Determines whether the adverse event is already listed in the drug's approved labelling.

WHO-UMC Causality

Validation Score 0.986 Weighted

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.

T1 Seriousness ACTEMRA 445 tokens
SERIOUS: YES
Patient: 69-year-old female Β· Events: Cardiac arrest, Pulmonary embolism, Acute kidney injury, + 11 more AEs
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.
Structured Output
SERIOUS: YES
Criteria met: DE (Death), LT (Life-threatening), HO (Hospitalization), DS (Disability)
Rationale: The clinical outcome meets multiple seriousness categories, confirming serious classification.
Why this matters: Checks all 5 ICH E2A criteria against 14 adverse events. Identifies 4 criteria met. Zero false positives across 1,027 T1 evaluation samples.
T4 Causality YESCARTA 541 tokens
WHO-UMC: Possible
Patient: 31-year-old female Β· Events: Cytokine release syndrome (5 days after treatment)
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'.
Structured Output
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
Why this matters: 6-dimension WHO-UMC evidence extraction. Correctly limits to "Possible" due to missing dechallenge data. 95.5% exact match across 794 T4 evaluation samples.

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
πŸ’‘
Key finding: The base model achieves 0.729 composite only with hand-crafted format prompts and thinking disabled. Gemmra achieves 0.862 with zero prompt engineering, adds auditable thinking traces, and hits 100% format compliance β€” the gap between "works in a lab" and "works in production."
†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.

v1 Initial training
Composite 0.620

First SFT checkpoint (0.23 epoch). T1/T4 already strong β€” model gets seriousness and causality right early.

T1: 1.000 T2: 0.134 T3: 0.387 T4: 0.960
v5 +2.1Γ— T2
Composite 0.705

Found abstract[:500] truncation hiding ground truth from 92% of T2 training data. One line fix β†’ T2 jumped 2.1Γ—.

T1: 1.000 T2: 0.558 T3: 0.286 T4: 0.975
v6 +3Γ— T3
Composite 0.859

Forensic audit found 62% NO / 38% YES label imbalance in T3. Rebalancing to 50:50 restored T3 from 0.286 to 0.884.

T1: 1.000 T2: 0.572 T3: 0.884 T4: 0.980
Final Shipped βœ“
Composite 0.862

Validated across 3,645 decontaminated samples. T2 improved further at scale (0.572β†’0.667). Composite confirmed at 0.862.

T1: 0.995 T2: 0.667 T3: 0.801 T4: 0.986

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

Shipped
0.862 composite
Format 100%
Reasoning 45 words
Collapsed

Supervised fine-tuning with completion-only loss. Data quality drove all gains β€” 4 iterative data fixes over 7 days.

Primary Model

WiSE-FT

Alternative
0.825 composite
Format 99%
Reasoning 400+ words
Deep reasoning

Weight 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 Ceiling
0.828 composite
Format 100%
Reasoning 83–279 tokens
Plain text

DAPO (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.

FDA FAERS + BioDEX + OnSIDES β†’ 32,355 training pairs across 4 task types

Gemmra Data Pipeline β€” FAERS, BioDEX, OnSIDES ingestion through cleaning, prompt building, and decontamination

bf16 LoRA SFT on Gemma 4 31B-it β†’ 95 GB VRAM on AMD MI300X (192 GB HBM3)

Gemmra Training Pipeline β€” bf16 LoRA SFT on Gemma 4 31B using AMD MI300X 192GB HBM3

3,645 decontaminated samples β†’ composite 0.862 across T1–T4 pharmacovigilance tasks

Gemmra Evaluation Pipeline β€” 3,645 decontaminated samples 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.

~2,000Γ— Cost reduction per case
~100–180Γ— Faster than manual review
100% Format compliance

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.

95 / 192 GB Training VRAM (bf16)
61 / 192 GB Inference VRAM (31.8%)
1.9 hrs Full SFT training time

Data Challenges We Solved

We claim "data-first debugging" β€” here's the evidence:

MedDRA is proprietary β†’ Engineered PT training from BioDEX open biomedical literature + FAERS reaction terms
FDA redacts doctor narratives β†’ Built structured prompts from remaining FAERS fields (demographics, drug info, outcomes)
BioDEX truncated at 500 chars β†’ Fixed one line β†’ 2.1Γ— improvement on MedDRA coding (92% of training data was corrupted)
No train/eval decontamination β†’ MeditronFO-inspired content-hash splitting across 3,645 eval samples
No drug-label ground truth β†’ Integrated OnSIDES (drug label side effects database) for T3 labelling assessment ground truth

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

Exact Match
Synonym Match
Fuzzy Match
SOC Match

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

Team 2930 Β· FINETUNING_005

Built by Two Engineers.

TCS & AMD AI Hackathon 2026 β€” Fine-Tuning Track

Hackathon TCS & AMD AI Hackathon 2026
Team #2930
Track FINETUNING_005
Model Gemma 4 31B (bf16 LoRA)

Explore Gemmra.

Fine-tuned Gemma 4 31B for pharmacovigilance. Open source. Built on AMD MI300X.