prompt-based models

原论文:
Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing

在这里插入图片描述

  • 介绍四类prompt-based的模型
    • Tuning-free Prompting
      (1)冻结LM(语言模型)的参数,不进行微调;
      (2)使用promtp,但其不涉及参数训练。
      优点:效率高,没有参数更新过程。因为LM参数保持不变,所以没有灾难性遗忘(LM失去了在微调之前能够做某些事情的能力)。适用于zero-shot settings。
      缺点:由于prompt是提供任务规范(task specification)的唯一方法,所以heavy engineering是实现高精度的必要步骤。特别是在(in-context learning)上下文学习设置中,提供许多已回答的prompt在测试时可能会很慢,因此不能轻易地使用大型训练数据集。

    • Fixed-LM Prompt Tuning
      (1)冻结LM(语言模型)的参数,不进行微调;
      (2)使用promtp,其中涉及参数训练。
      优点:与Tuning-free Prompting类似,它可以在LM中保留知识,并且适用于few-shot场景。通常优于 tuning-free prompting。
      缺点:不适用于zero-shot的场景。虽然在few-shot场景中有效,但在大数据设置中表示能力是有限的。

    • Fixed-prompt LM Tuning
      (1)不冻结LM(语言模型)的参数,进行微调;
      (2)使用promtp,但其不涉及参数训练。
      优点:Prompt或者answer engineering更完全地指定任务,允许更有效的学习,特别是在few-shot的场景中。
      缺点:Prompt或者answer engineering仍然是需要的,尽管可能不如没有prompt那么多。对一个下游任务进行微调的LM可能对另一个下游任务无效。

    • Prompt+LM Tuning
      (1)不冻结LM(语言模型)的参数,进行微调;
      (2)使用promtp,其中涉及参数训练。
      优点:这是最具表现力的方法,可能适合于high-data settings。
      缺点:需要训练和存储模型的所有参数。可能会在小数据集上出现过拟合。

翻译并改写为符合中文习惯的表达 Similarly, you can use this model for semantic segmentation as well. Semantic segmentation is the process of labeling each pixel and assigning them to the classes. While object detection deals with objects in bounding boxes, semantic segmentation creates a selection of the objects in a pixel-wise manner. Follow these steps: 1. T he first thing you need to do is to load your model: 2. The next step is to download the image that we want to perform segmentation on: Now that we have the image, we can use processor and model to get the output: Afterwards, you need to use the following functions to extract the result: However, in order to see the image, you can execute the following code: 3. T his code will convert the output of the model into the proper format to be visualized. Finally, you can see the image as shown in Figure 16.7, which is the identical semantically segmented image of the original image: Up to this point, you have learned how to use ViT models for image classification, object detection, and semantic segmentation. In the next section, you will learn about visual prompt models and how to use them. Visual prompt models Prompt-based models have been an attractive part of artificial intelligence in many aspects. These kinds of models can take guidance in the form of a pattern and create the respective output by understanding it. The prompt can be in many forms or data formats. Textual prompt-based models or visual prompt-based models are also available. A textual prompt is a free text that indicates what the model should do or provide as output. Similarly, a visual prompt is a visual guidance that helps the model understand the task or the instruction itself. Models such as CLIP are capable of understanding images and text at the same time and mapping them to a single vector space. In this vector space, text with similar semantic meaning to images (that visually present the same described objects or scenes
03-12
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值