<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Technical on Matt Suiche</title><link>https://www.msuiche.com/categories/technical/</link><description>Recent content in Technical on Matt Suiche</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 15 Oct 2025 02:00:00 +0000</lastBuildDate><atom:link href="https://www.msuiche.com/categories/technical/index.xml" rel="self" type="application/rss+xml"/><item><title>AMD GPU Support in Triton Gluon Framework</title><link>https://www.msuiche.com/posts/amd-gpu-support-in-triton-gluon-framework/</link><pubDate>Wed, 15 Oct 2025 02:00:00 +0000</pubDate><guid>https://www.msuiche.com/posts/amd-gpu-support-in-triton-gluon-framework/</guid><description>&lt;h2 id="introduction"&gt;Introduction &lt;a href="#introduction" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This document analyzes AMD GPU support implementation in Triton&amp;rsquo;s Gluon framework, examining architecture-specific optimizations, performance characteristics, and implementation details relative to NVIDIA GPU support.&lt;/p&gt;
&lt;p&gt;For background on Gluon and its motivation as a lower-level alternative to Triton, see my previous post: &lt;a href="https://www.msuiche.com/posts/gluon-when-triton-isnt-low-level-enough/" target="_blank" rel="noopener"&gt;&amp;ldquo;Gluon: When Triton Isn&amp;rsquo;t Low-Level Enough&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="background-gpu-programming-architecture-landscape"&gt;Background: GPU Programming Architecture Landscape &lt;a href="#background-gpu-programming-architecture-landscape" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The GPU programming ecosystem has evolved with distinct architectural approaches between NVIDIA and AMD, creating implementation challenges for cross-platform frameworks.&lt;/p&gt;</description></item><item><title>RustBPE: High-Performance BPE Tokenizer Training in Rust</title><link>https://www.msuiche.com/posts/rustbpe-high-performance-bpe-tokenizer-training-in-rust/</link><pubDate>Wed, 15 Oct 2025 00:00:00 +0000</pubDate><guid>https://www.msuiche.com/posts/rustbpe-high-performance-bpe-tokenizer-training-in-rust/</guid><description>&lt;h2 id="introduction"&gt;Introduction &lt;a href="#introduction" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Byte Pair Encoding (BPE) tokenization is used in modern language models, but efficient training implementations are limited. OpenAI&amp;rsquo;s &lt;code&gt;tiktoken&lt;/code&gt; handles inference well, while HuggingFace&amp;rsquo;s &lt;code&gt;tokenizers&lt;/code&gt; supports training but has complexity and overhead. &lt;strong&gt;RustBPE&lt;/strong&gt; is a Rust implementation that provides training capabilities with better performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RustBPE was developed by Andrej Karpathy&lt;/strong&gt; as part of the &lt;a href="https://github.com/karpathy/nanochat/tree/master/rustbpe" target="_blank" rel="noopener"&gt;nanochat project&lt;/a&gt;. This analysis covers the RustBPE implementation, including its architecture, performance characteristics, and Python integration.&lt;/p&gt;
&lt;p&gt;For those interested in understanding BPE implementation from first principles, &lt;a href="https://sebastianraschka.com/blog/2025/bpe-from-scratch.html" target="_blank" rel="noopener"&gt;Sebastian Raschka provides an excellent deep-dive into implementing BPE from scratch&lt;/a&gt; in his blogpost, and this is also covered in his book &amp;ldquo;Build a Large Language Model (From Scratch)&amp;rdquo;. His work offers invaluable insights into the algorithmic foundations that underpin implementations like RustBPE.&lt;/p&gt;</description></item><item><title>Optimizing AlphaFold's Triangle Multiplicative Update: A First Look at GPU Performance Engineering</title><link>https://www.msuiche.com/posts/optimizing-alphafolds-triangle-multiplicative-update-a-first-look-at-gpu-performance-engineering/</link><pubDate>Tue, 30 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.msuiche.com/posts/optimizing-alphafolds-triangle-multiplicative-update-a-first-look-at-gpu-performance-engineering/</guid><description>&lt;h2 id="background"&gt;Background &lt;a href="#background" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;I recently encountered the &lt;a href="https://www.gpumode.com/v2/leaderboard/496?tab=submission" target="_blank" rel="noopener"&gt;GPU MODE TriMul challenge&lt;/a&gt; while exploring GPU optimization. Coming from a systems engineering background without prior PyTorch or Triton experience, this challenge provided an opportunity to learn GPU performance engineering through a practical problem.&lt;/p&gt;
&lt;p&gt;The Triangle Multiplicative Update (TriMul) is a core operation in AlphaFold2 and AlphaFold3—the protein structure prediction systems that earned the 2024 Nobel Prize in Chemistry. The operation&amp;rsquo;s O(n³) complexity creates severe performance bottlenecks in production, forcing AlphaFold3 to use batch size 1 during training despite having under 1B parameters. This makes the optimization problem both practically relevant and technically challenging.&lt;/p&gt;</description></item><item><title>Gluon: When Triton Isn't Low-Level Enough</title><link>https://www.msuiche.com/posts/gluon-when-triton-isnt-low-level-enough/</link><pubDate>Tue, 23 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.msuiche.com/posts/gluon-when-triton-isnt-low-level-enough/</guid><description>&lt;h1 id="my-journey-from-pytorch-to-gluon"&gt;My Journey from PyTorch to Gluon &lt;a href="#my-journey-from-pytorch-to-gluon" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h1&gt;&lt;p&gt;After spending the last month diving into PyTorch, learning Triton, understanding CUDA, and even peeking at PTX/SASS assembly, I&amp;rsquo;ve come to a surprising realization: I&amp;rsquo;ve yet to meet anyone who&amp;rsquo;s actually writing &lt;a href="https://siboehm.com/articles/22/CUDA-MMM" target="_blank" rel="noopener"&gt;raw CUDA code in production anymore&lt;/a&gt;. Everyone I&amp;rsquo;ve talked to – from ML engineers at startups to researchers at big tech companies – seems to have converged on Triton as their go-to solution for custom GPU kernels. And honestly? The &lt;a href="https://www.gpumode.com/v2/leaderboard/496?tab=rankings" target="_blank" rel="noopener"&gt;fused kernels performance they&amp;rsquo;re getting is impressive enough&lt;/a&gt; that I understand why.&lt;/p&gt;</description></item><item><title>The Hidden Math Bug That Makes AI Unpredictable</title><link>https://www.msuiche.com/posts/the-hidden-math-bug-that-makes-ai-unpredictable/</link><pubDate>Sun, 14 Sep 2025 00:00:00 +0200</pubDate><guid>https://www.msuiche.com/posts/the-hidden-math-bug-that-makes-ai-unpredictable/</guid><description>&lt;p&gt;This &lt;a href="https://x.com/awnihannun/status/1966953027451118012" target="_blank" rel="noopener"&gt;tweet from Awni Hannun&lt;/a&gt; demonstrates in one line of MLX code the nondeterminism phenomenon detailed in &lt;a href="https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/" target="_blank" rel="noopener"&gt;Thinking Machines&amp;rsquo; research&lt;/a&gt;. We will explore the PyTorch equivalent that reveals a fundamental issue in AI systems, because I&amp;rsquo;ve found that tweet extremely helpful to understand what the original blogpost was about.&lt;/p&gt;
&lt;blockquote class="twitter-tweet"&gt;&lt;p lang="en" dir="ltr"&gt;Here&amp;#39;s a one-line code summary in MLX of the &lt;a href="https://twitter.com/thinkymachines?ref_src=twsrc%5Etfw"&gt;@thinkymachines&lt;/a&gt; blog post on non-determinism in LLM inference.&lt;br&gt;&lt;br&gt;I&amp;#39;d guess the difference is larger the lower the precision, as you get larger affects from non-associativity of FP math.&lt;br&gt;&lt;br&gt;Interestingly, that implies that training at low… &lt;a href="https://t.co/jYcDK9GiLn"&gt;pic.twitter.com/jYcDK9GiLn&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>