EN ▾

Uncensored API, prepaid credit, crypto only.

Get your key

Can You Run This LLM? VRAM Math and API Alternative

To answer whether you can run this LLM at home, you need three numbers: the parameter count, the precision it is stored in, and the context length you want. This article shows the arithmetic, with examples you can adapt to any model.

Last updated

GPU card beside a glass memory gauge and a distant server tower, comparing local hardware with a hosted API

The short answer

Whether you can run a given model comes down to memory. The model weights must fit in the memory that your processor reads fast: GPU memory (VRAM) for good speed, system RAM for slow but possible. On top of the weights you need room for the conversation, called the KV cache, and a bit of working space. If the total is less than your memory, you can run it. If it is far more, you cannot, or only at a crawl.

A note on "this LLM": the model behind our API is a single open-weight model run by an independent provider, and we do not publish its parameter count or weights here. The method below works for any model: find its parameter count on the model card and plug it in.

Use this order when you check a model: first the weights, then the context you really need, then the speed you can accept. A model that fits only with a 2,000-token context is rarely useful for chat, so decide on the context first and size the hardware around it.

Memory for the weights

The formula is simple: bytes = parameters x bits per weight / 8. Precision sets the bits: 16 for the original half-precision format, 8 or 4 for quantized versions that trade some quality for size.

Parameters16-bit8-bit4-bit
7B14 GB7 GB3.5 GB
13B26 GB13 GB6.5 GB
34B68 GB34 GB17 GB
70B140 GB70 GB35 GB

These are weights only. Real quantized files run slightly larger than the formula because some layers stay at higher precision, so add 5 to 10 percent. Mixture-of-experts models need a special note: all the experts must sit in memory even though only a few are active for each token. Memory scales with total parameters, while speed scales with the active ones.

Memory for the context

Each token in the conversation adds keys and values to a cache for every layer. The size per token is 2 x layers x KV heads x head dimension x bytes per value. Take a typical 7B to 8B model with 32 layers, 8 KV heads, a head dimension of 128 and 16-bit values:

  • Per token: 2 x 32 x 8 x 128 x 2 bytes = 131,072 bytes, or 128 KiB.
  • At 8,000 tokens: about 1.05 GB.
  • At 100,000 tokens: about 13.1 GB.

Those figures vary with the architecture, so read the model's config file for its layer and head counts. The lesson is general: a long context can cost as much memory as a whole small model. Many local setups cap the context at 4,000 to 16,000 tokens to stay in budget. Our hosted window is 100,000 tokens for prompt plus completion.

A quick budget for a 7B model at 4-bit with an 8,000-token context: 3.5 GB + 1.05 GB + about 1 GB of overhead is roughly 5.5 GB, which fits a mainstream gaming GPU. A 70B model at 4-bit needs 35 GB for the weights alone, which means a high-end workstation card or several cards.

Speed: bandwidth sets the ceiling

To produce one token, the processor reads nearly all the active weights from memory. So an upper bound on speed is memory bandwidth divided by the bytes read per token.

  • A GPU with 1,000 GB/s of bandwidth and a 4 GB model: up to about 250 tokens per second.
  • The same 4 GB model on a desktop with roughly 80 GB/s of system memory bandwidth: up to about 20 tokens per second.
  • A 35 GB model on that desktop: about 2 tokens per second, which is too slow for chat.

Real speed lands below these ceilings, because of compute, software overhead and long contexts that need extra reads. Reading the first prompt (prefill) is compute-heavy and takes extra seconds on a weak card with a long prompt. If you run on CPU only, expect the lower numbers and keep to small, quantized models.

A rough way to test your own machine before downloading anything: look up the memory bandwidth of your GPU or system memory, divide it by the file size of the quantized model, and treat the result as a ceiling. If it is under 10 tokens per second, chat will feel slow. If the model does not fit in VRAM and spills into system RAM, the slower memory sets the speed for the spilled part, which is why partial offloading often disappoints.

When a hosted API is more practical

Local is right when privacy rules forbid sending data out, when you want to experiment with weights, or when you already own the hardware. A hosted API is more practical when:

  • the model you want does not fit your memory, or fits only with a small context;
  • your laptop would be busy and hot for every request;
  • you need several parallel requests, which a single local setup serves poorly;
  • you only run a few million tokens a month, which rarely pays for a GPU.

Put a number on it. At $0.15 per 1M input tokens and $0.50 per 1M output tokens, generating 100M output tokens costs $50, and reading 100M input tokens costs $15. Compare that with the price of the hardware you would need and the power it uses, and decide where your break-even sits. A casual user rarely reaches it.

Try the API for the same task

If the arithmetic says no to local, or you simply want the result today, point an OpenAI client at the hosted endpoint. This is a complete request:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmwithnorestrictions.com/v1",
    api_key=os.environ["API_KEY"],
)

r = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Explain KV cache in three sentences."}],
)
print(r.choices[0].message.content)
print(r.usage)

Sign up on the API key page and claim the $0.50 trial credit, which needs no card and lasts 7 days. The documentation covers streaming, tools and limits, and the pricing page lists the top-up options. For a primer on how filter-free text APIs are used, see How to Use a No Filter LLM API.

The service is text only and has a hard rule against sexual content involving minors. Failed or refused requests are not charged, and credit never expires.

Common questions

How much VRAM do I need to run a 7B model?

About 14 GB at 16-bit, 7 GB at 8-bit and roughly 3.5 GB at 4-bit for the weights, plus the KV cache and some overhead.

Can I run an LLM on CPU only?

Yes, with small quantized models. Speed is limited by system memory bandwidth, so expect a few to a few dozen tokens per second.

Does a bigger context window need more memory?

Yes. The KV cache grows linearly with the number of tokens, and at 100,000 tokens it can reach well over 10 GB for a 7B-class model.

Can I download the model behind your API?

We do not publish its size or weights on this site. The API is the supported way to use it.

Unlock your API key

Register, copy the key, and update your base URL. Complete setup.