第一财经

DeepSeek's Latest Paper: How to Make Large Models Run Faster? Authored by Leung Man-fung

原文:DeepSeek最新论文:如何让大模型跑得更快?梁文锋署名

Summary of Key Points

This news report highlights that the DeepSeek team, in collaboration with Peking University, has developed a large model inference acceleration framework called DSpark, which is designed to address the issue of slow text generation by large models. By employing innovative techniques such as semi-autoregression and speculative decoding, DSpark significantly enhances the model's generation speed. Both offline and online tests have shown impressive results, with user-side speeds increasing by 60%-85%. The framework and its underlying weights have been made open-source, allowing it to be adapted to other models like Alibaba’s Qwen. Despite recent rumors of financing, DeepSeek continues to prioritize open-sourcing as a means of driving industry progress.

Detailed Analysis

Why are large models slow at generating text?

The traditional method for large models to generate text is based on autoregression, which means that for each character or word generated, all previous content must be recalculated. For example, when writing an essay, you have to reread the entire previous sentence before proceeding with the next word, resulting in extremely low efficiency. This approach leads to two main problems: first, it overloads GPUs due to the inefficient use of hardware resources; second, it causes long waiting times for users, such as several seconds for a chatbot to respond to a message, which is particularly problematic in real-time dialogue and intelligent assistant applications that require rapid responses.

How does DSpark solve this?

DSpark combines two strategies to improve efficiency:

  • Semi-autoregression: Instead of generating one character at a time, it attempts to generate multiple characters simultaneously, reducing the amount of redundant calculations.
  • Speculative decoding with confidence scoring: A preliminary “draft model” is used to quickly generate a portion of the text, which is then checked by the main model. If the draft is correct, it is adopted; otherwise, it is revised. The length of the generated content is adjusted based on its complexity—more characters are guessed for simpler tasks and fewer for more complex ones (such as mathematical reasoning). This approach balances speed and accuracy.

How effective is DSpark?

The benefits of DSpark have been thoroughly verified in both offline and online tests:

  • Offline testing: In tasks involving mathematical reasoning, code generation, and casual conversations, DSpark produces higher-quality text compared to previous methods.
  • Online services: When applied to DeepSeek’s V4 model, user-generation speeds increased by 60%-85% even with the same number of users (for example, responses now take only 1.5-4 seconds instead of 10 seconds).
  • Cross-model compatibility: Tests on Alibaba’s Qwen models (with sizes of 4B, 8B, and 14B) showed an average improvement of 26%-30% compared to previous methods.

This indicates that DSpark is not a one-size-fits-all solution but can significantly speed up a wide range of large models.

Why is this significant?

The key to the practical application of large models lies in their ability to operate quickly and efficiently. The current focus in the large model industry has shifted from competing in terms of intelligence to demonstrating practical usefulness. Two critical factors are: improved user experience through faster response times and lower costs for businesses. DSpark not only accelerates model generation but also improves GPU utilization, allowing companies to reduce their hardware investment. By making the framework open-source, DeepSeek contributes to the advancement of the AI infrastructure, essentially providing a “speed booster” for all large models.

DeepSeek’s approach

DeepSeek is known for integrating both model development and related infrastructure. When releasing new models (such as V4), they also release inference optimization tools like DSpark, along with research papers and source code. Even though there are rumors of potential commercialization, this latest open-source initiative demonstrates their commitment to sharing technology. This strategy not only strengthens their reputation as a leading technology provider but also lays the foundation for future collaborations or potential monetization opportunities, as users become accustomed to using their free tools.

Conclusion

The introduction of DSpark represents a major breakthrough in making large models more efficient and practical. It not only enhances DeepSeek’s own services but also benefits the entire industry by promoting faster development and innovation.