RUUR (@ruurcc) header
RUUR (@ruurcc) profile picture

Keep It Simple, Stupid!

Los Angeles, CA
Joined October 2011
ESP32 太好玩了,现在只要你有想法,设备连上 Type-C,剩下交给 AI 就好了!然后就是测试验收,反馈问题让 AI 迭代修改,做一些智能小废物太好玩!
44
53
12
297
128,438
study notes on speculative decoding leoniemonigatti.com/blog/spe…
16
149
12
1,211
91,148
Replying to @ukrroot @NVIDIAAI
This will support the full context window like my last implementation, had to stop this one before the benchmarks were done so I could get inkling-small going for a comparison 😛 They’ll both get a full r0b0bench github.com/r0b0tlab/r0b0benc…
1
1
4
148
Terence Tao on AI in Math. AI can synthesize a million papers and brute-test ideas. Humans can check just 5 examples and see the pattern. But as systems move toward world models, causal reasoning, and active learning, this efficiency gap will narrow.
And this comes from a theoretical physicist.
25
86
6
661
103,106
GLM-5.2 in 2 DGX with 21.5tok/s We are moving forward.
🚀 UPDATE: 15 → 21.5 tok/s ⚡ Quantized attention’s “big three” to 4-bit NVFP4 🧠 Added RedHatAI’s dspark speculator: K=2, 75% draft acceptance 📊 17.7 / 21.5 / 18.7 tok/s — 19.3 average 🔥 32K-context build handles 13K-token prompts while sustaining ~18 tok/s Full benchmarks + four more gotchas for the next brave soul: github.com/tonyd2wild/GLM5.2…
2
10
180
18,265
A tricky LLM interview question: You're serving a reasoning model on vLLM, and it keeps running out of GPU memory on long traces. So you add KV cache compression and evict 90% of the cached tokens. VRAM usage stays as is and GPU still runs out of memory. Why? (answer below) Evicting 90% of the KV cache can free almost none of the memory it was using. This sounds counterintuitive, but it follows directly from how production servers store the cache today. The KV cache grows with every token a model generates. Each token appends its key and value vectors across every layer, and nothing is freed while generation continues. This is the dominant memory cost for reasoning models. If a 32K-token CoT caches ~32K tokens of KV vectors, a Qwen3-32B with 4-bit weights will run out-of-memory around 24K tokens on a 24GB GPU. One obvious solution is to keep the important tokens and drop the rest, since attention is sparse enough to allow it. But this does not solve the memory problem yet. The reason is paged attention, which is the memory manager behind vLLM and most production servers. Under the hood, it splits GPU memory into fixed physical blocks, each one holds the KV for about 16 tokens. This block returns to the allocator only when every slot inside it is empty. Since the eviction logic selects tokens by importance, and such tokens are scattered across blocks... ...so despite eviction, almost every block is left with at least some survivor tokens. For instance, if the logic evicts 14k of 16k tokens across 1,000 blocks, most likely every block will still have a token. This means the allocator frees almost nothing. Placing the new tokens into those freed slots is not ideal because it breaks the cache's layout. Say token 16,001 arrives, and it's placed in the slot the 40th token used to hold. The cache now reads position 38, then 16,001, then 41, so the cache is no longer in token order. Attention can still compute the right answer from that, but only if every slot now carries a separate note recording which position it actually holds. This introduces another bookkeeping cost that an in-order layout inherently avoids. So the cache is logically 90% smaller and still physically the same size. Many compression results miss this because they measure on pre-allocated contiguous tensors rather than a paged server. There's another problem. Eviction methods pick which tokens to keep by looking at the attention scores themselves (as expected). But fast attention kernels used in production, like FlashAttention, never save those scores. They compute attention in small pieces and throw the full score grid away as they go, which is also why they're fast. So the exact signal eviction methods need isn't available in memory. The workaround is to fall back to eager attention and build the full matrix, which gives up the speed FlashAttention was there to provide. NVIDIA published a method called TriAttention to solve both these problems. It never needs attention scores. Instead, it scores tokens from the geometry of the model's key and query vectors before RoPE is applied, where those vectors sit in stable clusters. For the memory problem, it runs a compaction pass every 128 decoded tokens. The surviving tokens slide forward to close the holes eviction creates, so whole blocks empty out and return to the allocator while the cache stays in token order. On long reasoning traces, the approach matches full-attention accuracy while decoding 2.5x faster and using 10.7x less KV memory. KV cache compression is a big infrastructure problem. The number that decides whether it works is the count of freed blocks, not the count of evicted tokens. You can find the NVIDIA write-up here: research.nvidia.com/labs/eai… I wrote a first-principles breakdown of how the KV cache works. It walks through why the model stores keys and values at all, why the cache grows with every token, and a comparison of LLM generation speed with and without KV caching. Read it below.
39
308
8
2,197
274,470
有人发布了最棒的 LLM 可视化指南。
22
331
9
1,355
107,814
RUUR retweeted
#工程师学习 对于想学习 Rust 的同学一般会在看完教程以后缺少一些练手的案例,发现一个不错的博客「Writing an OS in Rust」,逐步使用 Rust 来创建了一个小型操作系统,每篇文章都是一个小教程,包含了所有需要的代码并在 Github 可以找到,你可以跟着学习。 🤖 os.phil-opp.com/
9
134
524
70,788
14
4
1
25
6,644
Linux Networking Tools - ss, nmap, dig, netcat, ping, tcpdump, socat, top, ethtool A Thread 👇
37
603
33
2,060
Hard and soft #DataScience skills for successful #DataScientists ... Graphic HT @inteliment
5
109
9
373
Here's an exotic expression for the sine of a single degree
45
538
49
3,334
我也来个系列 #河马叔消磨时间,分享一些很耗时间但于己没什么用的东西。 第 1 期 —— 体验 Redox 操作系统 #Redox 是一个专注于安全(可靠)的微内核操作系统,目标兼容 Linux|POSIX 程序。 Redox 有如下特点: 1. 微内核,源码才约 2 万行,有毅力的话是可以阅读完的。(续
12
39
3
140
Redux-Thunk vs. Redux-Saga by Shoshana Rosenfield link.medium.com/RIUofwC3GT
great
Use private repositories with three of your closest collaborators *for free* 🙌 github.com/pricing
Building a Node.js WebSocket Chat App with Socket.io and React by @justadudewhohax itnext.io/building-a-node-js…
6
11