Deploying Open-Weight MoE Models Locally: How to Estimate VRAM and Check License Terms
Many open-weight Mixture-of-Experts (MoE) models are now available for local deployment, but knowing whether a model "can be downloaded" is very different from knowing whether it "can be deployed and used commercially." This article explains the key differences between total and activated parameters, shows how to calculate weight size and KV cache memory requirements with worked examples, and provides a practical checklist for reviewing license terms before production use.
1. Distinguish “Downloadable” from “Deployable and Commercially Usable”
Once weights are released, you can run inference on your own servers or private cloud, and you can fine-tune the model. But each of these activities has a different threshold. Hardware determines whether the model fits into VRAM, the license determines whether your use is legal, and benchmarking determines whether quality and speed are acceptable. These three factors are independent — meeting one does not guarantee the others.
The license text is the only authoritative source; the fact that you have already downloaded the weights does not substitute for a compliance check. This article provides technical estimation and verification methods only, and does not constitute legal advice. For commercial use, redistribution, or releasing derivative models, always defer to the original license text and consult legal counsel when necessary.
2. Understanding the Numbers: Total vs. Activated Parameters
Model documentation typically presents two sets of figures. Total parameters are the count of all weights, which determines how much VRAM the weights occupy. Activated parameters are the number of parameters actually involved in the forward pass for each token, which mainly affects compute volume and memory-access speed.
The following table uses hypothetical numbers to demonstrate the calculations. Before deploying, replace them with the values from the official model card and verify against the model’s bundled configuration file.
| Metric | Example Value | Meaning |
|---|---|---|
| Total parameters | ~2.8 trillion | All weights; sets the lower bound of weight VRAM |
| Activated parameters per token | ~104 billion | Parameters actually used in a single forward pass |
| Total experts | 896 | Expert subnetworks available for routing |
| Routed experts per token | 16 | Experts selected for each token |
| Shared experts | 2 | Experts every token passes through |
With these example numbers, the activation ratio is roughly 3.71%. This ratio only means the per-token compute is small. Before routing happens, there is no way to predict which experts will be selected, so the weights of all experts must reside in accessible memory. A lower activation ratio reduces compute, not memory proportionally. Interpreting “3.7% activated” as “only 3.7% VRAM needed” is a common and costly deployment mistake.
3. Converting Weight Size and VRAM Requirements
Total VRAM demand consists of four parts: model weights, KV cache, activations and intermediate buffers, and runtime overhead (inference framework, CUDA context, communication buffers, etc.). The weight size can be calculated directly:
Weight size = Total parameters × bytes per parameter (decimal, 1 GB = 10^9 bytes)
| Precision | Bytes per Parameter | Weight Size | Theoretical Minimum 80GB GPUs | Theoretical Minimum 141GB GPUs |
|---|---|---|---|---|
| BF16 / FP16 | 2 | ~5,600 GB | 70 | 40 |
| FP8 | 1 | ~2,800 GB | 35 | 20 |
| INT4 / FP4 | 0.5 | ~1,400 GB | 18 | 10 |
The GPU counts in the table account for weights only and represent a theoretical lower bound. Procurement planning must also add KV cache, activations, framework overhead, and headroom. These figures should not be used directly as procurement numbers.
As an example, a single 8-GPU node with 141GB per card provides about 1,128GB of total VRAM. That cannot fit 1,400GB of INT4 weights, let alone 2,800GB of FP8 weights. Even ignoring the KV cache, such configurations require multi-node parallelism.
Estimating the KV Cache
KV cache bytes ≈ 2 × number of layers × number of KV heads × head dimension × context length × concurrency × bytes per element
The factor of 2 accounts for the K and V caches. Three structural parameters are read from config.json:
- Number of layers: the num_hidden_layers field.
- Number of KV heads: the num_key_value_heads field. If absent, under standard multi-head attention it usually equals num_attention_heads.
- Head dimension: the head_dim field. If absent, estimate it as hidden_size ÷ num_attention_heads.
Worked example: assume 60 layers, 8 KV heads, head dimension 128, context length 32,768, concurrency 16, and BF16 cache (2 bytes per element):
2 × 60 × 8 × 128 × 32768 × 16 × 2 ≈ 128.8 GB
If the model uses Multi-head Latent Attention (MLA) or compressed attention, the cache layout differs and the config fields differ as well (e.g., kv_lora_rank, qk_rope_head_dim). Such architectures do not fit the formula above; rely on measured results from your inference framework.
Offloading weights to system memory can alleviate VRAM shortages, but latency and throughput usually degrade significantly — benchmark to confirm whether the trade-off is acceptable. In multi-node deployments, communication between experts traverses the inter-node network, so throughput is limited by interconnect bandwidth.
4. License Review Checklist
Download rights do not equal usage rights. Open-weight licenses may impose different restrictions on use cases, redistribution, and derivative models. The following table lists the items to verify one by one:
| Review Item | Questions to Confirm | Where to Check |
|---|---|---|
| Scope of use | Are personal, research, and commercial uses permitted? | Grant / scope-of-use clauses in the license |
| Commercial restrictions | Are there user-count, revenue, or industry restrictions? Is separate authorization required? | Restriction clauses in the license |
| Redistribution | Can weight files be shared? What license texts and notices must accompany them? | Redistribution clauses |
| Derivative models | Can fine-tuned or distilled models be released or used commercially? Do they inherit the same license? | Derivative works clauses |
| Output usage | Can generated content be used in commercial products? Are there prohibited uses? | Output and use-case clauses |
| Attribution and notices | Is model source attribution required? Must copyright notices be retained? | Attribution clauses |
| Usage policy | Are there prohibited domains? Does violation terminate the license? | Acceptable use policy and termination clauses |
| Patent terms | Does the license include a patent grant? What is its scope and termination conditions? | Patent clauses |
How to verify: go through the original license text clause by clause. Summaries in the model card and README are only leads and cannot replace the original text. Licenses vary considerably across models, and this table is no substitute for reviewing the specific license.
5. From Reading the Config to Small-Scale Validation
- Read config.json and record the number of layers, KV heads, head dimension, maximum context length, vocabulary size, and attention architecture type.
- Calculate weight size and KV cache using the formulas in Section 3, listing VRAM requirements for each precision and concurrency level.
- Choose an inference framework (e.g., vLLM, SGLang, or TensorRT-LLM), confirm it supports the model architecture and quantization format, and pin the framework version.
- Run a small-scale trial on a single machine. Start with short context and low concurrency to confirm the model loads and produces reasonable output.
- Gradually increase context length and concurrency, recording VRAM usage, time-to-first-token, and tokens per second at each step.
- When you hit out-of-memory (OOM) errors, troubleshoot in this order: first reduce concurrency or context length, then switch to a lower precision, then consider memory offloading, and only finally multi-node parallelism. Change one variable at a time and record results before and after.
- Compare output quality across precisions using your own test set. Quantization may degrade quality — speed and VRAM savings alone are not enough to judge usability.
Before deployment, confirm three things: VRAM suffices when weights, KV cache, and headroom are totaled; the original license text has been verified clause by clause; and quality, latency, and throughput from small-scale validation meet your business requirements.
