{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "lyogavin-airllm--run-a-70b-model-on-a-4gb-gpu",
 "repo": "lyogavin/airllm",
 "repo_url": "https://github.com/lyogavin/airllm",
 "repo_slug": "lyogavin-airllm",
 "title": "Run a 70B-class model on a single 4GB GPU",
 "page_title": "How to run a 70B-class model on a single 4GB GPU with Airllm",
 "summary": "Install AirLLM, pass a Hugging Face repo ID to AutoModel and generate text on a small card.",
 "who": "A developer with a laptop GPU who wants to try large models locally.",
 "problem": "Large models normally need far more VRAM than consumer GPUs have, so people rent cloud GPUs to test them.",
 "outcome": "Text generated by a large model on your own small GPU, with layers streamed from disk.",
 "steps": [
  "Run `pip install airllm`",
  "In Python, `from airllm import AutoModel` and load a model with `AutoModel.from_pretrained(\"Qwen/Qwen3-32B\")` or another repo ID",
  "Tokenize your prompt with model.tokenizer as in the Quickstart",
  "Call model.generate with max_new_tokens and decode the output",
  "Set layer_shards_saving_path if you want the split model saved on a different disk"
 ],
 "agent_prompt": "Install lyogavin/airllm and write a script that loads <Hugging Face model ID> with AutoModel, answers <prompt>, and prints tokens per second. Warn me first if the model's split shards need more free disk than I have.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "Layer streaming trades speed for memory, so generation is slow; first runs also split and save the model, which needs a lot of disk.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "jupyter notebook",
 "requirements": [
  "Python and pip",
  "A CUDA GPU (a few GB of VRAM) or a Mac with mlx and torch for Llama-style models",
  "Lots of disk for split layer shards; some models need specific transformers versions",
  "Optional: bitsandbytes for compression"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lyogavin-airllm/run-a-70b-model-on-a-4gb-gpu/",
 "md": "https://dedupedai.com/use-cases/lyogavin-airllm/run-a-70b-model-on-a-4gb-gpu/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lyogavin-airllm--run-a-70b-model-on-a-4gb-gpu.json",
 "api_version": "v1"
}
