AI Today

💾 A Transformers prototype loads parts of an AI model from SSD on demand

· 2 min

In brief


🍎 A prototype for the Transformers AI library keeps part of a model in device memory and reads the rest from an SSD as needed. A configuration with compressed model weights used 4.1 GiB instead of 15 GiB of peak device memory in an Apple M5 test. It generated text more slowly. The experiment shows how a local model can trade some speed for a lower memory requirement.


🗃️ OLMoE is made up of many smaller networks called experts. It picks a small subset to process each unit of text. The published Transformers patch keeps recently needed experts in a cache and reads missing ones from the SSD. It can also guess which experts the next layer will need and start reading them early.

🔢 The published table covers four prompts with 128 generated tokens each on an Apple M5 with 32 GB of unified memory. With a 2 GiB cache and expert weights reduced to four bits, the prototype generated a median of 25.7 tokens per second. The standard model with 16-bit weights generated 38.1. The 4.1-versus-15 GiB figures measure peak device memory used for model computation. Both weight compression and loading on demand contribute to that difference.

🧪 The report also includes a setup that loads all the four-bit experts upfront. It ran faster and needed 6.1 GiB of device memory. In a short quality check, the four-bit model’s most likely next token matched the 16-bit model’s about 91 percent of the time. The reports and patch were made publicly available on November 13.

Sources

Open in the interactive reader →

This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources. Imprint, privacy policy and terms of service