当前位置:网站首页>Prompt 范式简述
Prompt 范式简述
2022-07-02 06:26:00 【MezereonXP】
Prompt 范式简述
Traditional Framework:
- pre-train
- fine-tune
传统的训练框架为,先在一个大规模的数据集上对模型进行预训练,然后在目标任务的数据集上进行微调。
Prompt Framework
- pre-train
- prompt
- predict
Prompt框架则是分成三个部分,预训练,Prompt生成,以及预测
Goal: Let the pertained model itself can be used to predict the desired output without any task-specific training.
Prompt 本质上是对任务数据进行变换,将原本的目标、标签,做一个转换,融入到数据之中。
For example, the emotion label of the sentence “I won the game.” is good.
We can also get a longer sentence “I won the game, so I felt good.”
上述这个例子就是,将标签 good 转换成额外的语句,加到输入后面。
这样的变换使得,我们通过自然的自监督学习,就可以实现任务所需的目标
Prompt Basics
一般来说,Prompt 包含三个步骤:
- Prompt Addition
- Answer Search
- Answer Mapping
Prompt Addition
这一步其实是将输入进行修改
比如 [X] Overall, it was a [Z] movie 这样的形式
我们将输入填到 [X] 的位置,返回一整个语句,留出 [Z] 的位置,等待答案的填充。
Answer Search
z ^ = search z ∈ Z P ( f fill ( x ′ , z ) ; θ ) \hat z = \text{search}_{z\in \mathcal{Z}}P(f_{\text{fill}}(x',z);\theta) z^=searchz∈ZP(ffill(x′,z);θ)
如上述公式所示,在这一步,我们的目的是,填充最可能的答案。
Answer Mapping
将搜索到的答案和输出值进行匹配
也就是将填充完的答案,映射到最终的输出上,可能是标签,也可能直接就是对应的句子。
边栏推荐
- open3d学习笔记五【RGBD融合】
- Execution of procedures
- Faster-ILOD、maskrcnn_benchmark安装过程及遇到问题
- Traditional target detection notes 1__ Viola Jones
- 超时停靠视频生成
- [mixup] mixup: Beyond Imperial Risk Minimization
- 【深度学习系列(八)】:Transoform原理及实战之原理篇
- open3d环境错误汇总
- Solve the problem of latex picture floating
- Comparison of chat Chinese corpus (attach links to various resources)
猜你喜欢

Faster-ILOD、maskrcnn_ Benchmark installation process and problems encountered

Regular expressions in MySQL

【TCDCN】《Facial landmark detection by deep multi-task learning》

【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》

Timeout docking video generation

浅谈深度学习中的对抗样本及其生成方法

【雙目視覺】雙目矯正

Implementation of yolov5 single image detection based on pytorch

使用百度网盘上传数据到服务器上

【MagNet】《Progressive Semantic Segmentation》
随机推荐
【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
open3d学习笔记五【RGBD融合】
[CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video
Embedding malware into neural networks
Convert timestamp into milliseconds and format time in PHP
Execution of procedures
【C#笔记】winform中保存DataGridView中的数据为Excel和CSV
Faster-ILOD、maskrcnn_ Benchmark training coco data set and problem summary
用MLP代替掉Self-Attention
Faster-ILOD、maskrcnn_ Benchmark installation process and problems encountered
Open3D学习笔记一【初窥门径,文件读取】
What if a new window always pops up when opening a folder on a laptop
PHP returns the abbreviation of the month according to the numerical month
Label propagation
Nacos service registration in the interface
Comparison of chat Chinese corpus (attach links to various resources)
[multimodal] clip model
win10解决IE浏览器安装不上的问题
win10+vs2017+denseflow编译
Apple added the first iPad with lightning interface to the list of retro products