当前位置:网站首页>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
将搜索到的答案和输出值进行匹配
也就是将填充完的答案,映射到最终的输出上,可能是标签,也可能直接就是对应的句子。
边栏推荐
- C#与MySQL数据库连接
- Mmdetection model fine tuning
- 图片数据爬取工具Image-Downloader的安装和使用
- Faster-ILOD、maskrcnn_benchmark安装过程及遇到问题
- PPT的技巧
- 【Mixup】《Mixup:Beyond Empirical Risk Minimization》
- [learning notes] matlab self compiled image convolution function
- How to turn on night mode on laptop
- Ppt skills
- 【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
猜你喜欢

【深度学习系列(八)】:Transoform原理及实战之原理篇

Nacos service registration in the interface

EKLAVYA -- 利用神经网络推断二进制文件中函数的参数

open3d学习笔记四【表面重建】
![[CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video](/img/bc/c54f1f12867dc22592cadd5a43df60.png)
[CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video

图像增强的几个方法以及Matlab代码

Implementation of yolov5 single image detection based on onnxruntime
![[binocular vision] binocular correction](/img/fe/27fda48c36ca529eec21c631737526.png)
[binocular vision] binocular correction

【Mixup】《Mixup:Beyond Empirical Risk Minimization》

【Cutout】《Improved Regularization of Convolutional Neural Networks with Cutout》
随机推荐
浅谈深度学习中的对抗样本及其生成方法
【Random Erasing】《Random Erasing Data Augmentation》
【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
PHP returns the abbreviation of the month according to the numerical month
Conversion of numerical amount into capital figures in PHP
【Batch】learning notes
Memory model of program
Gensim如何冻结某些词向量进行增量训练
Faster-ILOD、maskrcnn_ Benchmark trains its own VOC data set and problem summary
浅谈深度学习模型中的后门
mmdetection训练自己的数据集--CVAT标注文件导出coco格式及相关操作
TimeCLR: A self-supervised contrastive learning framework for univariate time series representation
【Mixed Pooling】《Mixed Pooling for Convolutional Neural Networks》
【Hide-and-Seek】《Hide-and-Seek: A Data Augmentation Technique for Weakly-Supervised Localization xxx》
MMDetection模型微调
Proof and understanding of pointnet principle
Pointnet understanding (step 4 of pointnet Implementation)
【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
CPU的寄存器
Solve the problem of latex picture floating