Long context is mostly paid-for waste: a model re-reads everything at every step, in every layer and head, and needs little of it. The fix has to retrofit, because the models that matter are already trained. It can live beside the model as a learned selector, inside it as self-declared attention spans, or beneath it in the decode loop. I built all three, down to the Triton kernels, on a shared GPU cluster I also run.

  • Integrated M.S./Ph.D. in Artificial Intelligence
    Korea Advanced Institute of Science & Technology (KAIST) Seoul, South Korea
    Advisors
    Se-Young Yun and James Thorne
    Thesis
    Efficient Long-Context Large Language Models
    Teaching Assistant
    Deep Learning for Natural Language Processing (Fall 2023)
  • B.E. in Computer Science and Engineering
    National University of Sciences & Technology (NUST) Islamabad, Pakistan
    Thesis
    IoT-Based Intelligent Manufacturing Execution System with Predictive Analysis
    Honors
    Medals of Excellence; Merit-Based Scholarship (2018–2020)
  • Graduate Researcher
    Korea Advanced Institute of Science & Technology (KAIST) Seoul, South Korea
    • Design sparse attention, KV-cache, and speculative decoding methods for long-context LLMs in the OSI Lab, from algorithm to Triton and CUDA kernel.
    • Advised eight undergraduate teams on multilingual LLM evaluation, one low-resource language each, producing BEnQA (Findings of ACL'24) and CLIcK (LREC-COLING'24).
    • Advised four undergraduate students on cultural evaluation of text-to-image and multimodal models, producing CULTDIFF (ACL'25) and MIXCUBE (C3NLP @ NAACL'25).
  • Research Intern
    RiseTech Islamabad, Pakistan
    • Built a U-Net for spinal segmentation and scoliosis classification, and a vision-language model generating diagnostic text from chest X-rays.
  • Engineering Intern
    microTech Services · EME Centre Islamabad, Pakistan
    • Built the Android client for Amber Chat, an encrypted communication platform.
    • Wrote a real-time operating system for low-latency microcontroller applications.
see all
Efficient Long-Context LLMs
2025 – Present
  • SpotAttention : a plug-in block-sparse selector that matches dense accuracy at long context while decoding 3.9× faster than FlashAttention.
  • Attention-Span : a prompting protocol that lets a model declare where it will attend, cutting decode attention cost up to 53% at near-zero accuracy loss.
  • Long-Context Speculative Decoding : an efficient drafter and verifier pair for speculative decoding at long context; in progress.
Efficient-LLM Architecture & Training Systems
2023–2025
  • CascadeFormer : depth-tapered Transformers and gradient-based layer pruning motivated by Gradient Fan-in Asymmetry, cutting latency 8.6% and raising throughput 9.4% at equal perplexity.
  • Foundations of Efficient LLMs : two years of groundwork for the sparsity agenda, spanning GSPMD training on TPU pods, context compression, and uncertainty-aware prediction.

Equal contribution.

2023 – Present
  • GPU Cluster : built and run a Slurm cluster of heterogeneous GPUs serving the lab's research, with unified FreeIPA identity, NUMA-aware per-job GPU isolation, shared ZFS storage over NFS, and a self-hosted WireGuard overlay connecting remote nodes.
  • HomeLab : a self-hosted cloud on Proxmox and ZFS, with pfSense routing, SSO across every service, and a local LLM stack.
  • pytorch/xla : two merged fixes, bool dtype support for fori_loop's randint (#7632) and rank-0-only deletion in the distributed checkpoint manager (#7296).
  • huggingface/transformers : proposed the index_copy_ approach for XLA StaticCache (#31118), shipped in #31857.
  • plezy : two merged fixes to a Flutter Plex client, PGS subtitles when transcoding (#1399) and transcode-session reporting on the timeline (#1381).
LLM Training & Inference
Pretraining, Supervised fine-tuning, Reinforcement learning (PPO, GRPO), PEFT, Knowledge distillation (KL), Long-context inference, Sparse attention, KV-cache compression, Speculative decoding, Quantization
ML Systems & Performance
Distributed training (FSDP, GSPMD, RDMA), TPU/XLA static graphs, Custom attention kernels (Triton, CUDA), Roofline latency modeling
Frameworks & Tooling
Python (PyTorch, Hugging Face, vLLM, FlexAttention), Weights & Biases, Docker, ZFS / TrueNAS

BibTeX