Skip to content
IFAI

Research

How Apple squeezes big LLMs onto edge devices

Published Reach 31

Apple just detailed how it plans to fit heavy AI models onto everyday devices without blowing past hardware limits. In a paper titled 'LLM in a flash', researchers store parameters on flash memory and stream them to DRAM on demand, running models twice the size of available RAM while speeding up GPU inference by up to 25x. Why it matters: It lays the technical groundwork for reliable on-device generative AI.

How Apple squeezes big LLMs onto edge devices
Image: analyticsindiamag.com

Running large language models on smartphones has always hit the same brutal wall: devices simply lack enough RAM. While a mobile chip might have the compute, squeezing a multi-gigabyte neural net into limited memory usually crashes the system.

Apple researchers just published a paper tackling this exact bottleneck, titled 'LLM in a flash: Efficient Large Language Model Inference with Limited Memory.' The core idea is surprisingly simple yet technically tricky: store the bulk of model parameters on flash storage instead of DRAM, and swap them into working memory only on demand.

Squeezing double the model into tiny RAM

Flash memory is cheap and plentiful compared to DRAM, but it is also significantly slower. If a model naive reads weights randomly, inference crawls to a complete halt.

To bridge this gap, Apple built an inference cost model tailored specifically to how flash storage behaves. The team focused on two clear goals: minimize the total data transferred and make sure whatever data gets read comes in large, contiguous chunks.

They pulled this off using two primary techniques.

The first is called 'windowing.' Instead of reloading weights constantly, the system recycles neurons that were recently activated, drastically cutting down the volume of transfers from flash.

The second is 'row-column bundling.' Because flash memory excels at sequential reads, Apple groups model data together in chunks tailored to that exact hardware strength.

The payoff is massive. Apple can now run models up to twice the size of a device's available DRAM. Even better, inference speeds jump 4x to 5x on CPUs and a staggering 20x to 25x on GPUs compared to traditional loading approaches.

The scramble for on-device AI

This research arrives at a pivotal moment. Apple is widely reported to be prepping iOS 18 with deep generative AI integrations, aiming to upgrade Siri and Messages with smarter answers and sentence auto-completion. The company is also testing generative capabilities across apps like Apple Music, Pages, Keynote, and Xcode.

Meanwhile, the competition is heating up fast across mobile.

Samsung recently unveiled Gauss, its own on-device model slated to debut on the Galaxy S24 in early 2024, with plans to expand across phones, laptops, and tablets.

Google has also announced Gemini Nano, its targeted mobile model designed for the Pixel 8 to power features like automatic summaries in the Recorder app and smart replies in Gboard.

Why it matters

Apple just showed that solving on-device AI is not just about making smaller models, but about using flash storage much more aggressively.

For users, this could be the difference between getting powerful AI on an existing phone or being forced to buy an expensive handset with 16GB of RAM. Having these models run locally means real-time assistance with zero cloud lag and ironclad privacy, since personal data never leaves the device.

Strategically, this is classic Apple engineering: squeezing every drop of efficiency out of existing silicon and NAND flash rather than throwing expensive hardware at the problem. It forces competitors who rely on brute-force memory upgrades to rethink their mobile architectures.

That said, we think there are lingering questions about flash endurance. Shuffling gigabytes of weights back and forth during sustained AI sessions will put serious read stress on flash memory, and real-world battery impact remains to be seen. Still, Apple has laid down a practical blueprint for how on-device AI actually scales to the masses.

Sources (1)

  1. [1]
    analyticsindiamag.com(opens in a new tab)Originalanalyticsindiamag.com

Similar events

Past happenings like this one, for context.

Best of AI, daily