five

LeroyDyer/I_KNOW_VERBS

收藏
Hugging Face2024-04-20 更新2024-06-12 收录
下载链接:
https://hf-mirror.com/datasets/LeroyDyer/I_KNOW_VERBS
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: apache-2.0 --- This is the script i use for training ; this is a specialist task so if you over train it will adust the expected output acordingly .. this should be used as a Template to use the model after training . Reset the template BACK to the original Mistral Template ! ```python alpaca_prompt = """ ### question: Define this verb, {} ### Response: gerunds = {} participles = {} indicatives = {} subjuntives = {} conditionals = {} imperatives = {} """ EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN def formatting_prompts_func(examples): infinitives = examples["infinitive"] gerunds = examples["gerund"] participles = examples["participle"] indicatives = examples["indicative"] subjuntives = examples["subjuntive"] conditionals = examples["conditional"] imperatives = examples["imperative"] texts = [] for infinitive, gerund, participle,indicative,subjuntive,conditional,imperative in zip(infinitives, gerunds, participles,indicatives,subjuntives,conditionals,imperatives): # Must add EOS_TOKEN, otherwise your generation will go on forever! text = alpaca_prompt.format(infinitive, gerund, participle,indicative,subjuntive,conditional,imperative) + EOS_TOKEN texts.append(text) return { "text" : texts, } pass from datasets import load_dataset dataset = load_dataset("Define this verb,utations/dolphin-coder", split = "train[:100%]") dataset = dataset.map(formatting_prompts_func, batched = True,) ```
提供机构:
LeroyDyer
原始信息汇总

数据集概述

数据集描述

该数据集用于训练一个专门的任务,旨在定义动词的不同形式。数据集包含动词的各种形式,包括:

  • 动名词 (gerunds)
  • 分词 (participles)
  • 直陈式 (indicatives)
  • 虚拟式 (subjuntives)
  • 条件式 (conditionals)
  • 命令式 (imperatives)

数据集加载

数据集通过 load_dataset 函数从 "Define this verb,utations/dolphin-coder" 加载,并指定加载训练集的全部数据。

数据处理

数据集通过 formatting_prompts_func 函数进行处理,将动词的各种形式格式化为特定的提示模板,并在每个提示的末尾添加 EOS_TOKEN 以确保生成的结束。

提示模板

提示模板 alpaca_prompt 用于定义动词的不同形式,格式如下: python alpaca_prompt = """

question:

Define this verb, {}

Response:

gerunds       =  {} 
participles   =  {} 
indicatives   =  {} 
subjuntives   =  {} 
conditionals  =  {} 
imperatives   =  {} 

"""

5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作