Skip to content

02 / Projects

Research artifacts, not products.

Each of these exists to answer a question rather than to be used by anyone. They are written to be re-run: every configuration reports accuracy, latency, and memory together, measured on the same machine under the same protocol.

RTX 4060 Laptop · CUDA · 8GB VRAM

Featured project

QuantLab

Hardware-aware mixed-precision quantization framework for transformer architectures.

ActiveResearch project · 2025 —

Research question

Given a fixed hardware budget, which parts of a transformer should keep their bits?

QuantLab is a research-oriented framework for studying post-training quantization of transformers when precision is allowed to vary across the model. It measures how sensitive each component is, proposes allocations under a budget, benchmarks them on a real GPU, and keeps the configurations that nothing else dominates.

The design principle is that no allocation counts as good until its cost has been measured. A format that has no efficient kernel is smaller on paper and slower in practice, and the framework is built to make that visible rather than to hide it behind a compression ratio.

Fig. 01 — Configuration space

0.750.800.850.900.95101520253035LATENCY · MSACCURACY
Accuracy against latency for candidate allocations, marker size standing in for memory. Hollow markers are non-dominated. Schematic geometry illustrating the selection problem, not measured results.

Method

  1. 01

    Layer-wise sensitivity analysis

    Quantize one component at a time and record what quality it costs, building a profile across depth and across matrices.

  2. 02

    Post-training quantization

    Calibrate ranges from a small representative sample; no retraining, so the method stays usable on a single consumer GPU.

  3. 03

    Mixed-precision allocation

    Assign INT4, NF4, INT8, or FP16 per component under a total budget, guided by the measured profile.

  4. 04

    Hardware benchmarking

    Time and measure every candidate on the target GPU with warm-up, synchronisation, and tail latency recorded.

  5. 05

    Multi-objective search

    NSGA-II over allocations, returning a Pareto front across accuracy, latency, and memory instead of a single winner.

Fig. 02 — Hardware landscape

FP16 baseline

Mixed precision

Schematic VRAM allocation in gigabytes for an 8 GB accelerator, comparing an FP16 baseline with a mixed-precision configuration.
AllocationFP16Mixed
Weights4.401.55
KV cache1.050.60
Activations0.650.65
Runtime context0.600.60
Headroom1.304.60

Gigabytes · 8 GB capacity

Where 8 GB of VRAM goes during inference, and what mixed precision buys: headroom. Activations and runtime context do not move, which is why weight compression eventually stops paying. Schematic budget.
Status
Active · research project
Year
2025 — present
Hardware
NVIDIA RTX 4060 Laptop GPU — 8GB VRAM
Stack
Python · PyTorch · CUDA · Hugging Face Transformers · NumPy · Linux
Concepts
Post-training quantization · layer sensitivity · mixed precision · NF4 · precision allocation · NSGA-II · Pareto optimization
Reporting
Accuracy, P50/P95 latency, peak memory, and model size per configuration

Results are not summarised here as headline numbers. The framework produces a front of configurations rather than a single best model, and the honest summary of a run is the shape of that front on the hardware it was measured on.

Fig. 03 — Allocation pattern

QKVOFF1FF201040812
  • FP16
  • INT8
  • INT4
The kind of pattern a sensitivity-guided search tends to produce: coarse formats across the middle of the network, precision retained at the edges and in the projections that write into the residual stream.

Featured project

Explainable Multimodal Medical AI

Skin cancer risk stratification from images and clinical metadata, with interpretability and uncertainty treated as results.

CompletedResearch project · 2025 — 2026

Research question

If a model is going to be trusted in a clinical setting, what has to be reported alongside its prediction?

A dermoscopic image alone leaves out what a clinician would obviously use: the patient’s age, sex, and where on the body the lesion is. This project combines both, and then spends most of its effort on the harder half of the problem — establishing whether the resulting predictions can be trusted.

Attribution shows which pixels and which clinical variables drove a decision. Monte Carlo dropout gives a measure of predictive uncertainty. Temperature scaling makes the reported confidence mean something. Validation splits by patient rather than by image, and error rates are reported per demographic group instead of only in aggregate.

EfficientNet-B0·Multimodal fusion·Grad-CAM++·SHAP·MC dropout·Temperature scaling

Fig. 04 — Fusion pipeline

01 · Input

  • Dermoscopic image

    Lesion photograph, resized and normalized.

  • Clinical metadata

    Age, sex, anatomical site — structured, sparse, occasionally missing.

02 · Encode

  • EfficientNet-B0

    Image embedding from a compact convolutional backbone.

  • Metadata encoder

    Clinical variables projected into the same representation space.

03 · Fuse & verify

  • Multimodal fusion → risk stratification

    A joint representation produces the risk output.

  • Grad-CAM++ · SHAP

    Attribution over pixels and over clinical variables.

  • MC dropout · temperature scaling

    Predictive uncertainty, then calibration of the reported confidence.

  • Patient-level split · demographic audit

    Validation that does not leak patients, and error rates reported per group.

Two modalities, two encoders, one fused decision, and the checks that decide whether the decision can be trusted.
Status
Completed · research project
Year
2025 — 2026
Modalities
Dermoscopic images · structured clinical metadata
Stack
Python · PyTorch · EfficientNet · scikit-learn · SHAP · FastAPI · Streamlit
Reliability
Uncertainty estimation · calibration · patient-level validation · demographic fairness audit

What I took from it

That reliability work and efficiency work are the same kind of work. Both are about being precise regarding what a model actually gives you, and both are undermined by reporting a single number. It is the reason calibration and fairness stayed on my list when my focus moved to quantization.

03 / Planned work

Not started · scoped only

BitFlex — Adaptive Precision Transformer Inference

PlannedNo implementation yet

Mixed precision, as I am currently studying it, is decided once and then fixed. BitFlex is the question of whether that decision has to be static at all.

Research question

Can transformer inference select numerical precision at runtime, according to layer sensitivity, input characteristics, and hardware constraints?

Dimensions to compare

  1. 01

    Static mixed precision

    One allocation, fixed ahead of deployment. The baseline.

  2. 02

    Component-aware precision

    Allocation varying by component type rather than only by depth.

  3. 03

    Input-adaptive precision

    Precision chosen per input, on the assumption that easy inputs need fewer bits.

  4. 04

    Hardware-aware adaptive precision

    Runtime selection constrained by what the device can actually execute quickly.

Intended evaluation

Accuracy·F1·P50 latency·P95 latency·Throughput·VRAM·Model size·GPU utilisation

04 / Ongoing

Maintained continuously

Smaller work kept in the open.

  1. AI & Machine Learning Portfolio

    2025 — Present

    A running collection of machine learning experiments — data processing, model development, training, evaluation, and analysis — kept as a record of method rather than of results.

  2. Developer & Research Portfolio

    2026 — Present

    This site: research interests, project write-ups, working notes, and technical work, maintained as its own small engineering exercise.

05 / Also planned

Further directions, listed honestly as intentions.

  1. EdgeFormer

    Later

    Hardware-aware transformer optimization for constrained devices

    Carrying the same allocation question down to devices where memory bandwidth, not compute, is the binding constraint.

  2. ParetoML

    Later

    Accuracy–efficiency optimization tooling

    Making multi-objective model selection a routine, reportable step instead of an ad-hoc comparison of two checkpoints.

  3. AutoQuant

    Later

    Automated transformer compression

    Automating the search over compression decisions so the method transfers to models and accelerators I do not own.