Skip to content

bernardo-sb/blog

 
 

Repository files navigation

title permalink layout
About
/about/
page

Bernardo de Lemos 👨🏻‍💻

Principal Machine Learning Engineer at McKinsey & Company, based in Portugal. My expertise lies in designing and implementing end-to-end Machine Learning and Generative AI systems, with a focus on real-time predictions, features, and ML lifecycle management.

Current Role & Impact 🎯

At McKinsey & Company, I lead the development of ML tools and systems that drive growth and pricing strategies in the B2B sector.

  • Led the GenAI initiative for B2B growth
  • Led architecture and development of ML tools for growth and pricing strategies
  • Enhanced code optimization through custom profiling tools
  • Created data preparation and validation tools
Professional Experience 💼

McKinsey & Company (2022-Present)

Principal Machine Learning Engineer (Promoted from Senior mid 2024) | B2B Pricing & Growth

  • Led the GenAI initiative for B2B growth:
    • Developed foundational framework for serving GenAI capabilities
    • Implemented GenAI approaches (workflows and agents) for business strategy
  • Led architecture and development of ML tools for growth and pricing strategies
  • Designed and optimized multi-stage CI/CD pipelines
    • Implemented caching strategies and parallel job execution in GitHub Actions and CircleCI
    • Created cost-effective CI/CD strategies through runner optimization and workflow refinement
    • Implemented matrix testing across multiple Python versions and dependencies
    • Automated ML model testing, validation, and deployment processes
  • Enhanced code optimization through custom profiling tools
    • Custom time-based profiler for code optimization
    • Memory profiler integration for resource optimization
    • Benchmarking framework for ML pipeline performance tracking
  • Created data preparation and validation tools:
    • Column mapping and type coercion
    • CLI and programmatic interfaces

Farfetch (2021-2022)

Machine Learning Engineer | Recommendations

  • Architected real-time product recommendation system and migration from batch to stream processing.
  • Developed ML models serving millions of users
    • Modular recommender models architecture
    • Zero downtime model upgrades
  • Collaborated with cross-functional teams on recommendation strategies

QOMPLX (2019-2021)

Quant Analyst | AI Capabilities

  • Designed No Code ML platform for model training and serving
  • Developed quantitative finance ML pipelines
  • Created ETL/ELT pipelines using Kafka, Spark, Avro, and Parquet
  • Engineered real-time APIs in Scala and Akka

Banco de Portugal (2017-2018)

Data Scientist | Microdata Research Lab

  • Developed multiple ML and data mining models for dataset cleansing, standardization and anomaly detection.
  • Created a small compiler for analyzing the Stata programming language and its outputs.
  • Implemented data obfuscation techniques to protect sensitive data.

JUMIA (2016)

Software Engineer | Business Intelligence

  • Developed a data manipulation web application in Ruby on Rails to streamline data access and editing.
  • Created SQL queries and conducted business intelligence analysis to provide valuable insights for decision-making.

Technical Expertise 🛠️

Programming Languages

  • Advanced: Python
  • Intermediate: Rust, Go
  • Basic: Scala, Prolog

Machine Learning & Data Science

  • Frameworks: PyTorch, TensorFlow, Keras, scikit-learn, LangChain, llama-index
  • MLOps: MLflow, Transformers
  • Analysis: XGBoost, Pandas, Polars, Numpy
  • Vector Stores: PGVector, Redis

Backend Development & Asynchronous Programming

  • APIs: FastAPI and asyncio (Python), Actix-web and tokio (Rust)

Infrastructure & Tools

  • Cloud: Databricks, AWS
  • CI/CD: Docker, CircleCI, GitHub Actions
  • Data Processing: Kafka, Spark, Airflow
  • Databases: MongoDB, PostgreSQL, Redis

Specialized Knowledge 🧠

Machine Learning Systems

  • Real-time prediction serving and feature engineering
  • MLOps and model lifecycle management
  • Inference optimization
  • Performance profiling and optimization
  • Data validation and pipeline automation

GenAI Applications

  • Agent and Workflow development
  • Prompt engineering and optimization
  • RAG systems development
  • B2B applications of generative AI

Backend Development

  • API design and implementation with FastAPI (Python) and Actix-web (Rust)
  • Scalable, and performant systems for ML serving and data processing

Data Engineering

  • Real-time streaming architectures
  • Batch and streaming data processing
  • Data validation and quality assurance
  • ETL/ELT pipeline design and implementation

Languages 🗣️

  • Native: Portuguese
  • Fluent: English
  • Conversational: Spanish

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.1%
  • CSS 1.9%
  • Other 1.0%