Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/693060a1-c630-8008-b36c-77d4e223ac3d
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{DISPLAYTITLE:Running large LLaMA models}} ''This conversation was exported from ChatGPT''<ref>{{cite web|title=Running large LLaMA models|url=https://chatgpt.com/share/693060a1-c630-8008-b36c-77d4e223ac3d|publisher=ChatGPT|access-date=2025-12-03}}</ref> == gpt-5-1-instant == === User: Say want to run a large llama model, how would I do that? === Say want to run a large llama model, how would I do that? === Assistant: If the aim is simply “run a large LLaMA-family model locally”, the workflow reduces to three constraints: hardware, mod… === If the aim is simply “run a large LLaMA-family model locally”, the workflow reduces to three constraints: hardware, model format, and runtime. The rest is plumbing. Below is a concise, technical roadmap that assumes you want something in the 70B–405B range, and want to do it sanely rather than via YouTube-grade “just install oobabooga”. ==== 1. Hardware constraints ==== ===== a. Consumer workstation (single GPU) ===== A single 24–48 GB GPU (4090, 5090, 4090D, etc.) is only realistic for: * 7B–13B full-precision / partial-precision * 30B with aggressive quantisation Anything above that runs, but only with offloading to CPU RAM → too slow for any latency-sensitive use. ===== b. Multi-GPU machine ===== You need NVLink or PCIe with enough bandwidth. For 70B: * 2× 80 GB A100/H100: full-precision feasible * 2× 48 GB RTX 6000 Ada: feasible with quantisation (Q4–Q5) For 405B: * 8× 80 GB (A100/H100) or more * Or a TPU/ML cloud ===== c. CPU-only ===== Using llama.cpp with quantised weights, you can run up to ~70B on high-end desktops with ~128–192 GB RAM, but with very low throughput (tokens/s in the low single digits). Useful for experimentation, not deployment. ==== 2. Model formats ==== LLaMA-style checkpoints usually exist in three practical forms: # Meta original format (consolidated.*.pth, params.json) Heavy, full-precision, used for training or high-end inference. # Transformers (HuggingFace) safetensors For GPU inference and multi-GPU setups. Good with TGI / vLLM. # GGUF (llama.cpp format) Best for local CPU/GPU hybrid and quantisation (Q2_K → Q8_K). Extremely convenient for 7B–70B. Pick the runtime first, then pick the model format accordingly. ==== 3. Runtimes ==== ===== a. vLLM ===== * Fastest for multi-GPU, continuous batching, long context. * Use if you have strong GPUs. * Supports most HF-format LLaMA models. * Example: <syntaxhighlight lang="bash">pip install vllm python -m vllm.entrypoints.openai.api_server \ --model meta-llama/Llama-3.1-70B-Instruct \ --tensor-parallel-size 2 </syntaxhighlight> ===== b. llama.cpp ===== * Most accessible. * CPU or mixed CPU/GPU. * Requires GGUF weights. * Example: <syntaxhighlight lang="bash">./llama-cli -m Llama3-70B.Q4_K_M.gguf -c 8192 --n-gpu-layers 35 </syntaxhighlight> ===== c. Text Generation Inference (TGI) ===== * Hugging Face’s production inference stack. * More “server-like”; supports shards, streaming. ===== d. KoboldCPP / LM Studio / Ollama ===== * Desktop-friendly abstraction layers over llama.cpp. * Suitable for consumer-grade GPUs and CPU offloading. ===== e. Direct PyTorch ===== * Only if you genuinely want to modify inference code. * Requires large GPUs. Minimal quantisation options. ==== 4. Step-by-step scenarios ==== ===== Scenario A: You have a single 4090 and want a 70B model ===== # Download a GGUF Q4_K_M quantised 70B. # Install llama.cpp. # Run with small number of GPU layers offloaded: <syntaxhighlight lang="bash">./llama-cli -m ./Llama-3.1-70B-Q4_K_M.gguf --n-gpu-layers 40 --ctx-size 4096 </syntaxhighlight> Expect ~4–10 tokens/s, depending on quantisation. ===== Scenario B: You have 2×80 GB H100 and want 70B full precision ===== # Install vLLM. # Pull HF weights in bf16. # Run distributed: <syntaxhighlight lang="bash">python -m vllm.entrypoints.openai.api_server \ --model meta-llama/Llama-3.1-70B-Instruct \ --tensor-parallel-size 2 </syntaxhighlight> You get 150–250 tokens/s. ===== Scenario C: You only have CPU but want to experiment with 70B ===== # Download a Q2_K or Q3_K GGUF. # Run llama.cpp CPU-only: <syntaxhighlight lang="bash">./llama-cli -m Llama-3.1-70B.Q2_K.gguf -t 14 </syntaxhighlight> You get ~1–2 tokens/s. ==== 5. What “large” means in 2025 ==== * 7B–13B: fully local on laptop * 30B–70B: local on gaming GPU or beefy desktop * 110B–405B: realistically only multi-GPU or cloud * >400B: cluster-only ==== 6. Latency & throughput expectations ==== Approximate for llama.cpp (GGUF): | Model | GPU | Quant | Speed | | ----- | ------------ | ----- | ------------ | | 13B | 4090 | Q4_K | 80–120 tok/s | | 34B | 4090 | Q4_K | 20–35 tok/s | | 70B | 4090 | Q4_K | 4–10 tok/s | | 70B | CPU | Q4_K | 1–2 tok/s | | 70B | 2×80 GB H100 | bf16 | 200+ tok/s | ==== If you want, I can give you: ==== * a minimal reproducible setup for your exact hardware; * a comparison of 70B quantised vs 405B quantised on your machine; * a containerised setup (Dockerfile + compose) for llama.cpp or vLLM; * a “what should I realistically run with your RAM/GPU?” calculator. Tell me your hardware, and I’ll tailor the steps. == References == <references /> [[Category:ChatGPT Shares]] [[Category:openai]]
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite web
(
edit
)
Module:Citation/CS1
(
edit
)
Module:Citation/CS1/COinS
(
edit
)
Module:Citation/CS1/Configuration
(
edit
)
Module:Citation/CS1/Date validation
(
edit
)
Module:Citation/CS1/Identifiers
(
edit
)
Module:Citation/CS1/Utilities
(
edit
)
Module:Citation/CS1/Whitelist
(
edit
)
Module:Citation/CS1/styles.css
(
edit
)