<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on nathan.rs</title><link>https://nathan.rs/posts/</link><description>Recent content in Posts on nathan.rs</description><generator>Hugo</generator><language>en</language><copyright>© 2025 Nathan Barry</copyright><lastBuildDate>Fri, 15 May 2026 19:50:38 +0800</lastBuildDate><atom:link href="https://nathan.rs/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Diffuji: an AI instant camera that prints on receipt paper</title><link>https://nathan.rs/posts/diffuji/</link><pubDate>Sun, 15 Feb 2026 15:16:42 -0800</pubDate><guid>https://nathan.rs/posts/diffuji/</guid><description>&lt;p&gt;Diffuji is an instant camera built at TreeHacks 2026. Our project won both the Neo Prize and Most Creative Prize!&lt;/p&gt;</description></item><item><title>Language Modeling Without Neural Networks</title><link>https://nathan.rs/posts/unbounded-n-gram/</link><pubDate>Sat, 17 Jan 2026 18:47:03 -0600</pubDate><guid>https://nathan.rs/posts/unbounded-n-gram/</guid><description>&lt;p&gt;Generating Shakespeare has become the &lt;a href="https://en.wikipedia.org/wiki/%22Hello,_World!%22_program"&gt;&amp;ldquo;Hello World&amp;rdquo;&lt;/a&gt; of language models.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;
Recently, I&amp;rsquo;ve been messing with &lt;a href="https://github.com/nathan-barry/tiny-diffusion"&gt;alternative language models&lt;/a&gt; and came across &lt;strong&gt;unbounded n-gram&lt;/strong&gt; models. These models are purely statistical and don&amp;rsquo;t require optimizing weights or training.&lt;/p&gt;
&lt;p&gt;A year ago, I read the paper &lt;a href="https://arxiv.org/abs/2401.17377"&gt;Infini-gram&lt;/a&gt;, which scaled an unbounded n-gram model to trillions of tokens. While their model had applications helping guide neural LLMs during generation, standalone language generation was not explored.&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;ll explain how unbounded n-gram models work and how I improved their language generation capabilities.&lt;/p&gt;</description></item><item><title>Diffusion LLMs are Faster at Writing Code</title><link>https://nathan.rs/posts/dllm-faster-code-generation/</link><pubDate>Sat, 13 Dec 2025 08:13:54 -0600</pubDate><guid>https://nathan.rs/posts/dllm-faster-code-generation/</guid><description>&lt;p&gt;In this post, I run small experiments showing that diffusion language models generate code (and other structured text) at a faster rate. Increased stucture tends to correlate with reduced entropy, which leads to higher confident token predictions, which directly means more tokens decoded in parallel per step.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;h2 id="speculative-decoding-and-diffusion-language-models"&gt;Speculative Decoding and Diffusion Language Models&lt;a class="anchor" href="#speculative-decoding-and-diffusion-language-models"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In speculative decoding (for autoregressive models), we speed up generation by using a smaller model to generate multiple tokens, which are then verified in parallel by a larger model.
The core idea is that most tokens are easily predictable; thus, we should be able to use a smaller and faster model for them.
The classic example is the following sentence:&lt;/p&gt;</description></item><item><title>Curserve: Minimizing Agentic Coding End-to-End Latency</title><link>https://nathan.rs/posts/curserve/</link><pubDate>Sun, 09 Nov 2025 10:17:51 -0600</pubDate><guid>https://nathan.rs/posts/curserve/</guid><description>&lt;p&gt;For &lt;a href="https://calhacks.io"&gt;Cal Hacks 2025&lt;/a&gt;, a few friends and I built &lt;a href="https://devpost.com/software/curserve"&gt;Curserve&lt;/a&gt;, a fast and scalable server-side engine for agentic coding, which ended up placing for one of the sponsor prizes. We didn&amp;rsquo;t go to Cal Hacks to try and win, but instead to have a good excuse to work on a potential research idea.&lt;/p&gt;
&lt;p&gt;This post documents our original hackathon project, our exploration into actual research, and our investigations about the potential real-world benefits of such a system.&lt;/p&gt;</description></item><item><title>BERT is just a Single Text Diffusion Step</title><link>https://nathan.rs/posts/roberta-diffusion/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0000</pubDate><guid>https://nathan.rs/posts/roberta-diffusion/</guid><description>&lt;p&gt;A while back, Google DeepMind unveiled &lt;a href="https://deepmind.google/models/gemini-diffusion/"&gt;Gemini Diffusion&lt;/a&gt;, an experimental language model that generates text using diffusion. Unlike traditional GPT-style models that generate one word at a time, Gemini Diffusion creates whole blocks of text by refining random noise step-by-step.&lt;/p&gt;
&lt;p&gt;I read the paper &lt;a href="https://arxiv.org/abs/2502.09992"&gt;Large Language Diffusion Models&lt;/a&gt; and was surprised to find that discrete language diffusion is just a generalization of masked language modeling (MLM), something we’ve been doing since &lt;a href="https://arxiv.org/abs/1810.04805"&gt;2018&lt;/a&gt;.
The first thought I had was, &amp;ldquo;can we finetune a BERT-like model to do text generation?&amp;rdquo;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; I decided to try a quick proof of concept out of curiosity.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</description></item><item><title>Local SGD and DiLoCo Research Musings</title><link>https://nathan.rs/posts/research-log/</link><pubDate>Tue, 14 Oct 2025 10:54:27 -0500</pubDate><guid>https://nathan.rs/posts/research-log/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Here are some notes I wrote over this topic. I&amp;rsquo;ve switched my master&amp;rsquo;s thesis to a different topic, but there were many interesting research directions I found in this area.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="local-sgd-and-diloco-overview"&gt;Local SGD and DiLoCo Overview&lt;a class="anchor" href="#local-sgd-and-diloco-overview"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It is October 15th, 2025. For my last year of my master&amp;rsquo;s, I decided to a thesis around distributed low-communication training. Essentially, how can we train large models efficiently across distributed nodes and not be utterly destroyed by network latency and bandwidth?&lt;/p&gt;</description></item><item><title>Running GPT-2 in WebGL with Classic GPU Programming</title><link>https://nathan.rs/posts/gpu-shader-programming/</link><pubDate>Sat, 24 May 2025 12:20:47 -0700</pubDate><guid>https://nathan.rs/posts/gpu-shader-programming/</guid><description>&lt;p&gt;A few weeks back, I implemented GPT-2 using WebGL and shaders (&lt;a href="https://github.com/nathan-barry/gpt2-webgl/tree/main"&gt;Github Repo&lt;/a&gt;) which made the front page of &lt;a href="https://news.ycombinator.com/item?id=43870998"&gt;Hacker News&lt;/a&gt;. Here is a short write-up over what I learned about old-school general-purpose GPU programming over the course of this project!&lt;/p&gt;
&lt;img alt="GPT2 WebGL demo" style="max-width: 100%" src="https://nathan.rs/images/gpt2-webgl-demo.gif"&gt;
&lt;p&gt;&lt;em&gt;Above is a gif of the final demo, which you can run locally via the github repo above.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;em&gt;This article appeared on Hacker News. Link to the &lt;a href="https://news.ycombinator.com/item?id=44109257"&gt;discussion here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Mathematical Statistics</title><link>https://nathan.rs/posts/statistics/</link><pubDate>Wed, 21 Feb 2024 14:07:21 -0600</pubDate><guid>https://nathan.rs/posts/statistics/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;My notes over Mark Maxwell&amp;rsquo;s course, Introduction to Mathematical Statistics, and his textbook, Probability &amp;amp; Statistics with Applications, Second Edition.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="sampling-distributions-and-estimation"&gt;Sampling Distributions and Estimation&lt;a class="anchor" href="#sampling-distributions-and-estimation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Normally in a probability experiment, we don&amp;rsquo;t know the true values of a model&amp;rsquo;s parameters, and therefore, we must estimate them using random observations. Because the observations are random, our estimates are subject to the vagaries of chance. We find ourselves in a paradoxical situation in which the parameters are fixed, but unknown, while the estimates are random, but observable.&lt;/p&gt;</description></item><item><title>Common Probability Distributions</title><link>https://nathan.rs/posts/probability-distributions/</link><pubDate>Thu, 08 Feb 2024 12:29:32 -0600</pubDate><guid>https://nathan.rs/posts/probability-distributions/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;An overview of common discrete and continuous distributions found in probability and statistics, from Mark Maxwell&amp;rsquo;s textbook, Probability &amp;amp; Statistics with Applications, Second Edition.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="common-discrete-distributions"&gt;Common Discrete Distributions&lt;a class="anchor" href="#common-discrete-distributions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;h3 id="discrete-uniform"&gt;Discrete Uniform&lt;a class="anchor" href="#discrete-uniform"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A random variable $X$ is said to have a &lt;strong&gt;discrete uniform distribution&lt;/strong&gt; if its probability function is:&lt;/p&gt;
&lt;p&gt;$$Pr(X=x)=\frac{1}{n}$$&lt;/p&gt;
&lt;p&gt;for $x=1,2,\dots,n$.&lt;/p&gt;
&lt;h4 id="main-properties"&gt;Main Properties&lt;a class="anchor" href="#main-properties"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Expected Value:
$$E[X ]=\frac{n+1}{2}$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Variance:
$$Var[X ]= \frac{n^2-1}{12}$$&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="additional-properties"&gt;Additional Properties&lt;a class="anchor" href="#additional-properties"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Median: Same as Expected Value&lt;/li&gt;
&lt;li&gt;Mode: None&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="bernoulli"&gt;Bernoulli&lt;a class="anchor" href="#bernoulli"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A Bernoulli trial is an experiment that has two outcomes (true-false; girl-boy, success-fail, in-out, etc).&lt;/p&gt;</description></item><item><title>How to Fix Hugo's iOS Code-Block Text-Size Rendering Issue</title><link>https://nathan.rs/posts/fixing-ios-codeblocks/</link><pubDate>Sun, 04 Feb 2024 17:23:27 -0600</pubDate><guid>https://nathan.rs/posts/fixing-ios-codeblocks/</guid><description>&lt;p&gt;Lately, I&amp;rsquo;ve been coming across many blogs that have weird font-size rendering issues for code blocks on iOS. Basically, in a code snippet, the text-size would sometimes be much larger for some lines than others.&lt;/p&gt;
&lt;p&gt;Below is a screenshot of the issue from a website where I&amp;rsquo;ve seen this occur. I found this example from Hacker News while I was on phone.&lt;/p&gt;
&lt;img style="max-width: 256px; width: 100%;" alt="code block issue" src="https://nathan.rs/images/ios-render-issue.webp"&gt;
&lt;p&gt;As you can see, the text-size isn&amp;rsquo;t uniform across code block lines. I&amp;rsquo;ve seen this issue across many blogs that compile markdown files to HTML such as sites built using Hugo, Jekyll, or even &lt;a href="https://github.com/git-bruh/site"&gt;custom md-to-html shell scripts&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Intro to Autograd Engines: Karpathy's Micrograd in Go</title><link>https://nathan.rs/posts/go-micrograd/</link><pubDate>Sat, 11 Nov 2023 08:57:53 -0600</pubDate><guid>https://nathan.rs/posts/go-micrograd/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;p&gt;For a while, I wanted to build a complete autograd engine. What is an autograd engine, you might ask? To find the answer, we first must know what a neural network is.&lt;/p&gt;
&lt;h2 id="neural-network-crash-course"&gt;Neural Network Crash Course&lt;a class="anchor" href="#neural-network-crash-course"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A neural network can just be seen as a black-box function. We pass in an input into this black box and receive an output. Normally, in a function, we define the rules on how to manipulate the input to get an output. For example, if we want a function that doubles the input, i.e $f(x) = 2x$, then all we would write is:&lt;/p&gt;</description></item><item><title>Where Rust Shines: Algebraic Types and Match Statements</title><link>https://nathan.rs/posts/where-rust-shines/</link><pubDate>Sat, 11 Nov 2023 08:51:57 -0600</pubDate><guid>https://nathan.rs/posts/where-rust-shines/</guid><description>&lt;h2 id="lexical-analysis-and-asts"&gt;Lexical Analysis and ASTs&lt;a class="anchor" href="#lexical-analysis-and-asts"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Recently I was going through Thorsten Ball&amp;rsquo;s &amp;ldquo;Writing An Interpreter in Go&amp;rdquo;. In this book, you create a basic interpreted language and write a lexer, parser, evaluator, and REPL for it.&lt;/p&gt;
&lt;p&gt;A Lexer takes in source code and turns it into an intermediate representation, usually in the form of a string of tokens. This is called Lexical Analysis. A parser usually takes this stream of tokens and turns it into an Abstract Syntax Tree which is then evaluated and run.&lt;/p&gt;</description></item><item><title>Favorite Books</title><link>https://nathan.rs/posts/favorite-books/</link><pubDate>Sat, 14 Oct 2023 10:45:41 -0500</pubDate><guid>https://nathan.rs/posts/favorite-books/</guid><description>&lt;script&gt;
document.addEventListener("DOMContentLoaded", function() {
 const books = document.querySelectorAll('.book-number');
 let bookNumber = books.length;
 books.forEach((book) =&gt; {
 book.textContent = bookNumber-- + '. ';
 });
});
&lt;/script&gt;
&lt;p&gt;I found that my life has largely been shaped by the books I&amp;rsquo;ve read (especially when I was younger). I&amp;rsquo;ve aggregated them all here. Below is a list of all the books I&amp;rsquo;ve read since I was 13. The ones in &lt;em&gt;italics&lt;/em&gt; are ones that stood out to me.&lt;/p&gt;</description></item><item><title>Favorite Quotes</title><link>https://nathan.rs/posts/favorite-quotes/</link><pubDate>Sat, 14 Oct 2023 10:45:41 -0500</pubDate><guid>https://nathan.rs/posts/favorite-quotes/</guid><description>&lt;p&gt;Here&amp;rsquo;s a list of quotes I&amp;rsquo;ve collected from over the years.&lt;/p&gt;
&lt;h2 id="general"&gt;General&lt;a class="anchor" href="#general"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&amp;ldquo;I believe that a man should strive for only one thing in life, and that is to have a touch of greatness&amp;rdquo;
&lt;br&gt;— Félix Martí-Ibáñez&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&amp;ldquo;I wish to preach, not the doctrine of ignoble ease, but the doctrine of the strenuous life, the life of toil and effort, of labor and strife; to preach that highest form of success which comes, not to the man who desires mere easy peace, but to the man who does not shrink from danger, from hardship, or from bitter toil, and who out of these wins the splendid ultimate triumph.&amp;rdquo;
&lt;br&gt;— Theodore Roosevelt&lt;/p&gt;</description></item><item><title>Gradient Descent &amp; Optimizers</title><link>https://nathan.rs/posts/gd/</link><pubDate>Tue, 10 Oct 2023 10:24:32 -0500</pubDate><guid>https://nathan.rs/posts/gd/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Theses are some of my over Qiang Liu&amp;rsquo;s course, Machine Learning II.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="gradient-descent"&gt;Gradient Descent&lt;a class="anchor" href="#gradient-descent"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Gradient Descent is a fundamental, first-order iterative optimization algorithm designed for minimizing a function. The primary objective of Gradient Descent is to find the minimum value of a function by iteratively moving towards the minimum of the gradient.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update Rule:&lt;/strong&gt; The parameters $ \theta $ are updated as follows in each iteration:&lt;/p&gt;</description></item><item><title>Language Modeling: Word Embedings &amp; Architectures</title><link>https://nathan.rs/posts/language-modeling/</link><pubDate>Sat, 07 Oct 2023 15:54:05 -0500</pubDate><guid>https://nathan.rs/posts/language-modeling/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;These are a few of my notes from Eunsol Choi&amp;rsquo;s NLP class at UT Austin.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="word-embeddings"&gt;Word Embeddings&lt;a class="anchor" href="#word-embeddings"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Word embeddings are a type of word representation that captures the semantic meaning of words in a continuous vector space. Unlike one-hot encoding, where each word is represented as a binary vector of all zeros except for a single &amp;lsquo;1&amp;rsquo;, word embeddings capture much richer information, including semantic relationships, word context, and even aspects of syntax.&lt;/p&gt;</description></item><item><title>Neural Networks: RNNs, Seq2Seq, &amp; CNNs</title><link>https://nathan.rs/posts/neural-networks/</link><pubDate>Sat, 07 Oct 2023 14:55:20 -0500</pubDate><guid>https://nathan.rs/posts/neural-networks/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;These are a few of my notes from Eunsol Choi&amp;rsquo;s NLP class at UT Austin.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="recurrent-neural-networks-rnns"&gt;Recurrent Neural Networks (RNNs)&lt;a class="anchor" href="#recurrent-neural-networks-rnns"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Recurrent Neural Networks (RNNs) are a class of artificial neural networks specifically designed to tackle sequence-based problems. Unlike traditional feedforward neural networks, RNNs possess a memory in the form of a hidden state, enabling them to remember and leverage past information when making decisions. This makes them particularly effective for tasks like language modeling, time-series forecasting, and sentiment analysis.&lt;/p&gt;</description></item><item><title>Classifiers: Generative &amp; Discriminative Models</title><link>https://nathan.rs/posts/classification/</link><pubDate>Sat, 07 Oct 2023 14:36:35 -0500</pubDate><guid>https://nathan.rs/posts/classification/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;These are a few of my notes from Eunsol Choi&amp;rsquo;s NLP class at UT Austin.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="generative-models-vs-discriminative-models"&gt;Generative Models vs. Discriminative Models&lt;a class="anchor" href="#generative-models-vs-discriminative-models"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When it comes to classification, models are broadly categorized into Generative Models and Discriminative Models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generative Models:&lt;/strong&gt;
In generative models, we aim to model the joint distribution of the data $ p(x, y) $. These models often assume a particular functional form for both $ P(x|y) $ and $ P(y) $. To classify a new data point, we maximize:&lt;/p&gt;</description></item><item><title>Probability</title><link>https://nathan.rs/posts/probability/</link><pubDate>Sat, 02 Sep 2023 11:14:53 -0500</pubDate><guid>https://nathan.rs/posts/probability/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;My notes over Mark Maxwell&amp;rsquo;s course, Probability I, and his textbook, Probability &amp;amp; Statistics with Applications, Second Edition.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="combinatorial-probability"&gt;Combinatorial Probability&lt;a class="anchor" href="#combinatorial-probability"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The fundamental theorem of counting is also known as the &lt;em&gt;multiplication principle&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Given that there are $N(A)$ outcomes, and for each of these outcomes, there are $N(B)$ outcomes, then the total number of outcomes for the two combined is equal to $N(A)\cdot N(B)$.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; If I have 3 shirts and 2 pairs of shorts, the total number of outfits I have are:&lt;/p&gt;</description></item><item><title>Linear Algebra</title><link>https://nathan.rs/posts/linear-algebra/</link><pubDate>Wed, 30 Aug 2023 11:10:18 -0500</pubDate><guid>https://nathan.rs/posts/linear-algebra/</guid><description>&lt;link rel="stylesheet" href="https://nathan.rs/katex/katex.min.css" /&gt;&lt;script defer src="https://nathan.rs/katex/katex.min.js"&gt;&lt;/script&gt;&lt;script defer src="https://nathan.rs/katex/auto-render.min.js" onload="renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;\\(&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\)&amp;#34;,&amp;#34;display&amp;#34;:false}]});"&gt;&lt;/script&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;These are my notes over my review of Linear Algebra, going through Gilbert Strang&amp;rsquo;s Introduction To Linear Algebra.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="introduction-to-vectors"&gt;Introduction to Vectors&lt;a class="anchor" href="#introduction-to-vectors"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The core of linear algebra is vector addition and scalar multiplication. Combining these two operations gives us a set of linear combinations.&lt;/p&gt;
&lt;p&gt;$$
c\mathbf{v} + d\mathbf{w} =
c\begin{bmatrix}
1 \\
2
\end{bmatrix} +
d\begin{bmatrix}
3 \\
4
\end{bmatrix} =
\begin{bmatrix}
c + 3d \\
2c + 4d
\end{bmatrix}.
$$&lt;/p&gt;</description></item><item><title>Rust Front-End Development with Dioxus</title><link>https://nathan.rs/posts/dioxus-rust/</link><pubDate>Wed, 16 Aug 2023 00:00:00 +0000</pubDate><guid>https://nathan.rs/posts/dioxus-rust/</guid><description>&lt;h2 id="why-rust-for-front-end-development"&gt;Why Rust for Front-End Development&lt;a class="anchor" href="#why-rust-for-front-end-development"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I’ve been using React and Next.js for front-end development ever since high school, it was one of the first few things I learned when it came to programming. Recently, I’ve had the itch to learn something new, specifically Rust front-end. As someone with a &amp;ldquo;.rs&amp;rdquo; domain, it felt like an inevitable fate. Finally, I can say I put the &amp;ldquo;.rs&amp;rdquo; in the &amp;ldquo;nathan.rs&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The front-end Rust ecosystem has come a long way in the last few years. We are at a point where we now have Rust frameworks that are actually somewhat usable (huge asterisk). While frameworks like Svelte, Astro, and Solid are making people rethink their approach to front-end development, Rust frameworks like Leptos and Dioxus are also maturing.&lt;/p&gt;</description></item><item><title>Basic Calculus</title><link>https://nathan.rs/posts/calculus/</link><pubDate>Fri, 06 Jan 2023 11:19:22 -0600</pubDate><guid>https://nathan.rs/posts/calculus/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;A small review over Calculus 1, 2, and 3, based on the textbook, Calculus: Early Transcendentals (Eight Edition).&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="differentiation-rules"&gt;Differentiation Rules&lt;a class="anchor" href="#differentiation-rules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="product-rule"&gt;Product Rule&lt;a class="anchor" href="#product-rule"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If $f$ and $g$ are both differentiable, then&lt;/p&gt;
&lt;p&gt;$$\frac{d}{dx}[f(x)g(x)]=f(x)g^\prime(x)+g(x)f^\prime(x)$$&lt;/p&gt;
&lt;h3 id="quotient-rule"&gt;Quotient Rule&lt;a class="anchor" href="#quotient-rule"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If $f$ and $g$ are differentiable, then&lt;/p&gt;
&lt;p&gt;$$\frac{d}{dx}\bigg[\frac{f(x)}{g(x)}\bigg]=\frac{g(x)f^\prime(x)-f(x)g^\prime(x)}{[g(x)]^2}$$&lt;/p&gt;
&lt;h2 id="integration"&gt;Integration&lt;a class="anchor" href="#integration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="the-substitution-rule"&gt;The Substitution Rule&lt;a class="anchor" href="#the-substitution-rule"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If an integral has both an $x$ value and the derivative of that $x$ value, you can use u-substitution.
$$\int x x^\prime dx = \int u du$$&lt;/p&gt;</description></item><item><title>This Mountain We Climb</title><link>https://nathan.rs/posts/this-mountain-we-climb/</link><pubDate>Wed, 03 Mar 2021 00:00:00 +0000</pubDate><guid>https://nathan.rs/posts/this-mountain-we-climb/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;A poem that I wrote my senior year of high school in AP Literature.&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="white-space: pre-line"&gt;
Here we all are, this mountain we climb,
the sure ascent, that lasts a lifetime,
at the golden summit, a goal we all seek
the meaning of life, at its Godly peak.
&lt;/p&gt;
&lt;p style="white-space: pre-line"&gt;
Up we should go, a noble direction.
Yet why do so many, rebel in rejection
Up is worthwhile, this mountain we climb,
at the apex is all that’s sublime.
&lt;/p&gt;</description></item></channel></rss>