Skip to content
Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech

Real-world AI, Copilot and Azure architecture

Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech

Real-world AI, Copilot and Azure architecture

  • Home
  • Blog
  • About
  • Home
  • Blog
  • About
Close

Search

  • Home
  • Blog
  • About
Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech

Real-world AI, Copilot and Azure architecture

Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech logo with a futuristic AI robot and cloud circuitry, representing artificial intelligence, Microsoft Copilot, Azure AI, and cloud innovation. Frezz Tech

Real-world AI, Copilot and Azure architecture

  • Home
  • Blog
  • About
  • Home
  • Blog
  • About
Close

Search

  • Home
  • Blog
  • About
Neon isometric illustration: a Llama 70B model stacked as 80 layers, streamed from an SSD to a MacBook with AirLLM versus a Microsoft Foundry cloud deployment, 900 times faster in the cloud.
Azure AIImplementation & OperationsLocal AIMicrosoft Foundry

Running a 70B model on a laptop with AirLLM: what it costs in time and where Microsoft Foundry fits

07.10.2026 7 Min Read
0

AirLLM lets you run a 70 billion parameter model on a 64 GB MacBook by loading one layer at a time from disk. It works. It is also about 900 times slower than the same model in Microsoft Foundry. An answer with 200 tokens takes more than an hour locally and a few seconds in the cloud. That makes AirLLM a great tool for offline experiments and a poor one for anything interactive. This post shows the measurements, four pitfalls from the Foundry side and a simple rule for choosing between both.

All code, raw data and the Bicep template are in the repo: https://github.com/Frezz146/airllm-vs-foundry

900x

slower than Foundry for the same model (0.044 versus about 40 tokens per second)

22.7 s vs 0.34 s

until the first token appears, local versus Foundry

0.71 USD

per million input and output tokens in Foundry (Global Standard)

Why 70B? My first attempt used an 8B model. It fits into RAM, so AirLLM was never really tested and the comparison told me very little. AirLLM only makes sense for a model that is larger than your memory, so I repeated everything with Llama 3.3 70B on both sides.

Quick glossary for non technical readers
  • Token: a chunk of text, roughly three quarters of a word. Models read and write in tokens.
  • Time to first token: how long you wait until the answer starts to appear.
  • Tokens per second: how fast the answer is written. 40 tokens per second feels like fast typing, 0.044 means one word every 30 seconds.
  • 70B and bf16: 70 billion parameters, each stored in 2 bytes, which adds up to about 140 GB.
  • Layer: the model is a stack of 80 identical processing steps. Every token has to pass through all of them.

The idea behind AirLLM

A large language model is a stack of layers. Normally all of them must fit into memory (or GPU memory) at once. A 70B model in bf16 needs about 140 GB, far more than a laptop has.

AirLLM avoids this by keeping only one layer in memory. For every token it reads the first layer from disk, computes, throws it away, reads the next one and so on until all 80 layers are done. Then the next token starts again. Memory is no longer the limit, disk speed is.

Diagram: normally all 80 layers of a 140 GB model must fit into 64 GB RAM. AirLLM instead reads one layer at a time from the SSD, computes it, discards it and repeats this for every token.
AirLLM trades memory for disk reads: all 80 layers are streamed from the SSD for every generated token.

The setup

I wanted a fair comparison, so both sides run the same model: Llama 3.3 70B Instruct.

  • Local: MacBook Pro 16 inch with Apple silicon (M5 Max, 64 GB RAM, 2 TB SSD), AirLLM on the MLX backend, model from an ungated Hugging Face mirror.
  • Cloud: Microsoft Foundry, Global Standard deployment in Sweden Central, Entra ID authentication only, deployed with Bicep and a small shell script that can also tear everything down again.
  • Workload: three prompts (short, medium and long), 16 new tokens each, temperature 0. Foundry got 5 runs per prompt, AirLLM 2 because every run takes six minutes.

The results

Metric (median)AirLLM, localFoundry
Time to first token22.7 to 23.3 s0.34 to 0.36 s
Total time for 16 tokensabout 361 sabout 0.4 s
Throughput0.044 tokens/sabout 40 tokens/s
One time setup79 min (download and layer split)a few minutes (deployment)
Costelectricity and hardware0.71 USD per 1M input and output tokens
Dot plot on a logarithmic scale. Throughput: AirLLM 0.04 tokens per second, Foundry about 40. Time to first token: AirLLM about 23 seconds, Foundry about 0.35 seconds, for short, medium and long prompts.
Medians per prompt length, 16 new tokens, both axes logarithmic. Same model on both sides: Llama 3.3 70B Instruct.

A few things stand out:

  • Every token costs a full pass over the model. About 20 seconds per token matches 140 GB read from the SSD at roughly 7 GB/s. The chip is not the bottleneck, the disk is.
  • Prompt length barely matters for short prompts, because the cost is dominated by loading the layers.
  • A 200 token answer would take more than an hour locally. In Foundry it takes a few seconds.
  • The cloud side is cheap. Llama 3.3 70B in the Global Standard deployment costs 0.71 USD per million input and output tokens (Azure Retail Prices API, Sweden Central, checked on 6 October 2026). My 15 benchmark requests with about 59 input and 16 output tokens cost less than a tenth of a cent in total. Generating one million tokens locally at 0.044 tokens per second would take about 260 days.

What I learned on the Foundry side

The benchmark itself taught me more than the numbers. Four pitfalls are worth knowing:

  1. Silent retries distort latency: In an earlier test with a smaller model (gpt-5-mini) and a deployment capacity of 10, my time to first token jumped to about 5 seconds. The cause was throttling (HTTP 429) combined with automatic retries in the SDK, which hide the problem inside the timing. I now disable SDK retries in the benchmark, wait for the retry hint outside the timed section and count throttled attempts separately.
  2. Check quota before you deploy: The Llama 3.3 70B quota in my subscription was 20 (thousand tokens per minute). My first deployment asked for 50 and the what-if validation rejected it. Running what-if before every deployment saved me from a half-created resource.
  3. The catalog and your account can disagree: The model catalog listed version 10. My account offered versions 1 to 5 and 9. Ask the account itself with az cognitiveservices account list-models instead of trusting the web page.
  4. Not every model takes the same parameters: Reasoning models such as gpt-5-mini need max_completion_tokens and accept a reasoning effort setting. For Llama through the OpenAI compatible v1 endpoint I simply left the reasoning setting out. If a call fails with HTTP 400, check what that specific deployment accepts.

Which one should you use?

SituationAirLLMFoundry
Offline prototype, no cloud allowedworks, slowlynot possible
Overnight batch with short outputspossible if time is freefaster and cheap per token
Interactive chat or an agentnot usablesuitable
Many parallel usersone request at a timescales with quota
Data must not leave the machinefitsData Zone or Regional deployment instead of Global, plus network isolation
Model larger than your memorythe real use casemanaged models only

Data residency is not free in the cloud, but it is cheap. For Llama 3.3 70B in Sweden Central the list price per million tokens is 0.71 USD for Global Standard, 0.781 USD for Data Zone and 0.859 USD for Regional deployments (Azure Retail Prices API, checked on 6 October 2026). Data Zone and Regional deployments are the ones meant for stricter data residency requirements. Only a fully offline setup like AirLLM keeps the data on the machine for certain.

My rule of thumb: use AirLLM when the constraint is “this must run here” and time does not matter. Use Foundry as soon as a human waits for the answer or more than one request arrives at a time.

What this means in practice

  • Develop small, run big: Test prompts and code against a small local model and run production in Foundry.
  • Use AirLLM for the exceptions: A one off analysis, a demo without internet or a model that must stay on this machine and time does not matter.
  • Choose the deployment type by your data rules: Global, Data Zone and Regional differ by a few cents per million tokens, not by orders of magnitude.
  • Check quota, model version and parameters before a demo: The catalog and your account can disagree.

macOS, NVIDIA and what changes

I ran everything on a MacBook with Apple silicon, so AirLLM used its MLX backend. That has a few consequences:

  • On macOS only Llama architecture models work, which is why Llama was the natural choice for both sides.
  • There is no stop token handling, answers can repeat until the token limit is reached. It does not affect the timing.
  • The first run downloads the model and splits it into one file per layer. For 70B that took 79 minutes and needs about twice the model size in free disk space, roughly 285 GB.

On a machine with an NVIDIA GPU the local numbers will look different, for example with the torch backend or 4 bit compression. I would still expect the same conclusion. The gap to the cloud is about 900 times, so even a setup that is ten times faster would be about 90 times slower than the Foundry deployment and every token still needs a full pass over the layers from disk. This is an expectation based on the size of the gap, I did not measure it on NVIDIA hardware.

Conclusion

AirLLM is a clever trick that makes a 70B model run on a laptop. Foundry is what you use as soon as someone waits for the answer. The gap I measured is about 900 times for this model on this machine, which is too large for a faster computer to change the decision.

If you own an NVIDIA GPU I would like to see your numbers. The benchmark is in the repo and a pull request with a new results file is all it takes.

View the repo on GitHub

Try it yourself

Before you start

  • About 285 GB of free disk space for the 70B model (download plus split layer files)
  • Azure CLI signed in with az login on the right tenant
  • Quota for Llama 3.3 70B in your region (mine was 20 thousand tokens per minute)
  • Python 3.12 and uv, see the README in the repo
  • Run scripts/foundry.sh destroy when you are done
git clone https://github.com/Frezz146/airllm-vs-foundry
cd airllm-vs-foundry
scripts/foundry.sh deploy -m Llama-3.3-70B-Instruct --model-format Meta --model-version 9 -d bench-llama --capacity 20

# run the benchmarks, then clean up
scripts/foundry.sh destroy

The destroy command removes the resource group and purges the soft deleted account, so nothing keeps costing money.

Limits of this benchmark
  • Small sample: 2 AirLLM runs per prompt and only 16 tokens. Read the numbers as an order of magnitude.
  • The throughput figure for Foundry includes the startup time because only 16 tokens were generated. The pure generation rate is higher, but the order of magnitude stays the same.
  • The OS file cache was not cleared, although a 140 GB model on a 64 GB machine limits that effect.
  • One region and one time of day. Foundry latency can vary with load.
  • The local side has no price tag here. Electricity and hardware wear are not included and cloud prices can change.

These are personal measurements on my own hardware and Azure subscription. This is an independent project and not affiliated with Microsoft. Prices and model versions can change.

Tags:

AzureLocal AIMicrosoft Foundry
Author

Alexander Dierkes

Follow Me
Other Articles
Technical architecture diagram illustrating end-to-end GenAIOps pipeline, inner loop local evaluation, OIDC GitHub Actions CI/CD quality gates, and outer loop Microsoft Foundry OpenTelemetry tracing in Azure Application Insights
Previous

From Edge to Enterprise Cloud: Part 4 — GenAIOps, Automated Evaluations and Observability with Microsoft Foundry

Legacy Foundry agents share one project identity while new agents each get their own Entra agent identity
Next

Which Identity Does Your Foundry Agent Really Use?

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest Posts

  • Which Identity Does Your Foundry Agent Really Use?
  • Running a 70B model on a laptop with AirLLM: what it costs in time and where Microsoft Foundry fits
  • From Edge to Enterprise Cloud: Part 4 — GenAIOps, Automated Evaluations and Observability with Microsoft Foundry
  • From Edge to Enterprise Cloud: Part 3 — Cloud Migration and Enterprise Identity with Microsoft Foundry Agent Service
  • From Edge to Enterprise Cloud: Part 2 — Tool Orchestration with the Model Context Protocol

Azure Azure OpenAI Foundry Local Local AI Microsoft Foundry

Resources

About | Imprint

Disclaimer

Opinions expressed here are my own and may not reflect those of others. Unless I'm quoting someone, they're just my own views.

© 2026 Frezz Tech - All rights reserved by Alexander Dierkes
Independent technology blog. Not affiliated with Microsoft.