# Poster 28000

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/28000

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi everyone, I'm Rasul Shafipur and today I'm excited to talk to you about C-dalem, a method that compresses model weights into the seeds of pseudorandom generators. This work wouldn't have been possible without the amazing collaboration of my current and former colleagues at Apple listed here. So why C-dalem? Large models a lot of times face memory bottlenecks during inference. And C-dalem is a memory compression technique that reduces latency when memory transfer is bottlenecked.
It can also enable large models to fit with unlimited memory. And another major benefit is that it can save energy since memory transfer is far more energy intensive than computation. And this brings us to our key question that can we generate weights on the fly using hardware-based pseudo-random number generators instead of storing them at the cost of more compute? To understand how this works, let's take a look at pseudo-random number generators.
A pseudo-random generator is a deterministic algorithm that produces a seemingly random sequence of numbers based on a given seed. For example, if we start with a seed S, the pseudo-random generator will generate a predictable sequence U0, U1, U2, etc. Now let's take this sequence of numbers and reshape it into a matrix.
You might already see where this is going. In a setup storing an entire matrix of weights, can we just store a seed? Then whenever we need the weights, or just before we need them, we recompute them using the seed and a deterministic function? This sounds great, but the space of possible weight matrices we can generate with just the seed is limited. To make this more expressive, we introduce learnable coefficients. And here's the idea.
In a set of a weight column being directly generated from the pseudo-random generator, it is a random matrix U, generated from a seed S, multiplied by a few learnable coefficients T. We chose matrix multiplication for hardware efficiency, and now with this setup, we have some key design decisions to make.
Which pseudo -random generator should we use? How do we partition the weights? What should be the block size C? How many random numbers should we generate for each block? Or equivalently, what should be the latent dimension P? What data type do we choose for the coefficients T? How many bits should we allocate for the random seed S? These choices affect both compression quality and efficiency.
To answer these questions, let's first determine how to pick the best seat s and coefficients t for a given weight block. We frame this as a minimization problem. We minimize the Euclidean distance between the actual weight block and its approximation u times t. For a fixed seat s and fixed pseudo random generator, there's a closed-form solution. We can compute optimal t using the pseudo inverse of u.
Now we run this algorithm in parallel for all weight blocks and across all possible seats, and repeat the seat and coefficients that result into the lowest reconstruction error, and only save those for each block. Now let's go back to our design space. For a pseudo-random generator, we used an LFSR, linear feedback shift register, that only uses XOR and shift registers and is simple, efficient, and hardware-friendly.
To see how we pick the rest of the hyperparameters, first notice that the bits per element M in CDLAM is determined by the pseudo random generator seed size K, the coefficient between P sub T, the size of the latent dimension P, and the number of weight elements in each block C. For a target bit rate, for example, 3 bit or 4 bit per weight, we ran Monte Carlo simulations to find configurations that lead to low reconstruction error.
Here is the summary of configurations for MECO4 and 3-bit per element and once we had these setups we tested them on real workloads to see how they perform. For example, we applied CDLAM to LOMA3 with 70 million parameters where the original model was stored in FP16. We compressed it to 3-bit and 4-bit representations without any fine-tuning or calibration data.
And here's what we observe. On the x-axis, we have different zero-shot tasks, and on the y-axis, we see the accuracy retention compared to the FP16 baseline after compression. At four bits, we get near ISO accurate performance, and at three bits, we still retain high accuracy. And our method performs better or on par with the state-of-the-art approaches that require fine-tuning. And we can potentially further lower the bit rate and improve accuracy with fine-tuning as well.
We also analyze hardware performance. We tested CDLM on an FPGA. We chose an FPGA implementation to emulate the performance of a custom AI accelerator. Our results, Forex's speedup at 4-bit compared to FP16 in memory -bound environments. And that brings us full circle. This was CDLM, a new approach to trading compute for memory using seeds from a pseudo random generator. Thank you and please feel free to reach out.
