Portrait of Vitor Sousa

About

I'm Vitor Sousa, a Senior Data Scientist at Wellhub, previously at Farfetch. Today I build production ML systems where learning, decision-making, and evaluation matter — recommendation engines that learn from user behavior, contextual bandits that make decisions under uncertainty, reinforcement learning pipelines for LLM alignment, and evaluation frameworks that keep deployed models honest. Where I'm going is one layer down: the internals of these models, the methods that train them, and the measurement that decides whether they actually work.

Background

I studied Information Systems Engineering at the University of Minho, where I first got pulled into machine learning. What started as academic curiosity quickly turned into something deeper — the gap between understanding an algorithm on paper and making it work on real data was humbling, and closing that gap became the thing I cared about most.

At Farfetch that gap got real. I worked on recommendation systems serving over four million active customers across 190 countries — the kind of scale where every modelling choice has measurable business impact. I built size-prediction systems using sequence classification with LSTMs and attention mechanisms, work that became a published paper at FashionXRecsys (ACM RecSys 2023). I also worked on real-time personalized recommendations, learning-to-rank pipelines, and collaborative filtering systems. This wasn't fine-tuning pretrained models — it was designing deep learning architectures from the ground up, training on proprietary data, and optimizing for real business metrics. Farfetch taught me what production ML actually demands, and it remains probably the most challenging and formative experience of my career.

At Wellhub I'm a Senior Data Scientist on the GenAI & Engagement team. I build contextual bandit systems for personalized nudges, reinforcement learning pipelines for adaptive optimization, LLM-powered engagement workflows, and the ML infrastructure that supports it all — Kubeflow for training and orchestration, Kafka for real-time event processing, and evaluation frameworks that keep deployed models honest. Where Farfetch was about recommendations at scale, Wellhub deepened my understanding of experimentation, causal reasoning, and the feedback loops between models and user behavior.

What I write about

I write to close the gap between reading a paper and truly understanding it. Each piece starts from first principles — re-deriving the math, implementing from scratch, and pressure-testing against real problems. The topics follow my research interests: transformer internals from scratch, reinforcement learning for LLM alignment, contextual bandits, and systematic LLM evaluation.

Current focus

I recently closed the first phase of RLVR from Scratch: a decoder-only transformer built from raw tensors — attention, RoPE, an incremental KV-cache that matches the full forward pass, and greedy/temperature/top-k/top-p sampling — with shape, numerical, and gradient tests on every component (112 tests, CI on every push).

What pulls me right now is the machinery underneath research results: how you know a model actually got better. That means eval harnesses with configs, seeds, and logged baselines; the statistics of measurement — variance, confidence intervals, how many samples an honest claim needs; and small PyTorch implementations built to be tested rather than demoed. The thing I want to build next is a small verifiable system studied to failure: what it optimized, what the eval measured, and where the two disagreed.

Alongside the research focus, I continue to draw on my experience in recommender systems and classical ML — the fundamentals of feature engineering, offline evaluation, and production trade-offs that apply whether the model is a gradient-boosted tree or a 7B parameter language model.

Currently reading

Build a Large Language Model (From Scratch) (Sebastian Raschka) — the anchor behind the transformer internals build; closing it out with the sampling and decoding chapters.

AI Engineering (Chip Huyen) — the incoming anchor: evaluation methodology, AI-as-judge, and what honest measurement of foundation models actually takes.

Get in touch

I'm always open to discussing research engineering for LLMs, evals and measurement, reinforcement learning, recommendation systems, production ML, or research collaboration.