Skip to content

I work at the intersection of machine learning and systems. My research asks: what does it cost an AI system to learn and to decide, and can that cost be steered?

I’m currently an AI Systems Engineer at Federal Working Group. Before that, I was an undergraduate researcher in Purdue’s Duality Lab, advised by Prof. James Davis. My work spans preference learning for code optimization, the efficiency of LLM systems, and the training dynamics of deep networks, combining large-scale empirical studies with mechanistic analysis.

PhD applications: I am applying to PhD programs for Fall 2027 in AI systems: the cost of LLM inference, agents, and large-scale training. My CV and research page summarize my work so far.

Brief bio

Ahmed Elmersawy is an AI Systems Engineer at Federal Working Group in Washington, DC. He received his B.S. in Computer Engineering from Purdue University in 2026, where he held a Presidential Scholarship and was an undergraduate researcher in the Duality Lab, advised by Prof. James Davis.

His research spans multi-objective code optimization with preference learning (Hydra, presented at DAC 2026), the cost of decision-making inside LLM systems (under review at MLSys 2027), and the training dynamics of deep networks (MMLS 2026). He received the DAC Young Fellowship in 2026 and an NSF Grant Award in 2025.

Research Themes

  1. Steering Code LLMs Across Competing Objectives

    Real software optimization trades runtime against memory, energy, and throughput. With Hydra, I frame that trade-off as a preference-learning problem, fine-tuning a code LLM with DPO on profiled implementation pairs so a single model can be steered toward whichever objective a deployment cares about.

  2. When Is an LLM Worth What It Costs?

    Many decisions inside deployed LLM systems, like which tool to call, whether a cached answer is safe to reuse, or which model to route to, don't need text generation. I measure when a small standalone decision model can replace the LLM, accounting for quality, cost, latency, and GPU energy together.

  3. Predicting Training Behavior Before Training

    Much of what we believe about how networks train is empirical folklore. I derive and test training-free predictors, such as whether the fraction of gradient-carrying units rises or falls for a given activation and optimizer, across nearly 500 runs on CNNs, MLP-Mixers, and Transformers.

What I Want to Study in a PhD

Each of my projects ended on a question it couldn’t answer. These are the three I want to spend a PhD on, where ML systems, efficient inference, and learning theory meet.

  1. 1.

    When should an LLM system pay for generation?

    LLM serving, routing & caching · selective prediction

    In Deciding Without Generating, a frontier LLM used as a cache guard cost more than having no cache at all (138%), while a small decision model reached 93.3% accuracy at about 2% of the cost. For routing, only a classifier trained on the cheaper model's own failures helped, recovering 64.9% of the quality gap. I want to treat routing, caching, and agent control as one learning-to-defer problem, with guarantees rather than benchmark wins.

  2. 2.

    Measured cost as a training signal.

    Energy-aware ML · LLMs for code & kernels

    Hydra used profiled execution as a DPO reward to teach a code LLM to trade latency, memory, and energy, but its energy was estimated from CPU cycles on a small benchmark. I want rewards from measured hardware cost, applied first to GPU kernels and inference code, and eventually to a model's own inference cost, so the accuracy-cost trade-off is chosen at deployment.

  3. 3.

    Predicting training behavior before paying for it.

    Large-scale training · training dynamics

    Large training runs are expensive to get wrong. My variance-collapse predictor reads one training-free quantity and gets the direction of gate-density change right, including AdamW in 12 of 12 settings, but not its magnitude or the reason AdamW prevents collapse. I want to close that gap and turn such predictors into pre-flight checks for training configurations, so problems surface before the GPU hours are spent, tested at ImageNet scale and beyond.

The common thread is AI systems that account for their own computation: what it costs to train them, to run them, and to decide what to run. I’m looking for groups working on LLM serving and inference, LLMs for code and agents, energy-aware ML, or large-scale training.

Recent News

  • Oct 2026Submitted Deciding Without Generating, my first-author paper on when a standalone decision model can replace an LLM inside a deployed system, to MLSys 2027. [Preprint]
  • Jul 2026PEARC26 Student Program Fellow; gave a lightning talk on my research to the HPC and research-computing community.
  • Jun 2026Joined Federal Working Group as an AI Systems Engineer in Washington, DC.
  • May 2026Graduated from Purdue University with a B.S. in Computer Engineering.
  • 2026Presented Hydra, a multi-objective code optimization framework, as a poster at the 63rd Design Automation Conference, and received the DAC Young Fellowship. [Paper]
  • 2026Presented my sole-author work on variance collapse and gate density as a poster at the Midwest Machine Learning Symposium (MMLS). [Paper]
  • Mar 2026Attended IEEE SaTML 2026 in Munich, supported by an IEEE Region 8 travel grant.
  • Jan 2026Teaching assistant for ECE 57000 (graduate Artificial Intelligence) and ECE 20800 at Purdue.
  • Aug 2025Joined Prof. James Davis's Duality Lab at Purdue as an undergraduate researcher on the Hydra project.
  • 2025Received an NSF Grant Award supporting undergraduate research.
  • Jun 2024Student Research Trainee with the OpenAirInterface Software Alliance at EURECOM.

Selected Awards

  • DAC Young Fellowship, Design Automation Conference (DAC) (2026)
  • IMS Connect Project Fellow, IEEE International Microwave Symposium (IMS) (2026)
  • PEARC26 Student Program Fellow, Practice and Experience in Advanced Research Computing (PEARC) (2026)
  • IEEE Region 8 Travel Grant, IEEE Region 8, for SaTML 2026 (2026)
  • NSF Grant Award, National Science Foundation (2025)
  • EESAT Student Program Award, EESAT (2025)
All awards, teaching & service →