01 ABOUT · 02 IMPACT · 03 TECH STACK · 04 EXPERIENCE · 05 FEATURED PROJECT · 06 EDUCATION
| 🧠 GenAI & ML Stack |
|
| ☁️ Cloud & Orchestration |
|
| 💻 Languages & Frameworks |
|
| 📚 Data & ML Libraries |
|
| 🧪 Methodologies |
|
| 📊 Data Visualization |
|
This project documents a production-grade reasoning fine-tuning pipeline for Gemma 3 1B Instruct using Tunix (JAX) on Kaggle TPUs. The core goal is judge robustness: ensure the model emits a machine-parseable output schema every time:
<reasoning>...</reasoning>
<answer>...</answer>- Stage 1 — LoRA SFT: Seeds strict XML format + instruction-following behavior.
- Stage 2 — GRPO: Reinforcement learning with composite rewards (format + task quality + stability).
- Judge-safe inference wrapper: Deterministic repair + escaping guarantees strict XML for evaluation.
- Systems reliability: OOM-safe GRPO defaults, KV-cache sizing guarantees, and Tunix 0.1.6 concat-safe rollout batching.
- Evaluation harness: Quant metrics, qualitative before/after, and TensorBoard-derived training curves.
These are small-N smoke tests designed to catch regressions early (format breaks, empty outputs, instability). The key win is eliminating judge-visible format failures via deterministic strict-XML repair.
| Metric | Result | Detail |
|---|---|---|
| Strict XML validity (raw generation) | 🟡 40.00% | 8 / 20 |
| Strict XML validity (after deterministic repair) | 🟢 100.00% | 20 / 20 |
| Math exact match (normalized, repaired) | ⚪ 15.00% | 3 / 20 |
| Practice | What it delivers | |
|---|---|---|
| 📐 | Contract-first design | Strict output schema enforced in prompt, rewards, and inference wrapper |
| 🔧 | Tunix 0.1.6 stability engineering | Concat-safe rollout batching + KV-cache correctness guarantees |
| 🛡 | OOM-safe GRPO defaults | Conservative microbatch/generations/kv-extra to finish reliably on Kaggle TPUs |
| ⚖️ | Judge-friendly evaluation | Before/after tables + training curves + token budget proof |
| 🔁 | Reproducibility | Config-driven pipeline + deterministic inference settings (INF_TOP_P=None for greedy) |
| Challenge / Track | Base Model | Training Strategy | Output Contract | Key Proof |
|---|---|---|---|---|
| Google Tunix Hackathon (Reasoning Traces) | Gemma 3 1B IT | LoRA SFT → GRPO (reward shaping) | Strict XML: <reasoning> + <answer> |
100% strict XML post-repair + full eval artifacts |
FieldScribe is an offline‑first, evidence‑anchored triage copilot that: (1) localizes chest X‑ray findings, (2) detects interval change (Δ heatmap), (3) compresses FHIR‑shaped EHR context into auditable facts, and (4) exports a clinician‑readable triage report + tamper‑evident PDF.
- Offline-first: Runs on-prem / edge once weights & assets are present (no cloud dependency at inference time).
- Evidence-first UX: Always renders images + Δ heatmap + extracted facts alongside the narrative output.
- MedGemma-powered: Uses MedGemma 1.5 4B IT for multimodal synthesis (CXR + EHR).
- Safety guardrails: DICOM routing interlock prevents patient mismatches from entering synthesis.
- Auditability: Structured JSON audit packet + Unicode-safe PDF export (ReportLab).
- Feasibility instrumentation: Logs latency, peak VRAM, and token counts (ablation table in notebook).
- Time saved per complex triage case: ~10–14 minutes (manual EHR review + prior comparison + note drafting → evidence-first workflow).
- Capacity reclaimed (example): 40 cases/day × 10 min/case ≈ 6.7 clinician hours/day returned to care.
- Access + privacy: Enables multimodal assistance in bandwidth-limited or sovereignty-restricted settings.
| Challenge / Track | Base Model | Deployment Target | Evidence / Audit Artifacts | Key Proof |
|---|---|---|---|---|
| Kaggle MedGemma Impact Challenge | MedGemma 1.5 4B IT | Single T4‑class GPU (edge) | Δ heatmap + fact bullets + JSON audit + PDF | Offline-first, evidence-anchored triage workflow |
In many clinical environments, the bottleneck isn’t “can AI answer medical questions?” — it’s last‑mile triage under severe operational constraints:
- Intermittent connectivity: rural clinics, mobile units, disaster response, overcrowded EDs can’t rely on cloud uptime.
- Strict data sovereignty: PHI often cannot leave the site or cross borders.
- Fragmented evidence: images, EHR facts, and priors exist — but clinicians must fuse them under intense time pressure.
FieldScribe targets a concrete workflow: longitudinal chest X‑ray (CXR) interval change triage where a clinician must:
- detect what changed,
- localize it,
- reconcile with EHR context, and
- write an auditable note.
Status: Research / demo prototype.
Safety: Not a medical device. Outputs require clinician verification.
This README expects the following files under assets/:
Multimodal_Triage.jpegClinical_Pipeline_Architecture.pngMultimodal_Triage_Dashboard.pngAgent_Demo.jpegLongitudinal_CXR_Delta_Heatmap.pngSafety_Guardrails_and_Audit_Trace.jpegAuditable_Clinical_Summary_Report.pdf
➡️ Download the example PDF: Auditable_Clinical_Summary_Report.pdf
- Accepts an offline FHIR‑shaped EHR bundle (JSON).
- Runs a Fact Filter stage that compresses dense EHR into query‑relevant bullet facts (non‑inventive, audit‑friendly).
- Goal: keep the LLM context window clean, reduce hallucinations, preserve traceability.
- Computes an interval change heatmap (current vs prior CXR).
- Produces a visual evidence panel clinicians can inspect immediately (value even before text generation).
- Uses MedGemma 1.5 4B IT as the multimodal model for:
- longitudinal imaging review
- anatomical localization / grounding
- EHR‑informed synthesis
- Runs deterministic inference (
do_sample=False) for reproducibility; optionally exposes a “glass‑box” trace in the UI.
- Generates an executive triage summary and a FHIR‑shaped audit packet.
- Exports a Unicode‑safe PDF (ReportLab) with evidence images, trace metadata, and disclaimers.
- Offline‑first design: works without external service calls once weights/assets are present.
- Run‑all notebook reproducibility: deterministic settings + auto‑reset YAML config pattern.
- Safety interlock: DICOM header routing prevents mismatched patient context from entering synthesis.
- Performance instrumentation: captures latency, output tokens, and peak VRAM across ablations.
- Clinician-style UX: evidence surfaced alongside narrative output.
- Target: single Tesla T4‑class GPU (edge deployable).
- Includes:
- Warmup after model load to reduce first‑click latency spikes.
- Fast Mode to cap tokens / reduce context while preserving evidence‑first outputs.
- Ablation table logging: latency (s), output tokens, peak VRAM (MB)
Example observed in demo screenshot: Peak VRAM during visualization ≈ 3092 MB (heatmap + panel rendering).
Exact measurements depend on runtime + model caching; see the notebook’s feasibility section.
FieldScribe is a demonstration prototype. It is not a regulated medical device and must not be used for definitive diagnosis or treatment decisions. Always defer to qualified clinical judgment and local protocols.
Linear Regression Model Representation & Implementation From Scratch using Python
| Challenge | Models | Ranking | People Ranking |
|---|---|---|---|
| House Price Prediction | Stacking Models | Top 3% | Top 97 / 4651 |
| House Price Prediction | XGBoost, LightGBM | Top 12% |
▪️ Predict whether a customer will churn using machine learning models
| Challenge | Models | Score | Link |
|---|---|---|---|
| Custumer Churn Prediction | LSTM | 96% | Repository |
| Telco Customer Churn | LSTM | 81% | Repository |
Linear Regression Model Representation & Implementation From Scratch using Python
▪️ Covid 19 — Data Analyst Mexico Overview
▪️ Explanation model of death cases in Mexico
▪️ Mexico Counties Covid Cases Correlation
▪️ Mexico`s Mobility pattern behaviour
▪️ Mexico Counties Clustering
An in-depth look at the spread of covid-19 in North America
▪️ XGBoostRegressor
▪️ RandomForestRegressor
▪️ DecisionTreeRegressor
Numpy
▪️ Long Short-Term Memory (LSTM) Classifier
Numpy
▪️ How to Make a Covid-19 Choropleth Map in Mapbox
























