DeepSeek LLM 7B and 67B: A Technical Roadmap Analysis
This article explores the first-generation DeepSeek LLM series (7B and 67B), detailing its open-weight licensing, architecture, and training pipeline. It provides practical guidance on model selection, VRAM and KV Cache estimation, private deployment infrastructure, fine-tuning strategies, and compliance to help developers effectively integrate these models into their local environments.
1. Background and Licensing Boundaries
DeepSeek LLM is a general-purpose large language model series developed by the DeepSeek team. Its first generation was publicly released in late November 2023, offering two specifications: 7 billion (7B) and 67 billion (67B) parameters. Each specification includes both a Base model and a Chat model. In January 2024, the team published an accompanying technical report disclosing key information about training data scale, architectural configurations, and alignment methods.
A common misconception must be clarified first: this version is “open weight,” not “fully open source.” While the model weights can be downloaded and run locally, the training data, complete training code, and data cleaning pipeline are not fully public. The model code is released under a permissive open-source license, but the weights are subject to a separate model license agreement that includes commercial terms and usage restrictions. Enterprises should read the license text line by line before adoption to confirm commercial scope, prohibited uses, and attribution requirements. Misinterpreting “open weight” as “unconditionally free to use” is a primary source of compliance risk.
2. Choosing Between 7B and 67B
The dual-spec layout covers two distinct categories of needs. The 7B model targets resource-constrained scenarios; inference can be completed on a single high-VRAM GPU, and it can run on even lower configurations after quantization. It is suitable for individual developers, academic reproduction, and edge deployment. The 67B model is designed for scenarios where capability ceilings are prioritized, performing better in complex reasoning, knowledge QA, and long-context understanding, but it requires multi-GPU parallelism or high-VRAM servers.
The table below lists the main differences between the two specifications. The VRAM values refer only to model weights and do not include KV Cache, activations, and framework overhead.
| Dimension | 7B | 67B |
|---|---|---|
| Weight VRAM (FP16) | ~14GB | ~134GB |
| Weight VRAM (INT4) | ~3.5GB | ~33.5GB |
| Common Deployment | Single-GPU inference | Multi-GPU tensor parallelism |
| Fine-tuning Method | Single-GPU parameter-efficient fine-tuning | Multi-node distributed training |
| Use Cases | Domain fine-tuning, rapid experiments, edge deployment | High-quality base model, distillation teacher, complex tasks |
When selecting a model, parameter size should not be the only factor. Inference cost, VRAM usage, and deployment complexity all scale with size. If your business is latency-sensitive, budget-constrained, or requires frequent iterations, the 7B model is usually more appropriate. If tasks involve long-chain reasoning, intensive domain knowledge, or high answer quality requirements, the 67B model’s benefits may justify the additional hardware investment. Regardless of the chosen tier, you should first evaluate the model with real samples from your target business before finalizing compute planning.
3. Architecture and Training Pipeline
The series employs a Decoder-only Transformer architecture, the standard structure for most modern generative language models. The two specifications differ in the number of layers, hidden dimensions, and attention mechanisms. The 7B model uses standard Multi-Head Attention (MHA), while the 67B model uses Grouped-Query Attention (GQA) to reduce KV Cache footprint during inference. Both specifications feature a 4K token context window, a common configuration for open-source models at the time.
The tokenizer uses a byte-level BPE scheme with a vocabulary size of approximately 100,000. Byte-level tokenization can handle arbitrary characters, ensuring that Chinese, English, and code are stably segmented without encountering out-of-vocabulary characters.
During the pretraining phase, the model underwent autoregressive training on approximately 2 trillion tokens of text. The corpus covered web pages, books, code, math, and academic content. The data was deduplicated, quality-filtered, and stripped of harmful content before training. The product of pretraining is the Base model, which excels at text continuation but cannot reliably understand instructions.
The Chat model completes a two-stage alignment on top of the Base model. The first stage is Supervised Fine-Tuning (SFT), using manually constructed or filtered instruction and response data to teach the model to answer instructions and maintain multi-turn conversations. The second stage is preference optimization, training the model via pairs of good and bad responses to favor outputs that are more helpful, honest, and harmless.
For selection: if your goal is domain-specific secondary pretraining or deep customization, you should start from the Base model to retain maximum tuning space. If your goal is to quickly build a Q&A or assistant application, using the Chat model directly shortens the development cycle. Both types of weights are openly available to cover these two needs.
4. VRAM and KV Cache Estimation
Weight VRAM can be directly calculated from the parameter count and data type. FP16 takes 2 bytes per parameter, so the 7B model requires about 14GB and the 67B model about 134GB. INT8 takes 1 byte per parameter, and INT4 takes about 0.5 bytes.
Actual inference also requires KV Cache. It stores the keys and values for each layer, scaling linearly with sequence length and batch size. The calculation formula is as follows:
KV Cache Bytes = batch × seq_len × num_layers × 2 × KV_dim × bytes_per_element
Where “2” represents one copy each for keys and values. For MHA, the KV dimension equals the hidden dimension. For GQA, the KV dimension equals the number of KV heads multiplied by the head dimension.
For example, the 7B model uses MHA with 30 layers and a hidden dimension of 4096. At a 4K sequence length, batch size 1, and FP16 precision, the KV Cache is approximately:
1 × 4096 × 30 × 2 × 4096 × 2 bytes ≈ 2.0GB
The 67B model uses GQA with 95 layers, 8 KV heads, and a head dimension of 128, making the KV dimension 1024. Under the same conditions, the KV Cache for a single 4K sequence is approximately:
1 × 4096 × 95 × 2 × 1024 × 2 bytes ≈ 1.6GB
Thus, although the 67B model has more layers, GQA significantly compresses the KV Cache. As the batch size increases, the KV Cache scales proportionally and can easily become a VRAM bottleneck. Therefore, determine target concurrency and context length before deployment, then calculate the total VRAM required.
In engineering, two methods are commonly used to reduce VRAM usage. First, tensor parallelism, which splits the 67B model across multiple GPUs. Second, quantization, using INT8 or INT4 inference precision to compress weight VRAM to one-half or one-quarter of FP16. Quantization introduces some quality loss, so it should be validated on your own evaluation set before going live.
5. Licensing Compliance and Data Security
Private deployment keeps data within the local environment, which is particularly important for data-sensitive industries like finance, healthcare, and government. However, “running locally” does not mean “no obligations.” Enterprises must still adhere to the following requirements:
First, verify the commercial scope, user scale limits, and prohibited uses in the model license, and retain version records of the license text.
Second, conduct compliance audits on training and fine-tuning data. If uploaded business data contains personal information, it must be desensitized first, and data usage authorization must be confirmed.
Third, comply with regional and industry regulatory requirements, such as data classification, logging retention, and algorithm filings. Requirements vary significantly by region and industry and should be confirmed by legal or compliance teams.
Fourth, establish moderation and fallback mechanisms for model outputs. Open-source models may generate inaccurate or inappropriate content, so user-facing services require filtering and human review.
6. Infrastructure for Private Deployment
Deployment can typically be broken down into several modules, each implementable using general cloud computing capabilities without building infrastructure from scratch.
- Compute Resources: Select GPU instances based on VRAM requirements. The 67B model requires instances with multi-GPU interconnectivity.
- Container Orchestration: Use a container platform to host inference services, supporting elastic scaling and rolling updates.
- Object Storage: Store model weights, fine-tuning data, and intermediate artifacts, with access controls and version management.
- Task Scheduling: Use message queues to handle asynchronous fine-tuning and evaluation tasks, preventing peak-period congestion in online services.
- Monitoring & Alerting: Collect VRAM usage, throughput, time-to-first-token (TTFT), and error rates, setting threshold alerts.
- Logging Services: Record requests and responses for debugging and compliance audits, while ensuring sensitive information in logs is desensitized.
The selection of these modules should align with the team’s existing tech stack. Teams without ready-made operations capabilities can start by running the workflow on a single machine or a few instances before scaling up gradually.
7. Fine-tuning Strategies and Data Engineering
Fine-tuning methods are primarily divided into two categories. Full-parameter fine-tuning offers the highest performance ceiling, but for the 67B model, it demands significant VRAM and compute, typically requiring multi-node, multi-GPU setups and distributed training frameworks. Parameter-Efficient Fine-Tuning (PEFT), such as Low-Rank Adaptation (LoRA), trains only a small number of additional parameters; the 7B model can be fine-tuned on a single GPU, making it a common choice for small and medium-sized teams.
Fine-tuning effectiveness depends primarily on data quality, followed by data quantity. The following principles are recommended:
- Prioritize instruction diversity, covering task types like classification, extraction, rewriting, reasoning, and multi-turn dialogue.
- Strictly deduplicate to prevent overfitting caused by repeated samples.
- Desensitize samples, removing personal information such as names, phone numbers, and ID numbers.
- Filter out low-quality samples, such as irrelevant answers, formatting errors, or factual inaccuracies.
- Retain an independent test set for evaluation; test samples must not enter the training set.
A common instruction fine-tuning sample can be formatted as follows:
{"instruction": "Summarize the key points of the following text", "input": "...", "output": "..."}
Here, instruction describes the task, input provides the content to be processed, and output is the expected response. input can be empty, indicating a pure instruction task. The required sample volume depends on task difficulty. For classification or extraction tasks with fixed formats, a few thousand high-quality samples may suffice. For open-ended dialogue, more data and more rigorous quality control are usually necessary.
8. Evaluation and Iteration Loop
Before launch, an evaluation set covering both general and domain-specific capabilities should be established. General capabilities can reference public benchmarks, while domain capabilities require real questions written by business teams. Automated metrics are suitable for large-scale screening but have limited ability to judge semantic quality; therefore, they should be combined with human review to sample-check the accuracy, completeness, and safety of responses.
After launch, log bad cases—samples where the model answers incorrectly, refuses inappropriately, or generates harmful content. The team should analyze these samples, supplement training data, re-fine-tune, re-evaluate, and finally decide whether to release. This continuous loop of “data supplementation, fine-tuning, evaluation, release” is the foundation for sustained model improvement.
9. Conclusion
The value of the first-generation DeepSeek LLM lies in providing a clear technical roadmap through its dual specifications (7B and 67B), dual versions (Base and Chat), and open-weight combination. Its training pipeline, alignment methods, and deployment approaches are highly informative. For developers, understanding this generation of models hinges on three points: selecting the specification based on VRAM and concurrency needs, choosing between Base and Chat models based on business goals, and integrating licensing compliance as the first step of deployment. Mastering these methods provides a solid basis for evaluating other open-source models and building applications securely in local environments.
