<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Triton on Home</title><link>https://damilojohn.github.io/tags/triton/</link><description>Recent content in Triton on Home</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Copyright Damilola John &amp;copy; 2023</copyright><lastBuildDate>Fri, 16 Jan 2026 08:25:46 +0100</lastBuildDate><atom:link href="https://damilojohn.github.io/tags/triton/index.xml" rel="self" type="application/rss+xml"/><item><title>Cut Cross Entropy Deep Dive: 20x Memory reduction in LLM Pretraining through optimized triton kernels</title><link>https://damilojohn.github.io/articles/cut-cross-entropy/</link><pubDate>Fri, 16 Jan 2026 08:25:46 +0100</pubDate><guid>https://damilojohn.github.io/articles/cut-cross-entropy/</guid><description>&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>Whilst working on pretraining &lt;a href="https://huggingface.co/BeardedMonster/SabiYarn-125M">SabiYarn&lt;/a> in 2025, I came across a really interesting &lt;a href="https://arxiv.org/abs/2411.09009">paper&lt;/a> by a team at Apple called &amp;ldquo;Cut Your Losses
In Large-Vocabulary Language Models&amp;rdquo;, that had a very interesting proposition - the cross entropy loss function has had a memory problem that has quietly crept up with a trend in LLM development, Large Vocabulary sizes. The paper introduces an optimised triton kernel for computing the cross entropy, called Cut Cross Entropy. Taking the Gemma 2 (2B) model as an example, CCE reduces the memory footprint of the cross entropy loss computation during training from 24 GB to 1 MB, and the total training-time memory consumption of the classifier head from 28 GB to 1 GB.&lt;/p></description></item></channel></rss>