
Yifan Bai
Verified Expert in Engineering
Machine Learning Engineer and Developer
Vancouver, Canada
Toptal member since July 6, 2026
Yifan is a senior machine learning engineer with 7+ years of experience specializing in large language models, graph neural networks, and NLP for security and enterprise clients, including Microsoft and Fortinet. Yifan excels at building scalable ML infrastructure and end-to-end pipelines, having improved production inference latency by 20% at Fortinet. Yifan's expertise spans Python ML frameworks, Java REST APIs, and cloud platforms across high-throughput environments.
Portfolio
Experience
- Python - 8 years
- XGBoost - 6 years
- LightGBM - 6 years
- Docker - 6 years
- Spark - 4 years
- MLflow - 4 years
- OpenAI - 3 years
- Azure - 2 years
Preferred Environment
Google Cloud Platform (GCP), BigQuery, Snowflake, MLflow, Apache Airflow, Spark, Jenkins
The most amazing...
...ML system I've built processed over 20 million records daily with more than 95% detection rates and less than 2% false positives.
Work Experience
Senior Machine Learning Engineer
Microsoft
- Designed and productionized scalable ML systems on Azure for security ranking and contextual classification use cases, including alert prioritization and malware detection models.
- Owned end-to-end lifecycle across training, evaluation, deployment, and monitoring in high-throughput production environments.
- Led engineering efforts to deploy a command-line model interface and built Azure OpenAI–based agentic systems for automated malware and security incident triage.
- Integrated threat telemetry, malware signatures, and internal knowledge bases to generate structured investigation workflows and multi-step reasoning over security alerts.
- Led design and production rollout of Azure Data Factory orchestration pipelines and Azure ML batch endpoint deployments for large-scale inference workloads.
- Refactored internal ML SDK to standardize model deployment, introducing data and model guardrails for validation, schema enforcement, and safe promotion across environments.
- Drove reliability improvements in automated model execution and deployment consistency across teams.
- Built and maintained ML pipelines on Azure ML, including feature engineering, model registry, monitoring, and offline/online evaluation frameworks.
- Enabled controlled experimentation and model iteration focused on reducing false positives, improving detection recall, and decreasing analyst triage and investigation time.
- Optimized inference and training systems for low-latency, high-availability production workloads using quantization, batching, and distributed execution on Azure infrastructure.
Machine Learning Developer 3
Fortinet
- Built production ML systems processing 20+ million records daily with over 95% detection rates and below 2% false positives.
- Developed PyTorch-based malware detection models using embeddings and quantized DNNs with GradCAM.
- Developed GNN-based anomaly detection (GCN, GAT-LSTM) and knowledge graph embeddings, integrating threat intelligence for LLM-driven attack reasoning.
- Developed a cloud-free LLM serving framework using Ray, vLLM, and PyTorch.
- Built threat investigation agents for FortiNDR with RAG over internal documentation and code generation for proprietary languages.
- Led work on model fine-tuning (QLoRA), quantization, and evaluation using Ragas and RLHF.
- Built distributed training and inference pipelines on AWS SageMaker, supporting 20 production models (tree-based to deep neural networks).
- Used Snowflake Spark RDDs, MLflow, Hydra, Optuna, and Redis to automate training, tuning, and evaluation workflows.
- Led model lifecycle standardization using ONNX for XGBoost, LightGBM, and NNs.
- Improved production inference latency by 20% via TensorRT optimization and deployment best practices.
Software Developer, Machine Learning
RBC Borealis
- Developed, deployed, and monitored decision tree and NN models for credit risk assessment on GCP.
- Leveraged Neural Topic Models as feature generators to improve predictive modeling performance.
- Built PySpark pipelines with Apache Arrow optimization, achieving over 20% faster processing.
- Developed data validation frameworks using Great Expectations.
- Built and maintained Airflow, Prefect, BigQuery, and Vertex AI pipelines supporting production ML training and inference workflows.
NLP/ASR Developer
Cerence
- Deployed proprietary NER models alongside speech recognition systems.
- Conducted benchmarking of NLP/ASR models using NeMo and Hugging Face.
- Built end-to-end experimentation pipelines and deployed training/inference workloads on Azure ML.
- Contributed to microservice migration using Python and Docker.
- Developed configuration-driven data processing frameworks with Kafka, Airflow, MongoDB, and GitHub Actions CI/CD.
NLP Researcher
Microsoft
- Implemented and benchmarked Neural Topic Models, building an end-to-end research pipeline from data ETL to model evaluation; adopted in production with a 20% reduction in analytic cycle time.
- Evaluated encoder-decoder retrieval architectures and developed training recipes with warm-up and adaptive learning rate scheduling, improving training efficiency by 5%.
- Migrated over 5 models and pipelines into new compute and infrastructure on Azure.
Research Assistant | Web Developer
McGill University
- Developed end-to-end MERN applications supporting interdisciplinary academic research projects.
- Translated a biostatistics research platform from R to Python and built Django prototypes for research demonstrations.
- Extended research on multi-armed bandit algorithms for clinical trial optimization.
Computer Vision Researcher Intern
National Research Council Canada
- Built and deployed few-shot medical image classification pipelines on AWS SageMaker using triplet networks.
- Evaluated transfer learning, layer freezing, and quantization techniques across deep learning architectures.
- Authored technical reports supporting future publication and technology transfer efforts.
Research Assistant, NLP
HEC Montreal
- Built transformer-based NLP models leveraging topic modeling features for forecasting and recommendation tasks.
- Developed reusable ETL, training, and evaluation pipelines to accelerate NLP experimentation.
- Built Django/React applications and presented research outcomes to academic and industry partners, including IVADO.
Full-stack Developer Intern
Pratt & Whitney Canada
- Developed enterprise PLM applications using Vue, Java, MySQL, Terraform, and Jenkins CI/CD.
- Led coordination with fellow interns in PM and customer engineering teams to scope out project requirements.
- Developed a reusable, custom UI component library for future use.
System Software Specialist Intern
CAE
- Developed aircraft simulation and validation tools in C++ and Python for flight dynamics modeling.
- Kept documentations in check and up to date, proposed new methodologies.
- Validated and tested flight physical models with simulator inputs.
Experience
Agentic LLM Incident Triaging Platform for Cybersecurity
Education
Master's Degree in Computer Science
University of Montreal, Mila – Quebec AI Institute - Montreal, QC, Canada
Bachelor's Degree in Engineering
McGill University - Montreal, QC, Canada
Skills
Libraries/APIs
XGBoost, PyTorch, TensorFlow, vLLM, PySpark, React, Scikit-learn
Tools
Open Neural Network Exchange (ONNX), Apache Airflow, Prefect, BigQuery, Terraform, Jenkins
Languages
Python, Snowflake, R, Java, C++
Frameworks
LightGBM, Ray, Spark, Hydra, Optuna, Django
Platforms
Azure, Google Cloud Platform (GCP), Vertex AI, NVIDIA NeMo, Docker, Ollama, AWS IoT
Storage
Redis, MongoDB, MySQL
Other
OpenAI, MLflow, NVIDIA TensorRT, Transformers, Hugging Face, Kafka, GitHub Actions, MERN Stack, Generative Pre-trained Transformers (GPT), Reinforcement Learning from Human Feedback (RLHF), LangChain, LLM Integration, Agentic AI, Deep Learning, Natural Language Processing (NLP), Computer Vision
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