Semantic Model Compression via Hash Search and Distillation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current pre-trained semantic models are overly large and complex, making them difficult to deploy in production environments, and existing compression techniques like model distillation and quantitative clipping are insufficient for improving processing speed.
Innovation Solution
A method that uses a hash search method to determine semantic result information for input vectors in an initial improved model, followed by training with a model distillation method to obtain a more efficient improved model, replacing complex iterative calculations with hash search and vector transformation processes, and using a teacher network to guide the learning of a student network for enhanced performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If pre-trained semantic models are used, then semantic processing capability is improved, but model size and calculation complexity increase
Solution Approach 1:
The patent segments the model into a teacher network and a student network. The teacher network contains the pre-trained semantic model with large parameters, while the student network is a simplified version with fewer parameters. Through knowledge distillation, the student network learns from the teacher network to achieve similar semantic processing capability with reduced complexity, resolving the contradiction between capability and model size.
Solution Approach 2:
The patent creates a copy of the pre-trained semantic model in the form of the student network. This student network is trained to replicate the essential semantic processing functions of the teacher network through knowledge distillation, achieving a simplified copy that maintains functionality while reducing computational complexity and model size.
2Productivity
If model distillation technique is used to compress models, then processing speed is improved, but compression ratio and parameter reduction are insufficient
Solution Approach 1:
The patent changes the parameter scale of the model by training the student network with fewer parameters than the teacher network. Through knowledge distillation, the student network optimizes its parameters to achieve high compression ratio while maintaining processing speed. This parameter transformation enables both high productivity and significant quantity reduction.
3Device complexity
If hash search method is used to determine semantic result information, then calculation complexity is reduced, but model training requirements increase
Solution Approach 1:
The patent applies preliminary action by pre-training the teacher network with the pre-trained semantic model before deploying the student network. The teacher network performs the complex semantic processing in advance, and the student network learns from these pre-computed results through knowledge distillation. This preliminary training phase reduces the calculation complexity during actual inference while managing training requirements through structured two-stage training.
Data Source
AI summary
Embodiments of a method and an apparatus for improving a model based on a pre-trained semantic model are provided. The method may include: based on the pre-trained semantic model, obtaining an initial improved model, where semantic result information of an input vector is determined in the initial improved model based on a hash search method; and based on a model distillation method, training the initial improved model to obtain an improved model. Some embodiments can obtain the semantic result information of the input vector by performing the hash search method on the input vector, replace the original complex iterative calculation process of a semantic model, and obtain the improved model with few model parameters and high compression ratio.


