Blog
Alessio Devoto Alessio Devoto's PhD Data Science personal website
models learning pytorch short logitlens training vision visualizing attention maps diffusion language diffusion language models language models Latest posts In this short tutorial, we will use our company’s dataset to predict whether a customer will churn or not. For a better experience, open in Colab:
Aug 8, 2026 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} Build a BaristaAgent with NOOA — tools, typed outputs, and state in plain Python.
Aug 2, 2026 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} Lately, diffusion-based language models like LLaDA and MMaDA have been gaining traction. These aren’t your standard left-to-right text generators - they’re bidirectional models trained to fill in missing tokens, more akin to BERT but on steroids. During training, Diffusion Language Models (DLMs) learn to predict <mask> tokens given context, effectively learning a denoising task.
Jun 3, 2025 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} Disclaimer: unlike other posts in this blog that actually served some purpose, this is just a random idea I had and am implementing for fun. So if your question is “why should I want to visualize the vocabulary of an LLM?”, I don’t have an answer 😄
Apr 24, 2025 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]}
In this short tutorial, we’ll implement LogitLens to inspect the inner representations of a pre-trained Phi-1.5. LogitLens is a straightforward yet effective interpretability method.
Oct 27, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} I decided to do this for two reasons. The first reason is that, for years, I had to bear my Ph.D. advisor coming into the lab while I was happily coding my Pytorch model, slowly sneaking at my back, stare at my screen and say - with a disappointed look - “you should definitely do this in JAX”. The second reason is this nice blog post from Neel Gupta.
Oct 17, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} Goal: Visualizing the attention maps for the CLS token in a pretrained Vision Transformer from the timm library.
Sep 30, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} As neural networks grow larger (see LLMs, though now it looks like we also have a trend towards smaller models with Gemma2-2b ) and datasets become more massive, parallelism techniques are crucial for efficient training. This is a short, far-from-exahustive list of different types of parallelism that can be found out there in the wild.
Aug 16, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} In the world of machine learning, efficiency is a buzzword we hear all the time. New methods or models often come with the claim of being more efficient than their predecessors. But what does “more efficient” actually mean? Comparing efficiency objectively can be tricky since the metrics used to measure it are often confusing and varied. Some are hardware-dependent, while others are not. Some…
Jun 30, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]} It is becoming more and more common to use FLOPs (floating point operations) to measure the computational cost of deep learning models. For Pytorch users, unfortunately, it looks like there is no agreed upon method or library to do that.
May 31, 2024 · {"name"=>nil, "avatar"=>"/assets/images/alessio_pp_standard.jpg", "bio"=>"Building AI agents @ NVIDIA <br> PhD in Data Science <br> <br> <a href='https://classicalanthology.theclassicslibrary.com/2012/05/30/odyssey-1-1-6/'> 📖 <u> Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον </u> <a>", "location"=>"Zurich, Switzerland", "email"=>nil, "links"=>[{"label"=>"X", "icon"=>"fab fa-fw fa-square-x-twitter", "url"=>"https://x.com/devoto_alessio"}, {"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square", "url"=>"mailto:devoto.alessio@gmail.com"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github", "url"=>"https://github.com/alessiodevoto"}, {"label"=>"LinkedIn", "icon"=>"fab fa-fw fa-linkedin", "url"=>"https://www.linkedin.com/in/alessio-devoto/"}, {"label"=>"Semantic Scholar", "icon"=>"fa-solid fa-magnifying-glass", "url"=>"https://www.semanticscholar.org/author/Alessio-Devoto/2172309361"}, {"label"=>"Google Scholar", "icon"=>"fa-brands fa-google-scholar", "url"=>"https://scholar.google.com/citations?user=er31rp0AAAAJ&hl"}, {"label"=>"Bluesky", "icon"=>"fa-brands fa-bluesky", "url"=>"https://bsky.app/profile/alessiodevoto.bsky.social"}]}
← Prev ✦ Random Next → Visit ↗ Feed Kagi ↗