Back to browse
GitHub Repository

Software side of an LLM running inside a DRAM chip via charge-sharing PIM (BitNet b1.58 on DRAM-Bender silicon).

2 starsC++

Running PrismML's Bonsai inside DRAM by breaking DDR4 timing rules

by pcdeni·Jul 23, 2026·2 points·0 comments

AI Analysis

●●●●GemWizardryBig BrainZero to One

Running matrix multiplies inside DRAM cells via charge-sharing defies standard memory architecture.

Strengths
  • Demonstrates real ternary matrix multiplication inside commercial DDR4 silicon.
  • Reproduces and extends academic PIM research with open-source verification tools.
  • Addresses memory bandwidth bottlenecks by computing where data physically resides.
Weaknesses
  • Requires specific DRAM-Bender hardware setup not accessible to general developers.
  • Performance metrics like 632s/tok indicate early research stage rather than production utility.
Category
Target Audience

Hardware researchers, systems engineers, and ML infrastructure experts

Similar To

UPMEM PIM · Samsung AiM · Mythic AI

Post Description

The excitement surrounding PrismML’s 1-bit/ternary Bonsai models has the industry closely watching how smartphone giants, particularly Apple, will implement LLMs on edge devices.

Moving AI on-device is a brilliant and necessary strategy. It ensures absolute user privacy in alignment with EU regulations, fundamentally shifts the economics away from costly cloud inference, and paves the way for a significant hardware upgrade supercycle as users seek true AI-capable silicon.

To create a smart on-device "Semantic Router," models need to reach the 27B+ parameter scale. Achieving this on a phone requires extreme quantization, such as PrismML’s ternary weights.

However, a critical hardware reality often overlooked by the software world is that fitting the weights in RAM is not equivalent to moving them. Running a 27B ternary model on standard LPDDR encounters a significant memory bandwidth limitation. Transferring gigabytes of data across the SoC bus for each token generation can lead to thermal throttling of the NPU and excessive battery drain.

This raises an important question: why are we still transferring data to the compute? Why not execute AI inference natively within the memory?

Frustrated with academic PIM simulations that overlook bare-metal physics, I developed CaSA, an architecture that performs ternary LLM inference directly inside COTS DRAM through charge-sharing, completely bypassing the memory bus.

Software quantization is a great initial step, and CaSA provides the physical hardware substrate needed to complete the bridge: https://github.com/pcdeni/CaSA

Similar Projects

Security●●Solid

LLM-Audit – Semgrep Rules for OWASP LLM Top in TypeScript

Fills the TypeScript gap that Semgrep's official AI best practices pack misses.

Niche Gem
Javierlozo
102mo ago