HPC · Performance Analysis · Agent Systems

Leyan Li

I measure how scientific code behaves at scale — and build the tooling that turns those measurements into answers you can check.

MSc High Performance Computing with Data Science, University of Edinburgh Available from Sept 2026
4,096
cores in the largest audited run (32 ARCHER2 nodes)
408
runs behind the published numbers — every one content-audited
29.83×
strong-scaling speedup, 1 → 32 nodes, at 93.2% efficiency
100%
LLM router on a 30-question eval set (rule baseline 83.3%)

Every figure comes from a run log or a public repository; where an earlier conclusion was wrong, the retraction is on the site too.

Selected work

3 of 3

hpc-benchmark-agent

An agent that answers questions about real PETSc/ARCHER2 benchmark data — with a rule-based baseline it has to beat, and an eval set that says whether it did.

  • Both routers emit the identical shape {intent, unknowns}, so one eval harness and a one-word --router switch cover both.
  • Scored on a 30-question Chinese eval set: rule router 83.3%, LLM function calling 100%; removing the system prompt drops the same model to 63.3%.
  • Defensive parsing: no tool call, hallucinated tool names and malformed JSON arguments all collapse to an explicit unknown.
  • Reports are byte-deterministic against the same database; 229 tests run fully offline behind an injected fake LLM.
PythonSQLiteFastAPI function callingpytestPETSc

github.com/leyancode/hpc-benchmark-agent

marl-value-factorisation

What happens when you move VDN's additive decomposition and QMIX's monotonic mixing into a MAPPO critic?

  • Three variants share the same runner, buffer, actor and PPO hyper-parameters; only the critic branch differs.
  • The more expressive critic loses: additive VDN is the only variant to turn positive (≈150) on sparse-reward Predator-Prey.
  • Root cause traced: QMIX's TD target keeps max Qᵢ while the actor is on-policy, so the error is not a valid advantage.
  • Negative results kept in, including the admission that all three learners only produce a shared scalar advantage.
PyTorchMAPPOVDN QMIXPettingZooGitHub Actions

github.com/leyancode/marl-value-factorisation

PETSc MPI+OpenMP scaling on ARCHER2

At a fixed core count, does cutting MPI ranks pay for the threading overhead? 408 audited runs on ARCHER2.

  • 5M–165M unknowns, four full-node layouts, up to 4,096 cores, three repeats each.
  • Hybrid wins in both dimensions, with a different layout each time.
  • MAP explains the ranking: MPI exposure 46.7%→6.2%, OpenMP waiting 48.3%→76.5%.
  • An audit found 302 of 303 logs with mismatched process counts; that whole stage was binned.
CPETScMPI OpenMPSlurmLinaro MAP

github.com/leyancode/hpc_benchmark_archer2  ·  Read the retraction

Notes & references

all notes →

Three note repositories I maintain in the open.

Contact

Open to graduate roles in agent/LLM applications and performance engineering, from September 2026.