nya (@nyadotcom) profile picture

21F, swe at hsbc, kinda like coding

Joined October 2025
How a Vision Transformer reads an image. The image is cut into patches. Each patch is flattened and mapped by one shared linear projection E. A learnable [class] token goes in front, and a position embedding is added to every token: z₀ = [x_class; x¹E; …; xᴺE] + E_pos Each encoder layer: Norm → multi-head self-attention → add the input back, then Norm → MLP → add again. Repeated L times. Only the class token's final output reaches the MLP head, which predicts the class.
13
297
15
1,724
63,802
New post: "Multi-Core By Default" On multi-core programming, not as a special-case technique, but as a new dimension in all code.
35
71
14
603
72,918
While operating system architectures have stood still for the past 30 years, hardware has been getting faster and faster. Accessing disks or the network used to take many milliseconds, now it takes microseconds. What would it take to build an OS that can handle these speeds--a nanosecond-scale OS architecture? I really like this paper because it attempts to provide OS abstractions for ultra-fast hardware. Right now, the overhead of going through the kernel is vastly higher than datacenter network latency, so ultra-fast programs must bypass the kernel altogether and access hardware directly. But this is a nightmare to program because it means code is hardware-dependent, and so has to be rewritten for every machine it runs on. The Demikernel solves this problem by providing a high-level OS interface for ultra-fast (kernel-bypass) I/O. This is tricky because it has to handle a variety of hardware and kernel-bypass strategies, carefully coordinate memory accesses across the I/O device, stack, and application, and multiplex CPUs at nanosecond timescales. The solution is to provide library OSes based around PDPIX, an extension of POSIX designed to support ultra-fast I/O. PDPIX replaces POSIX's pipes with I/O queues to allow applications to submit entire requests at once. It also incorporates coroutines (essentially, async/await) to allow ultra-fast CPU context switching. The big takeaway is that incredible hardware performance is of limited utility if there aren't good abstractions to use it. Hopefully OS researchers will keep making kernel bypass easier so we can all take full advantage of how fast computers are becoming!
20
152
18
940
105,110