Oussama Zekri

@ozekri.bsky.social

discrete diffusion, generative modeling 1 post a day on foundational ML papers Website : https://oussamazekri.fr Blog : https://logb-research.github.io/

Some (really) big AI models work like a team of experts. For each piece of text, a router picks one expert to handle it. Only that path runs (so less compute needed!). That is Switch-style Mixture of Experts: more capacity without using the whole model every time.

CLIP in one picture: put images and captions in the same batch, encode both, make the matching pairs win the similarity matrix. The diagonal is supervision. Everything off the diagonal becomes a negative example!

Model Soups are one of those results that feel like they should not work, but somehow often do 🤷 Start from one base model, fine-tune it several times, then simply average the matching weights. Surprisingly, the soup model can outperform individual ones, while still being just 1 model at inference

Self-attention was popularized in language, then spread almost everywhere in machine learning: vision, audio, biology, robotics… The core idea is simple: each token asks which other tokens matter right now. It scores them, turns the scores into soft weights, and mixes information accordingly.

Fine-tuning a whole LLM is often wasteful when the pretrained weights already know most of the work. LoRA freezes the big weight matrix and learns a small low-rank update around it. Same forward pass shape, but the task-specific part becomes tiny.

Position in transformers is not always added as a learned embedding. RoPE injects position by rotating query and key vectors according to each token’s place in the sequence. This makes attention scores depend on relative distance, one reason RoPE became standard in modern LLMs.

Modern generative models often optimize through random variables (VAEs, diffusion models...). The reparameterization trick rewrites sampling as parameters plus external noise passed through a deterministic function. Same stochastic computation, but now gradients have a path through it!

That guidance scale slider in diffusion models is not magic prompt strength! Classifier-free guidance compares an unconditional denoising direction with a prompt-conditioned one, then amplifies the difference. More prompt control, until the image gets brittle.

LLMs do not sample from every possible next token. Nucleus sampling (top-p) keeps the smallest high-probability set whose mass passes p, then samples inside it. Less greedy than argmax, less chaotic than sampling from the full distribution.

🚀 Policy gradient methods like DeepSeek’s GRPO are great for finetuning LLMs via RLHF. But what happens when we swap autoregressive generation for discrete diffusion, a rising architecture promising faster & more controllable LLMs? Introducing SEPO ! 📑 arxiv.org/pdf/2502.01384 🧵👇

Bild

For the French-speaking audience, S. Mallat's courses at the College de France on Data generation in AI by transport and denoising have just started. I highly recommend them, as I've learned a lot from the overall vision of his courses. Recordings are also available: www.youtube.com/watch?v=5zFh...

Génération de données en IA par transport et débruitage (1) - Stéphane Mallat (2024-2025)

YouTube video by Mathématiques et informatique - Collège de France

youtube.com

The idea that one needs to know a lot of advanced math to start doing research in ML seems so wrong to me. Instead of reading books for weeks and forgetting most of them a year later, I think it's much better to try do things, see what knowledge gaps prevent you from doing them, and only then read.

🚀 Did you know you can use the in-context learning abilities of an LLM to estimate the transition probabilities of a Markov chains? The results are pretty exciting ! 😄