
Erfan Miahi
Verified Expert in Engineering
Python Developer
Toronto, ON, Canada
Toptal member since October 5, 2026
Erfan trained in the RLAI Lab of Richard Sutton (Turing Award winner and a founding father of RL) and has collaborated with Google DeepMind. A reinforcement learning scientist and engineer with extensive experience, he owns LLM pre-training, post-training, and inference end-to-end. He co-authored Covenant-72B, history's largest decentralized LLM pre-training run, and created PULSE, now in Hugging Face TRL. His research has 260+ citations in venues such as EMNLP, AIJ, and TMLR.
Portfolio
Experience
- Python - 11 years
- Deep Learning - 11 years
- Distributed Systems - 8 years
- Deep Reinforcement Learning - 8 years
- Reinforcement Learning - 7 years
- PyTorch - 7 years
- Large Language Models (LLMs) - 4 years
- Reinforcement Learning from Human Feedback (RLHF) - 3 years
Preferred Environment
PyTorch, Megatron-LM, Kubernetes, Weights & Biases, slime, SGLang, Amazon Web Services (AWS)
The most amazing...
...thing I've built is Covenant-72B: it helped add $1.5 billion to Bittensor's market cap, drew 1.8 million views on X, and was praised by Jensen Huang.
Work Experience
Research Scientist, Post Training
Pluralis Research
- Joined Pluralis Research, which builds decentralized, communication-efficient model-parallel training for foundation models, to lead post-training research.
- Led teams on research in inference and LLM pre- and post-training over decentralized, internet-scale compute.
- Built Stoa's pipeline: Macs ran MLX inference, a Megatron trainer learned on one B200 GPU, and PULSE deltas synced weights about 110x smaller than full checkpoints.
- Stabilized off-policy training as Macs joined and left mid-run, using DPPO token gating and a cap on policy staleness.
- Built an inference engine from scratch for pipeline parallelism over wide-area networks (WAN-PP), scheduler included, over 10x faster than existing engines on both time to first token and tokens per second.
Lead Research Engineer
Covenant AI
- Led post-training research at Covenant AI, which runs Templar and Grail, open networks for decentralized LLM pre- and post-training with trustless peers.
- Pioneered PULSE, a sparse RL weight-sync algorithm that cut bandwidth over 100x. It was adopted by Hugging Face TRL and cited by Fireworks for Cursor's Composer 2 RL infrastructure.
- Led R&D on off-policy RLVR, stabilizing 16-step policy staleness and enabling fully asynchronous inference-trainer updates.
- Co-authored Covenant-72B, history's largest decentralized LLM pre-training run, which beat LLaMA-2-70B on MMLU; its launch drew 1.8 million views.
- Proposed a new inference verification algorithm, shrinking verification payloads to 4 bytes per token for a 2x gain.
- Led development of Grail, a decentralized distributed post-training system, lifting a 1.5 billion model's MATH accuracy from 12.7% to 47.6%.
Technical Co-founder
Qelix
- Co-founded a startup focused on post-training LLMs for specialized coding, math, and GPU-kernel agents using RL and SFT.
- Built the first open-source LLM evaluation harness, launched it on the blog of KX (the company behind kdb+), and post-trained LLMs on it for a 40-point pass@1 gain.
- Developed multimodal vision-language models to analyze specialized ML research documents, boosting retrieval F1 by 18 percentage points.
- Built a distributed fine-tuning stack on 16 GPUs across 2 nodes, cutting fine-tuning wall-clock time 2.1x.
- Earned places in the Antler and NextAI programs (under 3-5% admission) and a Y Combinator interview (under 7% admission).
Machine Learning Research Engineer
DeepR Analytics
- Joined DeepR Analytics, a proprietary trading firm, as a founding ML research engineer, building its large-scale automated trading pipeline and research tooling.
- Built a PyTorch pipeline that trained over 1 million RL agents, adding more than $35 of daily PnL per asset per share.
- Implemented state-of-the-art papers and proposed RL algorithms across 10+ research projects, adding over $20 of daily PnL per asset per share.
- Optimized the data pipeline, simulated environments, evaluation pipeline, and async I/O, cutting epoch time 9x and EC2 cost 4x.
- Migrated the training and backtesting stack to AWS ECS and Fargate, enabling on-demand scaling across 100+ assets.
- Automated hyperparameter search with Optuna on Ray Tune; the best configurations lifted the Sharpe ratio by 22%.
- Raised test coverage to 85% with Pytest, cutting production bugs by 45% across ECS, CI, and the C++ trading engine.
Assistant AI Consultant
Alberta Machine Intelligence Institute
- Joined Amii, one of Canada's three national AI institutes, to advise companies on machine learning problem formulation and technical design.
- Provided continuous technical coaching to 5 enterprise teams, aligning their ML projects with business needs.
- Consulted an energy firm on ML problem formulation and model design for pipeline pressure prediction, potentially saving $10-15 million annually.
- Supported startups in the Scale AI Supply Chain West program, contributing 50+ hours to designing better ML solutions.
Research Associate
University of Alberta (RLAI Lab)
- Joined Richard Sutton's Reinforcement Learning and Artificial Intelligence (RLAI) Lab to build RL prediction and control systems for a water treatment plant.
- Redesigned an RL codebase for sensory data prediction, accelerating experimentation and analysis by 50%.
- Developed and deployed optimized offline RL and control algorithms, improving system performance by 21%.
- Co-authored "GVFs in the Real World: Making Predictions Online for Water Treatment," published in the Machine Learning Journal.
Software Developer
Nilasoft
- Started at Nilasoft as a front-end developer intern and moved into a full-time software developer role.
- Developed web interfaces using TypeScript and Angular and integrated them with server-side services.
- Developed the server-client communication for a large-scale website, following software engineering best practices.
Experience
Covenant-72B: History's Largest Decentralized LLM Pre-Training
https://x.com/tplr_ai/status/2031388295972929720I was one of the main contributors on both the research and engineering teams behind it. The model has 72 billion parameters and was trained on about 1.1 trillion tokens by 70+ independent peers, each running 8 NVIDIA B200s, with no data center and no central cluster. It beats Meta's LLaMA-2-70B on MMLU (67.1 vs. 65.6) and ARC-Easy. Its chat version posts the best IFEval (64.7%) and MATH (26.3%) scores among the chat baselines we compared, and the run maintained about 94.5% compute utilization over commodity internet links.
High/medium Frequency Algorithmic Trading with Reinforcement Learning
I implemented state-of-the-art papers and designed my own RL algorithms across 10+ research projects, adding over $20 more of daily PnL per asset per share, and automated hyperparameter search (Optuna on Ray Tune). On the engineering side, I cut epoch time 9x and EC2 cost 4x by optimizing the data pipeline, simulators, evaluation, and async I/O, and moved training and backtesting to AWS ECS and Fargate so the stack scaled on demand across 100+ assets. I also raised test coverage to 85%, cutting production bugs by 45% across the ML stack and the C++ trading engine.
Stoa: World's First RL Post-training on Consumer Macs
https://pluralis.ai/blog/rl-post-training-on-macs/The model learned an agentic research task: answering biomedical questions by searching 16 million paper abstracts over multiple rounds of tool calls. I designed the system so Macs could join, crash, or leave mid-run without breaking training: workers ran MLX inference and pulled PULSE weight updates about 110x smaller than full checkpoints. At the same time, DPPO token gating and a staleness cap kept off-policy training stable. I also built an inference engine from scratch, with a scheduler included, specialized for pipeline parallelism over wide-area networks (WAN-PP); it runs over 10x faster than existing engines on both time-to-first-token and tokens-per-second. Finally, I wrote the public launch post on the Pluralis blog.
PULSE: 100x Cheaper Weight Sync for RL Post-training
https://arxiv.org/abs/2602.03839The result: 14 GB down to about 108 MB per sync, bandwidth needs cut from 20 Gbit/s to 0.2 Gbit/s, and bit-identical training. Hugging Face implemented the approach in TRL, and Fireworks cited the paper in its write-up on the RL infrastructure behind Cursor's Composer 2. I took PULSE from idea to paper to production, running it in both Grail and Stoa.
Grail: Decentralized RL Post-training Network
https://github.com/one-covenant/grailI also led R&D on off-policy RLVR, maintaining stable training with 16 steps of policy staleness and fully asynchronous inference and training, and integrating PULSE for weight sync over the public internet. On a 1.5B Qwen model, Grail lifted MATH accuracy from 12.7% to 47.6% (nearly 4x), GSM8K from 57.9% to 72.2%, and AMC 2023 from 7.5% to 25%, closely matching an on-policy TRL baseline.
Education
Master's Degree in Computing Science
University of Alberta (Richard Sutton's Lab) - Edmonton, AB, Canada
Certifications
Meta Llama Hackathon Toronto: 1st Place (Team CircuitXR)
Cerebral Valley
Build Basic Generative Adversarial Networks (GANs)
DeepLearning.AI (Coursera)
Reinforcement Learning Specialization
University of Alberta and Alberta Machine Intelligence Institute (Coursera)
Applied Plotting, Charting, and Data Representation in Python
University of Michigan (Coursera)
IBM Blockchain Foundation for Developers
IBM (Coursera)
Introduction to Data Science in Python
University of Michigan (Coursera)
Machine Learning
Stanford Online (Coursera)
Deep Learning Specialization
DeepLearning.AI (Coursera)
Brain and Cognition Summer School
National Brain Mapping Laboratory (NBML)
Deep Learning Summer School 2018
ACM Student Chapter, University of Tehran
Skills
Libraries/APIs
PyTorch, Pandas, vLLM, Hugging Face Transformers, DeepSpeed, Matplotlib
Languages
Python, C++, SQL
Frameworks
Ray
Platforms
Weights & Biases, Linux, Amazon Web Services (AWS), Docker, Kubernetes, Blockchain
Storage
Google Cloud
Other
Reinforcement Learning, Reinforcement Learning from Human Feedback (RLHF), Large Language Models (LLMs), Deep Learning, Deep Reinforcement Learning, Machine Learning, Artificial Intelligence (AI), LLM Fine-tuning, Post-training, Data Science, Megatron-LM, Hugging Face TRL, Slurm Workload Manager, Distributed Systems, AI Agents, Algorithmic Trading, Computer Vision, Multimodal Models, Supervised Fine-tuning (SFT), Natural Language Processing (NLP), Software Engineering, LLM Reasoning, verl, Pre-training, AI Inference, Performance Optimization, slime, Generative Adversarial Networks (GANs), Data Visualization, Neuroscience, Cognitive Science, SGLang
How to Work with Toptal
Toptal matches you directly with global industry experts from our network in hours—not weeks or months.
Share your needs
Choose your talent
Start your risk-free talent trial
Top talent is in high demand.
Start hiring