大模型finetuing

微调的定义

Fine-tuning(微调):通过特定领域数据对预训练模型进行针对性优化,以提升其在特定任务上的性能。

微调的核心原因

定制化功能:微调的核心原因是赋予大模型更加定制化的功能。通用大模型虽然强大,但在特定领域可能表现不佳。通过微调,可以使模型更好地适应特定领域的需求和特征。

参数高效微调(Parameter-Efficient Fine-Tuning, PEFT)

Prompt Tuning

Prompt tuning adds task-specific prompts to the input, and these prompt parameters are updated independently of the pretrained model parameters which are frozen.

Prefix Tuning

Prefix tuning prefixes a series of task-specific vectors to the input sequence that can be learned while keeping the pretrained model frozen. The prefix parameters are inserted in all of the model layers.

Lora

Low-Rank Adaptation (LoRA) is a PEFT method that decomposes a large matrix into two smaller low-rank matrices in the attention layers. This drastically reduces the number of parameters that need to be fine-tuned.

posted @ 2025-05-13 21:35  wsl-hitsz  阅读(18)  评论(0)    收藏  举报