Tag: AI

Email Keep-Alive Procedure-Tongyi Qianwen

·5079 words·11 min read

This article introduces the method of implementing the mailbox keep-alive program through Tongyi Qianwen, and gives detailed code examples....

KV Cache

·2909 words·6 min read

This article introduces the importance of KV Cache in LLM (Large Language Model). It is a key step in accelerating operations to ensure that the inference speed is not affected when the input text grows during the conversation. The article explains the Self Attention mechanism and the concept of causal mask in detail, and discusses how KV Cache optimizes the prediction process by caching calculation results....

The difference between BatchNorm and Dropout in training and testing

·2003 words·5 min read

This article explores the differences between BatchNorm and Dropout during the training and testing phases, and explains their respective roles. BatchNorm calculates the global mean and variance through sliding average, which is used to speed up numerical stability and accelerate the training process. At the same time, it retains these parameters for use during the testing phase. Dropout randomly freezes neuron output during the training process to reduce overfitting, and scales the output results by 1-r times during testing to ensure the stability of the activation function input. The article also points out that the essence of Dropout is the idea of ​​Bagging, which reduces the variance of the model by randomly selecting different neurons....

DIN model

·4951 words·11 min read

This article introduces the DIN model, which uses an attention mechanism to measure the relevance of each item in a user's history to the target item. The article elaborates on the principles of DIN, the computation method of the attention mechanism, strategies for initializing model parameters, and approaches to addressing cold-start and data imbalance issues....

Common PEFT method principles

·5175 words·11 min read

This article discusses LLM model fine-tuning methods trained on large-scale general data sets, especially how to adapt to specific tasks through methods such as adapters, prefixes, and prompts. In particular, the low-rank adaptive (LoRA) technology proposed by Microsoft is introduced. This method reduces the amount of calculations by decomposing the update matrix into the product of two low-rank matrices, and achieves similar effects to full fine-tuning. The article also discusses the specific principles, applications and challenges of LoRA....