Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon How does online quantization differ from delayed quantization in DeepSeek-V3


How does online quantization differ from delayed quantization in DeepSeek-V3


Online quantization in DeepSeek-V3 differs significantly from delayed quantization in several key aspects:

1. Dynamic Scaling Factors: Online quantization calculates scaling factors dynamically for each 1x128 activation tile or 128x128 weight block during training. This approach ensures that the quantization is tailored to the specific data being processed at each step, which helps minimize quantization errors and improves model accuracy[1][5].

2. Real-Time Adaptation: Unlike delayed quantization, which relies on historical maximum values to determine scaling factors, online quantization adapts in real-time. This means that the model can adjust to changing data distributions as training progresses, making it more robust and efficient[1][5].

3. Elimination of Historical Data Dependency: Delayed quantization typically requires storing historical data to determine the maximum values for scaling. In contrast, online quantization eliminates this need by calculating scaling factors on the fly, which simplifies the framework and reduces memory requirements[1][5].

4. Improved Accuracy: By dynamically adjusting quantization levels based on current data, online quantization can maintain higher precision and reduce errors associated with static or delayed quantization methods. This is particularly important in models like DeepSeek-V3, where maintaining precision is crucial for achieving state-of-the-art performance[1][5].

5. Simplified Training Process: Online quantization streamlines the training process by removing the need for pre-computed scaling factors. This simplification can lead to faster training times and reduced computational overhead compared to methods that require additional steps for quantization[1][5].

In summary, online quantization in DeepSeek-V3 offers a more adaptive, efficient, and accurate approach to quantization compared to delayed methods, which rely on pre-computed or historical data. This dynamic approach enhances the model's performance and simplifies its training process.

Citations:
[1] https://community.aws/content/2rJj1WkztSfYwVfsIibhWxeqMf1/four-unique-takeaways-from-deepseek-v3?lang=en
[2] https://creativestrategies.com/dispelling-deepseek-myths-studying-v3/
[3] https://www.nextplatform.com/2025/01/27/how-did-deepseek-train-its-ai-model-on-a-lot-less-and-crippled-hardware/
[4] https://stratechery.com
[5] https://fireworks.ai/blog/deepseek-model-architecture
[6] https://huggingface.co/docs/trl/main/dpo_trainer
[7] https://huggingface.co/deepseek-ai/DeepSeek-V3
[8] https://github.com/deepseek-ai/DeepSeek-V3/blob/main/README_WEIGHTS.md