<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ren Zezhong</title>
    <description>&quot;Ren Zezhong | Researcher| Engineer&quot;
</description>
    <link>https://MuseMamba.github.io/</link>
    <atom:link href="https://MuseMamba.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 02 Apr 2026 01:52:24 +0000</pubDate>
    <lastBuildDate>Thu, 02 Apr 2026 01:52:24 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>TurboQuant: Near-Optimal Online Vector Quantization</title>
        <description>&lt;h1 id=&quot;turboquant-near-optimal-online-vector-quantization&quot;&gt;TurboQuant: Near-Optimal Online Vector Quantization&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://arxiv.org/pdf/2504.19874&quot;&gt;Paper (Google, arXiv)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sgl-project/sglang/pull/21419&quot;&gt;SGLang PR (@shvmjndl)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;tldr&quot;&gt;TL;DR&lt;/h2&gt;

&lt;p&gt;TurboQuant is a near-optimal &lt;strong&gt;online vector quantization&lt;/strong&gt; method for compressing &lt;strong&gt;KV cache&lt;/strong&gt; during inference.&lt;/p&gt;

&lt;p&gt;It applies a &lt;strong&gt;random rotation&lt;/strong&gt; to the original vector (QR-based in the paper; replaced by &lt;strong&gt;FWHT&lt;/strong&gt; in the SGLang PR), which makes the rotated vector’s coordinates follow a &lt;strong&gt;Beta distribution&lt;/strong&gt; on the sphere. Then it &lt;strong&gt;quantizes each coordinate independently&lt;/strong&gt; (MSE objective + QJL term), stores the quantized indices in the KV cache, and reconstructs the vector by applying the inverse rotation during retrieval.&lt;/p&gt;

&lt;h3 id=&quot;key-points&quot;&gt;Key points&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Random rotation&lt;/strong&gt; reduces sensitivity to the original data distribution, making the rotated vectors more uniformly distributed on the sphere; each coordinate follows a &lt;strong&gt;Beta distribution&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;As the dimension &lt;strong&gt;d&lt;/strong&gt; increases, the coordinate distribution concentrates toward &lt;strong&gt;N(0, 1/d)&lt;/strong&gt;, and coordinates become approximately independent (in a probabilistic sense).&lt;/li&gt;
  &lt;li&gt;With near-independent coordinates, TurboQuant enables &lt;strong&gt;per-coordinate scalar quantization&lt;/strong&gt; (e.g., &lt;strong&gt;Lloyd–Max&lt;/strong&gt;) to compute near-optimal centroids.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;QJL&lt;/strong&gt; is introduced to mitigate inner-product errors beyond MSE (note: the current PR has not fully integrated this part yet).&lt;/li&gt;
  &lt;li&gt;TurboQuant performs better when the model’s &lt;strong&gt;K-norm&lt;/strong&gt; is close to &lt;strong&gt;1&lt;/strong&gt;, because it assumes the input vectors lie on (or near) the &lt;strong&gt;unit hypersphere&lt;/strong&gt;, i.e., ( |x|_2^2 = 1 ).&lt;br /&gt;
This helps explain why &lt;strong&gt;Mistral-7B&lt;/strong&gt; (≈ &lt;strong&gt;1.3×&lt;/strong&gt;) performs better than &lt;strong&gt;Qwen3&lt;/strong&gt; (≈ &lt;strong&gt;2.1×–2.4×&lt;/strong&gt;) under TurboQuant.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Note: This is my personal interpretation and summary. I recommend reading the original paper and the PR side by side.&lt;br /&gt;
In my view, AI infrastructure is one of the most tightly coupled areas between academia and industry: mathematical elegance is like an artist’s ideas, while AI infra is the craft—brushes, canvas, and technique. Its impact will likely keep expanding, much like the ripple effects of the Industrial Revolution.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
        <pubDate>Fri, 27 Mar 2026 00:00:00 +0000</pubDate>
        <link>https://MuseMamba.github.io/2026/03/27/TurboQuant.html</link>
        <guid isPermaLink="true">https://MuseMamba.github.io/2026/03/27/TurboQuant.html</guid>
        
        <category>Quantization</category>
        
        
        <category>阅读</category>
        
      </item>
    
      <item>
        <title>SGLang Memory Management &amp; KV Cache (Part 1)</title>
        <description>&lt;h1 id=&quot;sglang-memory-management-system&quot;&gt;SGLang Memory Management System&lt;/h1&gt;

&lt;h2 id=&quot;tldr&quot;&gt;TL;DR&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Key–Value (KV) cache entries can be &lt;strong&gt;reused across token generation&lt;/strong&gt;, improving inference efficiency when cached.&lt;/li&gt;
  &lt;li&gt;SGLang maintains &lt;strong&gt;mapping tables&lt;/strong&gt; to locate the KV-cache indices of tensors stored in the memory pool.&lt;/li&gt;
  &lt;li&gt;The mapping mechanism supports multiple attention backends (e.g., &lt;strong&gt;MHA&lt;/strong&gt;, &lt;strong&gt;MLA&lt;/strong&gt;, &lt;strong&gt;NSA&lt;/strong&gt;).&lt;/li&gt;
  &lt;li&gt;SGLang provides several cache backends to meet different &lt;strong&gt;usage scenarios&lt;/strong&gt;, &lt;strong&gt;performance goals&lt;/strong&gt;, and &lt;strong&gt;implementation constraints&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Cache Class&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Module&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;When to Use / Condition&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;RadixCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/radix_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Default&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;ChunkCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/chunk_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;disable_radix_cache=True&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;SWAChunkCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/chunk_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;disable_radix_cache=True&lt;/code&gt; + sliding window&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;HiRadixCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/hiradix_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enable_hierarchical_cache=True&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;SWARadixCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/swa_radix_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Sliding-window attention models&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;MambaRadixCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/mamba_radix_cache.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Mamba / SSM-hybrid models&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;LMCRadixCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/storage/lmcache/&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enable_lmcache=True&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;RadixCacheCpp&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mem_cache/radix_cache_cpp.py&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Experimental C++ radix tree&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

</description>
        <pubDate>Wed, 11 Mar 2026 00:00:00 +0000</pubDate>
        <link>https://MuseMamba.github.io/2026/03/11/sglang-mm.html</link>
        <guid isPermaLink="true">https://MuseMamba.github.io/2026/03/11/sglang-mm.html</guid>
        
        <category>SGLang</category>
        
        
        <category>技术</category>
        
      </item>
    
      <item>
        <title>2026-03-11 个人总结</title>
        <description>&lt;p&gt;&lt;img src=&quot;https://s3-us-west-1.amazonaws.com/suyan-blog-pics/test/life-new-start-in-2018.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;总结一下自己从2022年读博到2026年博四的进程：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;遇到了棒棒的女朋友。&lt;/li&gt;
  &lt;li&gt;申请CSC前往EPFL访问。&lt;/li&gt;
  &lt;li&gt;发表文章到NDSS26 能中全靠王琴应师姐，郑晗， Mahtias Payer 超哥等T1合作者, 实验室的大家都非常厉害也很nice。 除了一个完全无法赢得我尊重的初代合作者，愿你以后喝到的酒都是白开水，因为你配不上那么好喝的德国啤酒（真好喝啊，汉堡的和雪山顶的，遗憾国内没有平替）。&lt;/li&gt;
  &lt;li&gt;协商毕业被拒绝 &lt;em&gt;**&lt;/em&gt;，自己选的，还好其实，刚好搞搞AI Infra, all in 了属于是，至于结果如何，我保持微笑和努力。&lt;/li&gt;
  &lt;li&gt;带女友回家见爸爸妈妈！&lt;/li&gt;
  &lt;li&gt;All in AIInfra， 因为是做安全测试出身，所以从系统鲁棒性入手，学习优化策略，实现方法，研究鲁棒性问题。（Being a intership）&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2025年发生了太多太多，总的来说没白忙活。&lt;/p&gt;

&lt;h2 id=&quot;技术&quot;&gt;技术&lt;/h2&gt;

&lt;p&gt;最大的收获是通过研究现有SOTA模糊测试框架Syzkaller(Google)存在的局限性，实现了专注动态低频区域，且不牺牲覆盖率的模糊测试框架：Sysyphuzz, 该工作对我最大的帮助是，
面对复杂系统我可以从连滚带爬到从从容容。整个科研过程可以概括为：观察，测试，分析，确定问题，解决问题。工程性大于创新性，是我喜欢的工作类型。
论文被接收是完全的意外之喜，目前保持着100%一作四大投稿接受率（笑：1中1）。&lt;/p&gt;

&lt;p&gt;这个项目过程给了我转战AI Infra的信息，复杂系统其实都一样，知识就是那些，去理解去调试，去动手改进。&lt;/p&gt;

&lt;p&gt;Currently Focus on:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Sglang (doing)
– KV Cacheing
– Attention Backend
– PD deaggregation&lt;/li&gt;
  &lt;li&gt;CS336(Class Finished; Assignments1 Doing)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;后期会在Tec里总结分享&lt;/p&gt;

&lt;h2 id=&quot;生活&quot;&gt;生活&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;2022年-2023年，迷茫中读博，寻找出路，索性有女友的陪伴支持，自己也没放弃，摸索前行。&lt;/li&gt;
  &lt;li&gt;2024年，申请到CSC，张超老师和Mahtias Payer两位老师的指导，有了前进的方向，&lt;a href=&quot;https://kdsjzh.github.io/&quot;&gt;郑晗&lt;/a&gt; 和&lt;a href=&quot;https://wqqqy.cn/&quot;&gt;王琴应&lt;/a&gt;师姐的帮助，
让我第一次指导科研怎么搞，论文怎么写，需要做什么，需要考虑什么，202403-202503年在EPFL的所有经历，都是人生的第一次，非常有意义。&lt;/li&gt;
  &lt;li&gt;2025年03月，回国后，继续咬牙坚持，改稿，rebuttle, major, 接收，完成后已经是10月份了，
至今还记得无数个凌晨一点走在马路上，就觉得无论结果如何，对得起自己了，感谢所有支持我的人，感谢自己。&lt;/li&gt;
  &lt;li&gt;2025年12月，中期申请被拒，意味着众多以26年6月毕业为前提的计划全部落空，我告诉自己不能被困死，我要求生。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;2026-展望&quot;&gt;2026 展望&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;AI Infra 继续努力
  – 搞懂sglang的设计，优化策略。
  – 分析其面临的挑战。
  – 做出优化，争取给出一个有价值的PR。
  – 带来一篇工作。&lt;/li&gt;
  &lt;li&gt;12 月申请中期&lt;/li&gt;
  &lt;li&gt;投出Post-fuzzing 工。&lt;/li&gt;
  &lt;li&gt;和女友一起去大理。&lt;/li&gt;
  &lt;li&gt;在海南过年。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;我知道你很努力也很累所以辛苦了继续陪着自己前进前进三&quot;&gt;我知道你很努力，也很累，所以辛苦了，继续陪着自己前进，前进三！&lt;/h2&gt;
</description>
        <pubDate>Wed, 11 Mar 2026 00:00:00 +0000</pubDate>
        <link>https://MuseMamba.github.io/2026/03/11/start.html</link>
        <guid isPermaLink="true">https://MuseMamba.github.io/2026/03/11/start.html</guid>
        
        <category>essay</category>
        
        
        <category>生活</category>
        
      </item>
    
  </channel>
</rss>
