SShortSingh.
Back to feed

Developer built a padding-free deep learning framework in 2018 that foreshadowed modern LLM serving

0
·5 views

In 2018, a master's student built InsNet, a C++14 deep learning library designed to eliminate batch padding by storing all values in a flat buffer with per-sequence shape metadata. The library was motivated by NLP tasks like tree-LSTMs and hierarchical encoders, where each input had a unique computation graph shape, making traditional padding wasteful and complex. Around 2021, the developer publicly claimed padding-free dynamic batching was a critical missing feature in existing deep learning libraries, but the idea gained little traction at the time. By 2023, vLLM popularized 'continuous batching' for LLM inference, using a flat, padding-free token stream with per-sequence offsets — structurally identical to InsNet's core design. The author argues the 2018 approach was not wrong but simply early, and targeted the wrong layer of the stack compared to where the industry eventually adopted the concept.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Polyglot Files: How One Byte Sequence Can Fool Two Different File Parsers

A polyglot file is a single byte sequence deliberately structured to satisfy the syntax rules of two or more different file formats simultaneously. This is possible because different formats make different structural assumptions — some parsers only check the beginning of a file, while others, like ZIP, anchor their critical structures near the end. This leaves regions within the file where a second format's structures can coexist without conflicting with the first. Unlike simple extension spoofing, polyglot files genuinely pass content-level validation by multiple parsers, making them a subtle security concern. The phenomenon exploits gaps and tolerances in how file format specifications define required versus ignorable byte regions.

0
ProgrammingDEV Community ·

XZ Utils Backdoor: How a Near-Catastrophic Linux Supply Chain Attack Was Caught

In late March 2024, Microsoft engineer Andres Freund accidentally discovered a sophisticated backdoor hidden in XZ Utils, a widely used compression library present on most Linux and macOS systems, tracked as CVE-2024-3094. Freund noticed unusual CPU spikes and SSH login delays on his Debian system, which led him to trace the cause to a malicious, heavily obfuscated payload embedded in the liblzma component during the build process. The backdoor was designed to allow an attacker with a specific private key to bypass authentication and execute arbitrary code with root privileges on affected servers running systemd-patched SSH daemons. The attack was orchestrated over nearly three years by an actor using the alias 'Jia Tan,' who systematically built trust within the XZ project while coordinated fake accounts pressured the original maintainer, Lasse Collin, into ceding control. The incident has raised urgent questions about the security of open-source supply chains and the sustainability of relying on under-resourced volunteer maintainers for critical software infrastructure.

0
ProgrammingDEV Community ·

Next.js App Router skips keyboard focus on navigation, but a simple fix exists

The Next.js App Router includes a built-in route announcer that notifies screen readers of page changes via an aria-live region, but it does not reset keyboard focus after client-side navigation. When a user activates a link, the element unmounts and focus falls back to the document body, forcing keyboard users to tab through the entire header again on every route change. A 15-line client component using usePathname() and tabIndex={-1} can restore focus to the new page content, resolving the issue. The author discovered the bug through hands-on keyboard-only testing rather than automated audits. The fix has added urgency for many products since the European Accessibility Act became enforceable on 28 June 2025.

0
ProgrammingDEV Community ·

AWS S3 vs EBS vs EFS: Key Differences and When to Use Each

Amazon Web Services offers three distinct storage solutions — S3, EBS, and EFS — each designed for fundamentally different use cases. EBS functions as a virtual hard drive attached to a single EC2 instance, making it suitable for operating systems and databases requiring low-latency block access. EFS is a managed network file system that multiple instances can mount simultaneously, ideal for shared workloads across servers, though it costs more per GB than EBS. S3 is object storage accessed via HTTP API rather than a file system, best suited for backups, static assets, logs, and data lakes at a cheaper per-GB cost. Choosing the wrong service is a common beginner mistake that can result in inefficient architectures and higher-than-expected cloud bills.