Deploying a 2.8T Parameter Open-Weight Model Locally: Calculate the Resource Requirements First
This article provides a comprehensive guide on the resource requirements for locally deploying a 2.8 trillion parameter open-weight model. It covers verifying model specifications, understanding Mixture of Experts (MoE) sparse structures and memory formulas, downloading and verifying shards, reviewing licensing checklists, running a resource checking script, and comparing self-hosting with cloud API options to help you make informed infrastructure decisions.
1. Verify Model Information and Specifications
The first step in deploying an open-weight model is to review the official model card. The parameter figures referenced in this article (total parameters ~2.8T, active parameters per token ~104B, ~896 routed experts, 16 selected per token, 2 shared experts, ~93 network layers, ~100k token context) are based on public sources. Different versions may have different numbers, so please verify against the official documentation before use.
The total repository size is approximately 1.56TB. This figure is directly related to weight precision. If weights are stored with 4-bit quantization, the theoretical value for 2.8T parameters is about 1.4TB, which is close to the 1.56TB order of magnitude. The difference may stem from quantization scaling factors, unquantized layers, and metadata. For exact precision and file composition, refer to the model card and file manifest. All capacity calculations in this article use decimal units, where 1TB equals 10^12 bytes.
2. Sparse Structure: Total Parameters Determine Storage, Active Parameters Determine Per-Step Computation
MoE models place the majority of their parameters across multiple expert networks, with each token only invoking a subset. Based on public figures, a single token activates about 104B parameters, which is approximately 3.7% of the total. The computation per step is comparable to a dense model with tens of billions of parameters, but the knowledge capacity is determined by the total parameters, far exceeding that of a dense model with equivalent computation.
The model includes about 896 routed experts, selecting 16 per token, alongside 2 shared experts that always participate in computation. Shared experts typically handle general capabilities, while routed experts gradually develop domain preferences during training.
During deployment, it is crucial to distinguish between two aspects:
- Storage: Weights require VRAM. If all weights are placed in VRAM, the memory footprint is primarily determined by the total number of parameters and the bytes per parameter. If an offloading strategy is used, some weights are stored in system memory or disk, requiring reads from slower storage during runtime.
- Computation: The speed per step is determined by the number of active parameters, expert routing, inter-GPU communication, and VRAM bandwidth. When experts are distributed across multiple GPUs, token routing triggers cross-GPU communication, with overhead scaling according to the number of GPUs.
Based on this, VRAM requirements can be estimated using the following formula:
VRAM Requirement ≈ Weight Bytes + KV Cache + Activations and Framework Overhead
Where:
- Weight Bytes = Total Parameters × Bytes per Parameter
- KV Cache depends on the number of layers, KV heads, head dimension, context length, concurrency, and cache precision. The formula is: 2 × Number of Layers × KV Heads × Head Dimension × Context Length × Concurrency × Bytes per Element. This article does not list public KV heads or head dimensions, which must be read from the model configuration file (e.g.,
config.json). - Activations and Framework Overhead are typically reserved as a percentage of available VRAM. The script in this article reserves 15%.
| Weight Precision | Bytes per Parameter | Theoretical Weight Footprint for 2.8T Params |
|---|---|---|
| BF16 / FP16 | 2 | ~5.6 TB |
| FP8 | 1 | ~2.8 TB |
| 4-bit | 0.5 | ~1.4 TB |
The figures in the table represent the theoretical values for weights only and do not include the KV cache, activations, framework overhead, or quantization scaling factors. The actual footprint will be higher.
Taking 4-bit weights as an example: placing 1.4TB of weights on a single 80GB GPU, with 15% reserved, leaves about 68GB usable per card. It requires at least 21 GPUs just to store the weights, excluding the KV cache. This estimate assumes uniform weight distribution. In reality, expert partitioning may not be uniform, requiring additional buffer. If insufficient GPUs are available, switching to system memory or disk offloading will significantly reduce throughput. The exact drop depends on hardware and offloading methods and requires empirical testing.
3. Sharded Download and Verification
Prepare the following four items before downloading:
- Disk Free Space: Reserve at least 1.2 times the repository size for temporary files and format conversion. For 1.56TB, you need approximately 1.9TB of available space.
- Index Files: Confirm the presence of sharded index files (e.g.,
model.safetensors.index.json) in the repository and note the total number of shards. - Download Tool: Use a tool that supports resume on interruption. Concurrency should not be too high and should be reduced further on unstable networks.
- Hash Manifest: Confirm that the publisher provides a
SHA256SUMSor similar manifest. Without an official manifest, do not rely solely on locally generated hashes to verify file integrity.
Download example (using Hugging Face format as an example. Command names may vary by tool version, refer to your version’s help info):
huggingface-cli download <organization_name>/<model_name> --local-dir ./model --max-workers 4
Verification command:
cd ./modelsha256sum -c SHA256SUMS.txt
Verification passes only if all lines show OK. If FAILED appears, only redownload the corresponding shard instead of redownloading the entire repository. Verification only proves the file matches the publisher’s manifest; it does not guarantee the model’s behavior is safe or as expected.
4. License Review Checklist
Before downloading, verify the following items and submit them for legal review:
- Is commercial use permitted?
- Is redistribution of weights permitted?
- Is publishing after fine-tuning based on the weights permitted?
- Are there use-case restrictions or prohibited clauses, such as specific industries or regions?
- Is attribution required, or must the license text be included?
- Are there threshold conditions regarding user scale, revenue, etc.?
- Can model outputs be used to train other models?
- Are the licenses of dependencies like inference frameworks and tokenizers compatible?
- Is the license version consistent with the model card?
License terms may be updated; refer to the publisher’s latest version.
5. Resource Checking Script
The following script reads the model directory and weight precision to check disk free space. If PyTorch is installed and CUDA devices are detected in the environment, the script will also estimate the required number of GPUs.
Save as check_resources.py:
import mathimport shutilimport sysfrom pathlib import PathTOTAL_PARAMS = 2.8e12 # Total parameters, from public info, refer to model cardACTIVE_PARAMS = 104e9 # Active parameters per tokenREPO_GB = 1560 # Repository size in GB (decimal)DISK_MARGIN = 1.2 # Disk free space multiplierRESERVE_RATIO = 0.15 # VRAM reserve ratio for KV cache, activations, and frameworkdef dir_size_gb(path: Path) -> float:return sum(p.stat().st_size for p in path.rglob("*") if p.is_file()) / 1e9def check_disk(model_dir: Path) -> None:probe = model_dir if model_dir.exists() else model_dir.parentfree_gb = shutil.disk_usage(probe).free / 1e9need_gb = REPO_GB * DISK_MARGINstatus = "Sufficient" if free_gb >= need_gb else "Insufficient"print(f"Disk available: {free_gb:,.0f} GB, recommended at least: {need_gb:,.0f} GB, result: {status}")if model_dir.exists():print(f"Model directory currently occupies: {dir_size_gb(model_dir):,.1f} GB")def check_gpu(weight_gb: float) -> None:try:import torchexcept ImportError:print("Torch not installed, skipping GPU check")returnif not torch.cuda.is_available():print("No CUDA devices detected, can only use CPU or offloading")returnper_card = [torch.cuda.get_device_properties(i).total_memory / 1e9for i in range(torch.cuda.device_count())]card_gb = min(per_card)usable = card_gb * (1 - RESERVE_RATIO)cards = math.ceil(weight_gb / usable)print(f"Visible GPUs: {len(per_card)}, minimum single-card VRAM: {card_gb:.0f} GB")print(f"At least {cards} cards of the same model are required for weights alone (reserved {RESERVE_RATIO:.0%})")if cards > len(per_card):print("Result: Insufficient GPUs, need to offload to memory or disk, throughput will drop significantly")else:print("Result: GPU count meets weight requirements, still need to test KV cache and concurrency empirically")def main() -> None:model_dir = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("./model")bits = int(sys.argv[2]) if len(sys.argv) > 2 else 4weight_gb = TOTAL_PARAMS * bits / 8 / 1e9print(f"Active parameter ratio: {ACTIVE_PARAMS / TOTAL_PARAMS:.1%}")print(f"Theoretical weight footprint ({bits}bit): {weight_gb:,.0f} GB")check_disk(model_dir)check_gpu(weight_gb)if __name__ == "__main__":main()
Execution:
python check_resources.py ./model 4
The second argument is the number of bits for weight precision, which can be changed to 8 or 16 for comparison.
6. Self-Hosted vs. Cloud API
| Dimension | Self-Hosted Deployment | Cloud API |
|---|---|---|
| Cost Structure | High fixed costs, including GPUs, datacenter space, power, and operations | Pay-as-you-go, no upfront investment |
| Cost per Token | Potentially lower with high device utilization | Usually more cost-effective at lower usage volumes |
| Latency and Throughput | Controllable, depends on cluster size | Affected by network and provider queuing |
| Data Location | Data stays in internal environment | Need to evaluate provider’s data processing agreements |
| License Responsibility | User directly complies with the license | Some obligations borne by the provider, but Terms of Service still need review |
| Maintenance Effort | Requires dedicated personnel for inference services, monitoring, and upgrades | Essentially maintenance-free |
| Model Controllability | Can be fine-tuned, versions can be freely replaced | Restricted to model versions provided by the vendor |
If your request volume is stable and high, or data is sensitive or requires fine-tuning, you can evaluate a self-hosted solution. If request volume fluctuates significantly or your team lacks inference service operations experience, it is recommended to first validate results with an API before deciding whether to migrate.
7. Common Issues and Errors
How to estimate VRAM?
Calculate the three components—weights, KV cache, and overhead—using the formula in Section 2, then confirm with empirical results from running the script.
How to download shards?
Prepare disk space according to Section 3, use a tool with resume capability to download, and verify each shard using the publisher’s hash manifest.
What to watch out for in the license?
Focus on verifying four items: commercial use, redistribution, publishing after fine-tuning, and use-case restrictions. If any item is unclear, have legal review it before going live.
What are common errors?
- Treating the active parameter count as the VRAM requirement, ignoring that total parameters need to be fully stored.
- Ignoring that the KV cache grows with context length and concurrency.
- Insufficient disk space, causing downloads or format conversions to fail midway.
- Loading weights without verifying hashes.
- Inferring precision based solely on repository size or parameter count without checking the model card.
Before the resource bill is calculated clearly, do not rush to purchase hardware or sign long-term contracts. First use the script to confirm disk and GPU conditions, then test actual latency and throughput with small-scale requests, and finally make a choice based on usage and compliance requirements.
