Eric X. Liu's Personal Pagehttps://ericxliu.me/Recent content on Eric X. Liu's Personal PageHugoenThu, 22 Jan 2026 06:48:07 +0000Hacking a Chinese Car Stereo to fulfill my Knight Rider dreamshttps://ericxliu.me/posts/vibe-coding-from-the-jeep/Wed, 21 Jan 2026 00:00:00 +0000https://ericxliu.me/posts/vibe-coding-from-the-jeep/<p>&ldquo;Vibe coding&rdquo; has become my latest obsession. It&rsquo;s that flow state where the tools disappear, and you&rsquo;re just manipulating logic at the speed of thought. Usually, this happens in a high-end IDE like Antigravity. But lately, I&rsquo;ve been trying to answer a childhood dream.</p> <p>Growing up in China before the internet age, my window to the outside world was CCTV-6. Along with <em>Baywatch</em>, one of the first American TV shows I ever watched was <em>Knight Rider</em>. I don&rsquo;t remember the exact plot lines, but the core concept stuck with me forever: KITT. A car that could talk, think, and do things for you.</p>How I Built a Blog Agent that Writes About Itselfhttps://ericxliu.me/posts/reverse-engineering-antigravity-ide/Fri, 16 Jan 2026 00:00:00 +0000https://ericxliu.me/posts/reverse-engineering-antigravity-ide/<p>I&rsquo;ve been spending a lot of time &ldquo;vibe coding&rdquo; in the Antigravity IDE lately. It&rsquo;s an incredible flow state—intense, iterative, and fast. But it has a major flaw: the context is ephemeral. Once the session is over, that rich history of decisions, wrong turns, and &ldquo;aha!&rdquo; moments is locked away in an opaque, internal format.</p> <p>I wanted to capture that value. I wanted a system that could take my chaotic coding sessions and distill them into structured, technical blog posts (like the one you&rsquo;re reading right now).</p>Why I Downgraded Magisk to Root My Pixel 2 XLhttps://ericxliu.me/posts/rooting-pixel-2-xl-for-reverse-engineering/Wed, 07 Jan 2026 00:00:00 +0000https://ericxliu.me/posts/rooting-pixel-2-xl-for-reverse-engineering/<p>For the past few weeks, I&rsquo;ve been stuck in a stalemate with my EcoFlow Bluetooth Protocol Reverse Engineering Project. I have the hci snoop logs, I have the decompiled APK, and I have a strong suspicion about where the authentication logic is hiding. But suspicion isn&rsquo;t proof.</p> <p>Static analysis has its limits. I found the &ldquo;smoking gun&rdquo; function—a native method responsible for encrypting the login payload—but understanding <em>how</em> it constructs that payload within a strict 13-byte limit purely from assembly (ARM64) was proving to be a headache.</p>Why Your "Resilient" Homelab is Slower Than a Raspberry Pihttps://ericxliu.me/posts/debugging-authentik-performance/Fri, 02 Jan 2026 00:00:00 +0000https://ericxliu.me/posts/debugging-authentik-performance/<p>In the world of self-hosting, there are many metrics for success: 99.9% uptime, sub-second latency, or a perfect GitOps pipeline. But for those of us running &ldquo;production&rdquo; at home, there is only one metric that truly matters: <strong>The Wife Acceptance Factor (WAF)</strong>.</p> <p>My detailed Grafana dashboards said everything was fine. But my wife said the SSO login was &ldquo;slow sometimes.&rdquo; She was right. Debugging it took me down a rabbit hole of connection pooling, misplaced assumptions, and the harsh reality of running databases on distributed storage.</p>How I Got Open WebUI Talking to OpenAI Web Searchhttps://ericxliu.me/posts/open-webui-openai-websearch/Mon, 29 Dec 2025 00:00:00 +0000https://ericxliu.me/posts/open-webui-openai-websearch/<p>OpenAI promised native web search in GPT‑5, but LiteLLM proxy deployments (and by extension Open WebUI) still choke on it—issue <a href="https://github.com/BerriAI/litellm/issues/13042" class="external-link" target="_blank" rel="noopener">#13042</a> tracks the fallout. I needed grounded answers inside Open WebUI anyway, so I built a workaround: route GPT‑5 traffic through the Responses API and mask every <code>web_search_call</code> before the UI ever sees it.</p> <p>This post documents the final setup, the hotfix script that keeps LiteLLM honest, and the tests that prove Open WebUI now streams cited answers without trying to execute the tool itself.</p>From Gemini-3-Flash to T5-Gemma-2: A Journey in Distilling a Family Finance LLMhttps://ericxliu.me/posts/technical-deep-dive-llm-categorization/Sat, 27 Dec 2025 00:00:00 +0000https://ericxliu.me/posts/technical-deep-dive-llm-categorization/<p>Running a family finance system is surprisingly complex. What starts as a simple spreadsheet often evolves into a web of rules, exceptions, and &ldquo;wait, was this dinner or <em>vacation</em> dinner?&rdquo; questions.</p> <p>For years, I relied on a rule-based system to categorize our credit card transactions. It worked&hellip; mostly. But maintaining <code>if &quot;UBER&quot; in description and amount &gt; 50</code> style rules is a never-ending battle against the entropy of merchant names and changing habits.</p>Abouthttps://ericxliu.me/about/Fri, 19 Dec 2025 22:46:12 -0800https://ericxliu.me/about/<img src="https://ericxliu.me/images/about.jpeg" alt="Eric Liu" width="300" style="float: left; margin-right: 1.5rem; margin-bottom: 1rem; border-radius: 8px;"/> <p>Hi, I&rsquo;m <strong>Eric Liu</strong>.</p> <p>I am a <strong>Staff Software Engineer and Tech Lead Manager (TLM)</strong> at <strong>Google</strong>, based in Sunnyvale, CA.</p> <p>My work focuses on <strong>Infrastructure Performance and Customer Engineering</strong>, specifically for <strong>GPUs and TPUs</strong>. I lead teams that bridge the gap between cutting-edge AI hardware and the latest ML models (like Gemini), ensuring optimal performance and reliability at Google Cloud scale. I thrive in the ambiguous space where hardware constraints meet software ambition—whether it&rsquo;s debugging race conditions across thousands of chips or designing API surfaces for next-gen models.</p>The Convergence of Fast Weights, Linear Attention, and State Space Modelshttps://ericxliu.me/posts/the-convergence-of-fast-weights-linear-attention-and-state-space-models/Fri, 19 Dec 2025 00:00:00 +0000https://ericxliu.me/posts/the-convergence-of-fast-weights-linear-attention-and-state-space-models/<p>Modern Large Language Models (LLMs) are dominated by the Transformer architecture. However, as context windows grow, the computational cost of the Transformer’s attention mechanism has become a primary bottleneck. Recent discussions in the AI community—most notably by Geoffrey Hinton—have highlighted a theoretical link between biological memory mechanisms (&ldquo;Fast Weights&rdquo;) and efficient engineering solutions like Linear Transformers and State Space Models (SSMs).</p> <p>This article explores the mathematical equivalence between Hinton’s concept of Fast Weights as Associative Memory and the recurrence mechanisms found in models such as Mamba and RWKV.</p>vAttentionhttps://ericxliu.me/posts/vattention/Mon, 08 Dec 2025 00:00:00 +0000https://ericxliu.me/posts/vattention/<p>Large Language Model (LLM) inference is memory-bound, primarily due to the Key-Value (KV) cache—a store of intermediate state that grows linearly with sequence length. Efficient management of this memory is critical for throughput. While <strong>PagedAttention</strong> (popularized by vLLM) became the industry standard by solving memory fragmentation via software, recent research suggests that leveraging the GPU’s native hardware Memory Management Unit (MMU) offers a more performant and portable solution.</p> <h4 id="the-status-quo-pagedattention-and-software-tables"> The Status Quo: PagedAttention and Software Tables <a class="heading-link" href="#the-status-quo-pagedattention-and-software-tables"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h4> <p>Prior to PagedAttention, systems allocated contiguous memory for the maximum possible context length, leading to severe fragmentation and wasted memory. PagedAttention addressed this by chunking the KV cache into non-contiguous blocks, managed by a software-defined &ldquo;page table&rdquo; (the Block Table) [1].</p>Setting Up Jellyfin SSO with Authentik: Surviving the Betahttps://ericxliu.me/posts/jellyfin-sso-with-authentik/Sat, 15 Nov 2025 00:00:00 +0000https://ericxliu.me/posts/jellyfin-sso-with-authentik/<p>I recently integrated Jellyfin with Authentik for Single Sign-On (SSO). While the plugin works, it is still very much in an early development phase. The logging is often sparse or cryptic, and the feedback loop can be frustrating. Here is a guide focused on the obscure errors you might encounter and the simple fixes that aren&rsquo;t immediately obvious.</p> <h2 id="the-setup"> The Setup <a class="heading-link" href="#the-setup"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h2> <p>The configuration is best handled via API (curl) rather than the UI, as it ensures all fields are correctly typed and persistent.</p>Why Your Jetson Orin Nano's 40 TOPS Goes Unused (And What That Means for Edge AI)https://ericxliu.me/posts/benchmarking-llms-on-jetson-orin-nano/Sat, 04 Oct 2025 00:00:00 +0000https://ericxliu.me/posts/benchmarking-llms-on-jetson-orin-nano/<h2 id="introduction"> Introduction <a class="heading-link" href="#introduction"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h2> <p>NVIDIA&rsquo;s Jetson Orin Nano promises impressive specs: 1024 CUDA cores, 32 Tensor Cores, and 40 TOPS of INT8 compute performance packed into a compact, power-efficient edge device. On paper, it looks like a capable platform for running Large Language Models locally. But there&rsquo;s a catch—one that reveals a fundamental tension in modern edge AI hardware design.</p> <p>After running 66 inference tests across seven different language models ranging from 0.5B to 5.4B parameters, I discovered something counterintuitive: the device&rsquo;s computational muscle sits largely idle during single-stream LLM inference. The bottleneck isn&rsquo;t computation—it&rsquo;s memory bandwidth. This isn&rsquo;t just a quirk of one device; it&rsquo;s a fundamental characteristic of single-user, autoregressive token generation on edge hardware—a reality that shapes how we should approach local LLM deployment.</p>Flashing Jetson Orin Nano in Virtualized Environmentshttps://ericxliu.me/posts/flashing-jetson-orin-nano-in-virtualized-environments/Thu, 02 Oct 2025 00:00:00 +0000https://ericxliu.me/posts/flashing-jetson-orin-nano-in-virtualized-environments/<h1 id="flashing-jetson-orin-nano-in-virtualized-environments"> Flashing Jetson Orin Nano in Virtualized Environments <a class="heading-link" href="#flashing-jetson-orin-nano-in-virtualized-environments"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h1> <h2 id="introduction"> Introduction <a class="heading-link" href="#introduction"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h2> <p>Flashing NVIDIA Jetson devices remotely presents unique challenges when the host machine is virtualized. This article documents the technical challenges, failures, and eventual success of flashing a Jetson Orin Nano Super developer kit using NVIDIA SDK Manager in various virtualized environments, specifically focusing on QEMU/KVM virtual machines and LXC containers on Proxmox VE.</p>OpenWrt: Fix WireGuard Connectivity with MWAN3 by Excluding the VPN Endpointhttps://ericxliu.me/posts/openwrt-mwan3-wireguard-endpoint-exclusion/Sun, 28 Sep 2025 00:00:00 +0000https://ericxliu.me/posts/openwrt-mwan3-wireguard-endpoint-exclusion/<h3 id="overview"> Overview <a class="heading-link" href="#overview"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h3> <p>When using WireGuard together with MWAN3 on OpenWrt, the tunnel can fail to establish or flap when the peer&rsquo;s IP is routed into the tunnel itself. This is a classic routing bootstrap problem: WireGuard wants to route 0.0.0.0/0 into the tunnel, but the UDP packets to the peer&rsquo;s public endpoint also get captured, so they never reach the Internet to bring the tunnel up.</p>UniFi VLAN Migration to Zone-Based Architecturehttps://ericxliu.me/posts/unifi-vlan-migration-to-zone-based-architecture/Mon, 22 Sep 2025 00:00:00 +0000https://ericxliu.me/posts/unifi-vlan-migration-to-zone-based-architecture/<p>Embarking on a network migration to a properly segmented VLAN architecture is a rite of passage for any serious home lab or small business operator. The goal is clear: improve security and organization by separating traffic. However, the path from a flat network to a segmented one is often paved with subtle but critical configuration details that can lead to hours of frustrating troubleshooting.</p> <p>This article documents that journey. It details the pitfalls encountered, the core networking concepts that were essential to understand, and the best practices that ultimately led to a stable, secure, and logical network design built on a zone-based firewall model.</p>Quantization in LLMshttps://ericxliu.me/posts/quantization-in-llms/Tue, 19 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/quantization-in-llms/<p>The burgeoning scale of Large Language Models (LLMs) has necessitated a paradigm shift in their deployment, moving beyond full-precision floating-point arithmetic towards lower-precision representations. Quantization, the process of mapping a wide range of continuous values to a smaller, discrete set, has emerged as a critical technique to reduce model size, accelerate inference, and lower energy consumption. This article provides a technical overview of quantization theories, their application in modern LLMs, and highlights the ongoing innovations in this domain.</p>Breville Barista Pro Maintenancehttps://ericxliu.me/posts/breville-barista-pro-maintenance/Sat, 16 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/breville-barista-pro-maintenance/<p>Proper maintenance is critical for the longevity and performance of a Breville Barista Pro espresso machine. Consistent cleaning not only ensures the machine functions correctly but also directly impacts the quality of the espresso produced. This guide provides a detailed, technical breakdown of the essential maintenance routines, from automated cycles to daily upkeep.</p> <h4 id="understanding-the-two-primary-maintenance-cycles"> <strong>Understanding the Two Primary Maintenance Cycles</strong> <a class="heading-link" href="#understanding-the-two-primary-maintenance-cycles"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h4> <p>The Breville Barista Pro has two distinct, automated maintenance procedures: the <strong>Cleaning (Flush) Cycle</strong> and the <strong>Descale Cycle</strong>. It is important to understand that these are not interchangeable, as they address different types of buildup within the machine.</p>Fixing GPU Operator Pods Stuck in Init: Secure Boot, DKMS, and MOK on Proxmox + Debianhttps://ericxliu.me/posts/secure-boot-dkms-and-mok-on-proxmox-debian/Sat, 09 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/secure-boot-dkms-and-mok-on-proxmox-debian/<p>I hit an issue where all GPU Operator pods on one node were stuck in Init after migrating from Legacy BIOS to UEFI. The common error was NVIDIA components waiting for “toolkit-ready,” while the toolkit init container looped with:</p> <ul> <li>nvidia-smi failed to communicate with the NVIDIA driver</li> <li>modprobe nvidia → “Key was rejected by service”</li> </ul> <p>That message is the tell: Secure Boot is enabled and the kernel refuses to load modules not signed by a trusted key.</p>Beyond Words: How RVQ Teaches LLMs to See and Hearhttps://ericxliu.me/posts/how-rvq-teaches-llms-to-see-and-hear/Thu, 07 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/how-rvq-teaches-llms-to-see-and-hear/<p>Large Language Models (LLMs) are masters of text, but the world is not made of text alone. It’s a symphony of sights, sounds, and experiences. The ultimate goal for AI is to understand this rich, multi-modal world as we do. But how do you teach a model that thinks in words to understand a picture of a sunset or the melody of a song?</p> <p>The answer lies in creating a universal language—a bridge between the continuous, messy world of pixels and audio waves and the discrete, structured world of language tokens. One of the most elegant and powerful tools for building this bridge is <strong>Residual Vector Quantization (RVQ)</strong>.</p>Supabase Deep Dive: It's Not Magic, It's Just Postgreshttps://ericxliu.me/posts/supabase-deep-dive/Sun, 03 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/supabase-deep-dive/<p>In the world of Backend-as-a-Service (BaaS), platforms are often treated as magic boxes. You push data in, you get data out, and you hope the magic inside scales. While this simplicity is powerful, it can obscure the underlying mechanics, leaving developers wondering what&rsquo;s really going on.</p> <p>Supabase enters this space with a radically different philosophy: <strong>transparency</strong>. It provides the convenience of a BaaS, but it’s built on the world&rsquo;s most trusted relational database: PostgreSQL. The &ldquo;magic&rdquo; isn&rsquo;t a proprietary black box; it&rsquo;s a carefully assembled suite of open-source tools that enhance Postgres, not hide it.</p>A Deep Dive into PPO for Language Modelshttps://ericxliu.me/posts/ppo-for-language-models/Sat, 02 Aug 2025 00:00:00 +0000https://ericxliu.me/posts/ppo-for-language-models/<p>Large Language Models (LLMs) have demonstrated astonishing capabilities, but out-of-the-box, they are simply powerful text predictors. They don&rsquo;t inherently understand what makes a response helpful, harmless, or aligned with human values. The technique that has proven most effective at bridging this gap is Reinforcement Learning from Human Feedback (RLHF), and at its heart lies a powerful algorithm: Proximal Policy Optimization (PPO).</p> <p>You may have seen diagrams like the one below, which outlines the RLHF training process. It can look intimidating, with a web of interconnected models, losses, and data flows. <img src="https://ericxliu.me/images/ppo-for-language-models/7713bd3ecf27442e939b9190fa08165d.png" alt="S3 File"></p>Mixture-of-Experts (MoE) Models Challenges & Solutions in Practicehttps://ericxliu.me/posts/mixture-of-experts-moe-models-challenges-solutions-in-practice/Wed, 02 Jul 2025 00:00:00 +0000https://ericxliu.me/posts/mixture-of-experts-moe-models-challenges-solutions-in-practice/<p>Mixture-of-Experts (MoEs) are neural network architectures that allow different parts of the model (called &ldquo;experts&rdquo;) to specialize in different types of inputs. A &ldquo;gating network&rdquo; or &ldquo;router&rdquo; learns to dispatch each input (or &ldquo;token&rdquo;) to a subset of these experts. While powerful for scaling models, MoEs introduce several practical challenges.</p> <h3 id="1-challenge-non-differentiability-of-routing-functions"> 1. Challenge: Non-Differentiability of Routing Functions <a class="heading-link" href="#1-challenge-non-differentiability-of-routing-functions"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h3> <p><strong>The Problem:</strong> Many routing mechanisms, especially &ldquo;Top-K routing,&rdquo; involve a discrete, hard selection process. A common function is <code>KeepTopK(v, k)</code>, which selects the top <code>k</code> scoring elements from a vector <code>v</code> and sets others to $-\infty$ or $0$.</p>An Architectural Deep Dive of T5https://ericxliu.me/posts/t5-the-transformer-that-zigged-when-others-zagged-an-architectural-deep-dive/Sun, 01 Jun 2025 00:00:00 +0000https://ericxliu.me/posts/t5-the-transformer-that-zigged-when-others-zagged-an-architectural-deep-dive/<p>In the rapidly evolving landscape of Large Language Models, a few key architectures define the dominant paradigms. Today, the &ldquo;decoder-only&rdquo; model, popularized by the GPT series and its successors like LLaMA and Mistral, reigns supreme. These models are scaled to incredible sizes and excel at in-context learning.</p> <p>But to truly understand the field, we must look at the pivotal models that explored different paths. Google&rsquo;s T5, or <strong>Text-to-Text Transfer Transformer</strong>, stands out as one of the most influential. It didn&rsquo;t just introduce a new model; it proposed a new philosophy. This article dives deep into the architecture of T5, how it fundamentally differs from modern LLMs, and the lasting legacy of its unique design choices.</p>Mastering Your Breville Barista Pro: The Ultimate Guide to Dialing In Espressohttps://ericxliu.me/posts/espresso-theory-application-a-guide-for-the-breville-barista-pro/Thu, 01 May 2025 00:00:00 +0000https://ericxliu.me/posts/espresso-theory-application-a-guide-for-the-breville-barista-pro/<p>Are you ready to transform your home espresso game from good to genuinely great? The Breville Barista Pro is a fantastic machine, but unlocking its full potential requires understanding a few key principles. This guide will walk you through the systematic process of dialing in your espresso, ensuring every shot is delicious and repeatable.</p> <p>Our overarching philosophy is simple: <strong>isolate and change only one variable at a time.</strong> While numbers are crucial, your palate is the ultimate judge. Dose, ratio, and time are interconnected, but your <strong>grind size</strong> is your most powerful lever.</p>Transformer's Core Mechanicshttps://ericxliu.me/posts/transformer-s-core-mechanics/Tue, 01 Apr 2025 00:00:00 +0000https://ericxliu.me/posts/transformer-s-core-mechanics/<p>The Transformer architecture is the bedrock of modern Large Language Models (LLMs). While its high-level success is widely known, a deeper understanding requires dissecting its core components. This article provides a detailed, technical breakdown of the fundamental concepts within a Transformer block, from the notion of &ldquo;channels&rdquo; to the intricate workings of the attention mechanism and its relationship with other advanced architectures like Mixture of Experts.</p> <h3 id="1-the-channel-a-foundational-view-of-d_model"> 1. The &ldquo;Channel&rdquo;: A Foundational View of <code>d_model</code> <a class="heading-link" href="#1-the-channel-a-foundational-view-of-d_model"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h3> <p>In deep learning, a &ldquo;channel&rdquo; can be thought of as a feature dimension. While this term is common in Convolutional Neural Networks for images (e.g., Red, Green, Blue channels), in LLMs, the analogous concept is the model&rsquo;s primary embedding dimension, commonly referred to as <code>d_model</code>.</p>Some useful fileshttps://ericxliu.me/posts/useful/Mon, 26 Oct 2020 04:14:43 +0000https://ericxliu.me/posts/useful/<ul> <li><a href="https://ericxliu.me/rootCA.crt" >rootCA.pem</a></li> </ul>