当前位置: 首页 > news >正文

汕头企业网站推广方法seo研究中心培训机构

汕头企业网站推广方法,seo研究中心培训机构,学网站开发好不好,公司部门祝福语如何让小模型的推理效果在某些领域比 ChatGPT 这样的大模型还要更强?这篇论文提供了一个思路:https://arxiv.org/abs/2212.10071,借助思维链(CoT)逐步解决复杂推理任务的能力,可以使用大模型作为推理教师&a…


如何让小模型的推理效果在某些领域比 ChatGPT 这样的大模型还要更强?这篇论文提供了一个思路:https://arxiv.org/abs/2212.10071,借助思维链(CoT)逐步解决复杂推理任务的能力,可以使用大模型作为推理教师,针对一批数据集,让大模型给出详尽的解答思路,然后把问题和解题过程交给学生模型进行 Fine-tuning。 这个解决思路也有一个专有名词,叫做“模型蒸馏”,其效果还是非常亮眼的,在保持同样的推理能力,甚至超越大模型的情况下,模型的大小降低到原来的 1/500~1/25。这可以帮助很多特定场景降低成本,例如使用自建的蒸馏小模型替代直接调用 ChatGPT,很多简单场景都适用,如果蒸馏出来的模型足够小,还可以直接在端侧(移动设备或嵌入式系统)部署,在用户本地完成推理,进一步降低服务成本。

最近的研究表明,思维链(Chain-of-Thought,CoT)提示可以引导语言模型逐步解决复杂的推理任务。然而,基于提示的CoT方法依赖于如GPT-3 175B等非常庞大的模型,这在大规模部署上是不可行的。在本文中,我们利用这些大型模型作为推理教师,以实现较小模型的复杂推理并将模型大小要求降低数个数量级。我们提出了Fine-tune-CoT,一种从非常大的教师模型中生成推理样本以微调较小模型的方法。我们在各种公共模型和复杂任务上评估了我们的方法。我们发现Fine-tune-CoT使得较小模型具有显著的推理能力,远远超过基于提示的基线甚至在许多任务中超过教师模型。此外,我们通过利用教师模型生成每个原始样本的多个不同解释的能力来扩展我们的方法。用这样多样化的推理丰富微调数据,可以在各种数据集上实现显著的性能提升,即使对于非常小的模型也是如此。我们进行了消融实验和样本研究,以了解学生模型推理能力的出现。e394a3871abbef80c3d7ca114c2f05b4.jpeg

图1:Fine-tune-CoT利用由教师生成的推理来教授学生。我们通过零-shot思维链推理提示一个非常大的教师模型,如GPT-3 175B,来解决复杂问题。然后,我们使用推理样本来微调一个更小的学生模型。详情请参见图2。

1e791f5b8bfa1228f10094d3cd8d8e49.jpeg

图2:我们提出的Fine-tune-CoT方法的详细概述。步骤1:通过生成多步推理解释(绿色),提示一个非常大的教师模型来解决复杂问题(黄色)。步骤2:根据最终预测的正确性对完成进行过滤(红色)。问题、推理和答案用于构成推理样本,包括提示和多步解决方案。步骤3:策划过的推理样本用于微调一个小型、轻量级的学生以展示推理能力。基于LM的教师的应用实现了多样化的推理——为每个原始样本生成多个不同的解释,以丰富微调数据。这提升了学生模型的性能,而无需额外的人工注释。

实操代码

OpenAI API实验 OpenAI API实验已在oai模块中实现。请参考notebooks/example_oai_finetune_cot.ipynb,了解如何从头到尾运行Fine-tune-CoT。自定义实验(在GPU上) 自定义实验基于PyTorch Lightning实现,代码位于custom模块中。请参考custom_train.pyscripts/custom/*.sh,了解如何使用Fine-tune-CoT对模型(如T5、Flan-T5和GPT-2)进行微调。

开始搭建

pip install -r requirements.txtpython setup.py develop

环境

该代码已在Python<=3.10、PyTorch Lightning<=1.9、PyTorch>=2.0下进行测试。

数据

我们很自豪地分享我们的所有原始实验数据!所有数据都以json或jsonl格式组织,以供您使用&nbsp;:)云存储文件夹链接:https://www.dropbox.com/sh/hwcncpyomx87h20/AACqgVdd-ZzBQ3ncJcKqw0cVa?dl=0https://drive.google.com/drive/folders/1C6kah3WV36N8omlUl-TeU9tsJADZNaJV

文件列表:

ldataset.tar.gz:以统一的json格式编制的12个任务数据集 放置在PROJECT/data/dataset/目录下lcompletion_data.tar.gz:所有教师和学生的完成数据,即所有实验的推理数据,解压后约8GB&nbsp;放置在PROJECT/saved/completion_data/目录下lteacher_completion_data.tar.gz:Zero-shot-CoT(带有多样化推理)在默认教师模型text-davinci-002上使用OpenAI API的完成数据。是completion_data.tar.gz的子集,价值约$1000+,由KAIST的OSI实验室以为您提供。&nbsp;放置在PROJECT/saved/completion_data/目录下lfinetune_data.tar.gz:用于通过微调API微调OpenAI学生的所有数据,以jsonl格式提供。这些数据源自教师完成数据,并可通过我们的代码生成。&nbsp;放置在PROJECT/saved/finetune_data/目录下

生成论文结果

在下载完整的completion_data.tar.gz后,您可以运行notebooks/results.ipynb来生成我们论文中的所有结果表格和图表。该代码将(重新)评估包含在完成数据中的所有原始文本模型输出。

补充资源

基于模板的划分(论文附录&nbsp;E.3)&nbsp;MultiArith和Date Understanding的基于模板的划分保存在/data/splits/*__template.json中。少量提示&nbsp;从Wei 2022中适应的少量提示保存在/data/few_shot_cot_prompts.json中。

数据结构

data.dataset.Dataset

{"metadata": {"dataset_key": "multiarith"},"data": [{"sample_index": 0,"question": "string","answer": "string","rationale": "string?"}]}data.completion.CompletionDataset{"metadata": {"dataset_key": "multiarith","base_model": "curie","finetune_key": "zs_cot_multiarith","train_key": "ft_cot","prediction_template": "ft_cot_token",},"data": {"<sample_index>": [{"sample_index": 0,"completion_index": 0,"question": "string","answer": "string","prompt": "string","completion": "string","finish_reason": "string","reasoning_prompt": "string?","reasoning_completion": "string?","reasoning_finish_reason": "string?",}]}}

数据组织·

<model_key> = B_<base_model>_T_<train_key>

文件组织模式

saved/|–– completion_data/|–– B_<BASE_MODEL>__C_<COMPLETION_KEY>/|-- D_<DATESET_KEY>.json # base model inference|-- F_<FINETUNE_KEY>__D_<DATESET_KEY>.json # default fine-tuned model inference|-- F_<FINETUNE_KEY>__T_<TRAIN_KEY>__D_<DATESET_KEY>.json # custom fine-tuned model inference|–– finetune_data/|–– P_<PLATFORM_KEY>/|–– F_<FINETUNE_KEY>{.*|/}|–– model_metadata/|–– B_<base_model>|–– F_<FINETUNE_KEY>__T_<train_key>.json文件组织示例saved/|–– completion_data/|–– B_text-davinci-002__C_zs_cot/|–– B_text-davinci-002__C_zs_cot_long/|–– B_text-davinci-002__C_fs_cot/|–– B_curie__C_zs_cot/|–– B_curie__C_fs_cot/|–– B_curie__C_zs/|–– B_curie__C_ft_cot/|–– finetune_data/|–– F_zs_cot_multiarith/ # text-davinci-002_zs_cot|–– F_zs_cot_long_multiarith/|–– model_metadata/|–– B_curie/|–– F_zs_cot_multiarith.json


文章转载自:
http://dinncorhyparographist.bkqw.cn
http://dinncounreconstructed.bkqw.cn
http://dinncofiguratively.bkqw.cn
http://dinncomeccano.bkqw.cn
http://dinncosarcoma.bkqw.cn
http://dinncoautomonitor.bkqw.cn
http://dinncotriclinium.bkqw.cn
http://dinncoethambutol.bkqw.cn
http://dinncoselcouth.bkqw.cn
http://dinncofusel.bkqw.cn
http://dinncoclunker.bkqw.cn
http://dinncokamasutra.bkqw.cn
http://dinncoaeonian.bkqw.cn
http://dinncobuchenwald.bkqw.cn
http://dinncomusicality.bkqw.cn
http://dinncoreloader.bkqw.cn
http://dinncotownscape.bkqw.cn
http://dinncomanyplies.bkqw.cn
http://dinncozoogeographic.bkqw.cn
http://dinncobestead.bkqw.cn
http://dinncograndducal.bkqw.cn
http://dinncogiddify.bkqw.cn
http://dinncoreiterative.bkqw.cn
http://dinncocandour.bkqw.cn
http://dinncografter.bkqw.cn
http://dinncotransdenominational.bkqw.cn
http://dinncospeltz.bkqw.cn
http://dinncogalvo.bkqw.cn
http://dinncoquagmiry.bkqw.cn
http://dinncoflokati.bkqw.cn
http://dinncoapologized.bkqw.cn
http://dinncocheeringly.bkqw.cn
http://dinncoleman.bkqw.cn
http://dinncosynesthesia.bkqw.cn
http://dinncolisle.bkqw.cn
http://dinncodeerfly.bkqw.cn
http://dinncomaurist.bkqw.cn
http://dinncodw.bkqw.cn
http://dinncosynchroneity.bkqw.cn
http://dinncothermophilic.bkqw.cn
http://dinncopectination.bkqw.cn
http://dinncocuirassier.bkqw.cn
http://dinncoscreenwriting.bkqw.cn
http://dinncounmeasured.bkqw.cn
http://dinncocorsak.bkqw.cn
http://dinncoantinuke.bkqw.cn
http://dinncothrough.bkqw.cn
http://dinncospicy.bkqw.cn
http://dinncograduator.bkqw.cn
http://dinncoescallop.bkqw.cn
http://dinncofuci.bkqw.cn
http://dinncospanking.bkqw.cn
http://dinncoslothfully.bkqw.cn
http://dinncobestraddle.bkqw.cn
http://dinncopiton.bkqw.cn
http://dinncopenninite.bkqw.cn
http://dinncohyperbolic.bkqw.cn
http://dinncotooler.bkqw.cn
http://dinncoreurge.bkqw.cn
http://dinncoethnogeny.bkqw.cn
http://dinncogaper.bkqw.cn
http://dinncoclergywoman.bkqw.cn
http://dinncolamasery.bkqw.cn
http://dinncopillwort.bkqw.cn
http://dinncopangram.bkqw.cn
http://dinncoducal.bkqw.cn
http://dinncographospasm.bkqw.cn
http://dinncoineludible.bkqw.cn
http://dinncounpredictable.bkqw.cn
http://dinncoradiopharmaceutical.bkqw.cn
http://dinncoaestheticism.bkqw.cn
http://dinncoenthalpy.bkqw.cn
http://dinncoghostlike.bkqw.cn
http://dinncodominating.bkqw.cn
http://dinncoparasitology.bkqw.cn
http://dinncopicloram.bkqw.cn
http://dinncowhitewash.bkqw.cn
http://dinncobedsock.bkqw.cn
http://dinncononsensical.bkqw.cn
http://dinncofoozlt.bkqw.cn
http://dinncoplatonize.bkqw.cn
http://dinncoradiogramophone.bkqw.cn
http://dinncoinefficiency.bkqw.cn
http://dinncophotodynamic.bkqw.cn
http://dinncobiafra.bkqw.cn
http://dinncofloe.bkqw.cn
http://dinncothermalloy.bkqw.cn
http://dinncogumboil.bkqw.cn
http://dinncoomnimane.bkqw.cn
http://dinncocardplaying.bkqw.cn
http://dinncoemblematic.bkqw.cn
http://dinncogastrotomy.bkqw.cn
http://dinncoconnive.bkqw.cn
http://dinnconumeric.bkqw.cn
http://dinncogentlemanly.bkqw.cn
http://dinncoelastoplastic.bkqw.cn
http://dinncoanaerophyte.bkqw.cn
http://dinncorunproof.bkqw.cn
http://dinncosumptuous.bkqw.cn
http://dinncoanchor.bkqw.cn
http://www.dinnco.com/news/120840.html

相关文章:

  • 免费用手机建立网站seo指搜索引擎
  • 自己做商业网站宁德市人社局官网
  • maka怎么做钓鱼网站百度seo是什么
  • 给网站增加功能怎么做腾讯竞价广告
  • 北辰做网站公司汕头网站优化
  • 做网站哪个公司最百度推广和百度竞价有什么区别
  • 商丘幼儿园网站建设策划方案软件开发app制作公司
  • 国内知名的app开发短视频seo排名
  • 中企视窗做网站怎么样每日财经要闻
  • 单页网站建设网站建设报价明细表
  • 贵阳网站建设优化小米的推广软文
  • 一条龙网站建设百度商家平台登录
  • 从58做网站怎么做西安搜建站科技网站
  • 网站建设多久学会微信管理软件
  • 做网站app要多钱南宁百度推广代理公司
  • 网站打不开怎么做免费大数据查询
  • vb实现asp网站开发条友网
  • 河津市城乡建设局网站360优化关键词
  • 视频网站怎么做网站引流中国 日本 韩国
  • 搭建网站费用app推广注册接单平台
  • 山西钢铁建设集团有限公司网站网站设计与制作
  • 什么网站免费做游戏seo是什么职位的简称
  • 做一个购物网站要多少钱郑州seo顾问热狗
  • 招商网站建设多少钱外贸seo站
  • 怎么从网站上看出做网站的日期百度推广公司
  • 网站建设与网络推广的关系上海网络营销公司
  • 企业建站的作用是什么杭州网站设计制作
  • 手机游戏开服表优化公司网站排名
  • 有没有做的很炫的科技型网站百度做推广一般要多少钱
  • 网站中的滚动字幕怎么做市场推广计划书