亚洲男人的天堂2018av,欧美草比,久久久久久免费视频精选,国色天香在线看免费,久久久久亚洲av成人片仓井空

The success of large language models (LLMs), like GPT-3 and ChatGPT, has led to the development of numerous cost-effective and accessible alternatives that are created by fine-tuning open-access LLMs with task-specific data (e.g., ChatDoctor) or instruction data (e.g., Alpaca). Among the various fine-tuning methods, adapter-based parameter-efficient fine-tuning (PEFT) is undoubtedly one of the most attractive topics, as it only requires fine-tuning a few external parameters instead of the entire LLMs while achieving comparable or even better performance. To enable further research on PEFT methods of LLMs, this paper presents LLM-Adapters, an easy-to-use framework that integrates various adapters into LLMs and can execute these adapter-based PEFT methods of LLMs for different tasks. The framework includes state-of-the-art open-access LLMs such as LLaMA, BLOOM, OPT, and GPT-J, as well as widely used adapters such as Series adapter, Parallel adapter, and LoRA. The framework is designed to be research-friendly, efficient, modular, and extendable, allowing the integration of new adapters and the evaluation of them with new and larger-scale LLMs. Furthermore, to evaluate the effectiveness of adapters in LLMs-Adapters, we conduct experiments on six math reasoning datasets. The results demonstrate that using adapter-based PEFT in smaller-scale LLMs (7B) with few extra trainable parameters yields comparable, and in some cases superior, performance to that of powerful LLMs (175B) in zero-shot inference on simple math reasoning datasets. Overall, we provide a promising framework for fine-tuning large LLMs on downstream tasks. We believe the proposed LLMs-Adapters will advance adapter-based PEFT research, facilitate the deployment of research pipelines, and enable practical applications to real-world systems.

相關內容

We present QLoRA, an efficient finetuning approach that reduces memory usage enough to finetune a 65B parameter model on a single 48GB GPU while preserving full 16-bit finetuning task performance. QLoRA backpropagates gradients through a frozen, 4-bit quantized pretrained language model into Low Rank Adapters~(LoRA). Our best model family, which we name Guanaco, outperforms all previous openly released models on the Vicuna benchmark, reaching 99.3% of the performance level of ChatGPT while only requiring 24 hours of finetuning on a single GPU. QLoRA introduces a number of innovations to save memory without sacrificing performance: (a) 4-bit NormalFloat (NF4), a new data type that is information theoretically optimal for normally distributed weights (b) double quantization to reduce the average memory footprint by quantizing the quantization constants, and (c) paged optimziers to manage memory spikes. We use QLoRA to finetune more than 1,000 models, providing a detailed analysis of instruction following and chatbot performance across 8 instruction datasets, multiple model types (LLaMA, T5), and model scales that would be infeasible to run with regular finetuning (e.g. 33B and 65B parameter models). Our results show that QLoRA finetuning on a small high-quality dataset leads to state-of-the-art results, even when using smaller models than the previous SoTA. We provide a detailed analysis of chatbot performance based on both human and GPT-4 evaluations showing that GPT-4 evaluations are a cheap and reasonable alternative to human evaluation. Furthermore, we find that current chatbot benchmarks are not trustworthy to accurately evaluate the performance levels of chatbots. A lemon-picked analysis demonstrates where Guanaco fails compared to ChatGPT. We release all of our models and code, including CUDA kernels for 4-bit training.

The recent success of large language models (LLMs) has shown great potential to develop more powerful conversational recommender systems (CRSs), which rely on natural language conversations to satisfy user needs. In this paper, we embark on an investigation into the utilization of ChatGPT for conversational recommendation, revealing the inadequacy of the existing evaluation protocol. It might over-emphasize the matching with the ground-truth items or utterances generated by human annotators, while neglecting the interactive nature of being a capable CRS. To overcome the limitation, we further propose an interactive Evaluation approach based on LLMs named iEvaLM that harnesses LLM-based user simulators. Our evaluation approach can simulate various interaction scenarios between users and systems. Through the experiments on two publicly available CRS datasets, we demonstrate notable improvements compared to the prevailing evaluation protocol. Furthermore, we emphasize the evaluation of explainability, and ChatGPT showcases persuasive explanation generation for its recommendations. Our study contributes to a deeper comprehension of the untapped potential of LLMs for CRSs and provides a more flexible and easy-to-use evaluation framework for future research endeavors. The codes and data are publicly available at //github.com/RUCAIBox/iEvaLM-CRS.

Pre-trained language models (PLMs) are known to improve the generalization performance of natural language understanding models by leveraging large amounts of data during the pre-training phase. However, the out-of-distribution (OOD) generalization problem remains a challenge in many NLP tasks, limiting the real-world deployment of these methods. This paper presents the first attempt at creating a unified benchmark named GLUE-X for evaluating OOD robustness in NLP models, highlighting the importance of OOD robustness and providing insights on how to measure the robustness of a model and how to improve it. The benchmark includes 13 publicly available datasets for OOD testing, and evaluations are conducted on 8 classic NLP tasks over 21 popularly used PLMs, including GPT-3 and GPT-3.5. Our findings confirm the need for improved OOD accuracy in NLP tasks, as significant performance degradation was observed in all settings compared to in-distribution (ID) accuracy.

The increasing size of language models raises great research interests in parameter-efficient fine-tuning such as LoRA that freezes the pre-trained model, and injects small-scale trainable parameters for multiple downstream tasks (e.g., summarization, question answering and translation). To further enhance the efficiency of fine-tuning, we propose a framework that integrates LoRA and structured layer pruning. The integrated framework is validated on two created deidentified medical report summarization datasets based on MIMIC-IV-Note and two public medical dialogue datasets. By tuning 0.6% parameters of the original model and pruning over 30% Transformer-layers, our framework can reduce 50% of GPU memory usage and speed up 100% of the training phase, while preserving over 92% generation qualities on free-text sequence-to-sequence tasks.

大型語言模型(LLMs)在自然語言處理(NLP)領域憑借其出色的語言理解和生成能力取得了顯著進步。然而,由于受限于領域特定知識和詞匯的接觸,它們在長尾或領域特定任務的表現可能不盡如人意。此外,大多數最先進的(SOTA)LLMs缺乏透明度,只能通過API訪問,這阻礙了使用自定義數據進一步微調。而且,數據隱私是一個重要問題。為了應對這些挑戰,我們提出了一種創新的參數知識引導(PKG)框架,該框架為LLMs配備了一個知識引導模塊,以在運行時訪問相關知識,而無需更改LLMs的參數。我們的(de)PKG基于(yu)開源的(de)“白盒”小型語(yu)言模(mo)型,允許將LLMs所需的(de)任何知識進行(xing)離線存(cun)儲。我們證明了我們的(de)PKG框架可以增強“黑盒”LLMs在一系列(lie)長尾(wei)和(he)(he)領域特定下游任務的(de)表(biao)現(xian),這些任務需要(yao)事(shi)實、表(biao)格、醫學(xue)和(he)(he)多模(mo)態知識。

//www.zhuanzhi.ai/paper/4bf640cc7e3ca1bf060a6aafc401de8e

1. 引言

諸如GPT3 [Brown et al., 2020]的大型語言模型(LLMs)在各種自然語言處理(NLP)任務中展示出令人印象深刻的熟練程度。這些模型通常在廣泛的互聯網數據上進行訓練,從而使它們能夠將大量的隱式世界知識融入到其參數中。因此,LLMs已成為既適用于NLP研究又適用于工業應用的多功能工具。例如,它們可用于機器翻譯 [Jiao et al., 2023],段落摘要 [Yang et al., 2023]和推薦系統 [Gao et al., 2023]。憑借其卓越的語言理解和生成能力,LLMs為各種工業應用提供了新的機會,如最近推出的New Bing [Microsoft, 2023]和ChatGPT插件 [OpenAI, 2023a]。 盡管在一般自然語言處理(NLP)任務上表現出色,但在長尾或領域特定任務上,LLMs可能會因受限于相關知識和詞匯而難以獲得最佳結果 [Chalkidis, 2023; Kasai et al., 2023; Nascimento et al., 2023]。雖然LLMs在預訓練過程中獲取了(le)(le)隱式(shi)知(zhi)識(shi),但這(zhe)(zhe)種知(zhi)識(shi)可能(neng)(neng)對某些任務來說(shuo)是有(you)損失或(huo)(huo)不(bu)足(zu)的(de),導致(zhi)準確(que)度降低(di)和(he)(he)效果不(bu)佳。此外(wai)(wai),許多最先進(jin)(SOTA)的(de)LLMs被認為是“黑箱”模型,只能(neng)(neng)通過API訪問。這(zhe)(zhe)種缺(que)乏透明度使(shi)得微調這(zhe)(zhe)些模型對大多數(shu)研究人員和(he)(he)公司來說(shuo)變得困(kun)難和(he)(he)昂貴。此外(wai)(wai),能(neng)(neng)夠承擔微調費用的(de)用戶必須向LLM所有(you)者提供他們的(de)私人數(shu)據,將其暴露于濫用、違規或(huo)(huo)其他安全威脅的(de)風(feng)險中 [BBC, 2023]。這(zhe)(zhe)些限制阻(zu)礙了(le)(le)LLMs適應特定用例或(huo)(huo)領域的(de)能(neng)(neng)力。

最近的研究主要集中在(zai)使(shi)用基(ji)于檢索的方(fang)法從(cong)外部知(zhi)識(shi)庫(ku)中提取領域(yu)特定知(zhi)識(shi),以(yi)提高LLMs的性能(neng) [Liu, 2022; Shi et al., 2023; Peng et al., 2023a]。雖然(ran)這(zhe)(zhe)種方(fang)法取得了有前景(jing)的結果(guo),但它還存在(zai)一(yi)些局限(xian)性。首先,它嚴重依賴外部知(zhi)識(shi)來(lai)源,這(zhe)(zhe)些來(lai)源可能(neng)并不總是容易獲得或可用。此外,這(zhe)(zhe)些方(fang)法可能(neng)無法處理需要從(cong)多(duo)個來(lai)源或模態(tai)整合信息的復(fu)雜查(cha)詢。

為了克服這些局限性,我們提出了一種名為參數知識引導(PKG)的新框架,它將檢索替換為生成,如(ru)圖1所示。PKG模(mo)塊是一個額外的背(bei)景(jing)知識(shi)生成模(mo)塊,使LLMs能(neng)夠在(zai)運行時訪問相關(guan)信(xin)息,而無(wu)需更新它們的參(can)數。通(tong)過提(ti)供必要的知識(shi),增強型LLMs可以(yi)在(zai)長(chang)尾(wei)或領域特定(ding)任務上取得更好的性能(neng)。

我們(men)的(de)(de)PKG框架基(ji)于開源且免費使(shi)用的(de)(de)“白(bai)盒”小型語言模型,使(shi)其能夠被更(geng)廣(guang)泛的(de)(de)用戶(hu)所使(shi)用。為了(le)與給(gei)定任(ren)務或領域所需的(de)(de)特定知識保持一(yi)致(zhi),我們(men)引入了(le)一(yi)種基(ji)于指令微調的(de)(de)兩步知識對齊方法 [Ouyang et al., 2022]。參數(shu)模塊可以(yi)存儲LLMs所需的(de)(de)任(ren)何知識,并且可以(yi)在離線情況下高效地(di)進行更(geng)新。

我(wo)們的(de)實(shi)驗(yan)表明,所提出(chu)的(de)PKG框架(jia)能夠提高“黑(hei)箱”LLMs在需要領域(yu)特定(ding)背景(jing)知識的(de)各(ge)種下(xia)游任務上的(de)性能,包括(kuo)事(shi)實(shi)知識(FM2 [Eisenschlos et al., 2021], +7.9%)、表格知識(NQ-Table [Herzig et al., 2021], +11.9%)、醫學知識(MedMC-QA [Pal et al., 2022], +3.0%)和多(duo)模(mo)態(tai)知識(ScienceQA [Lu et al., 2022], +8.1%)。我(wo)們將我(wo)們的(de)貢獻總結如下(xia):

我們提出了一種創新的參數知識引導(PKG)框架,通過集成一個額外的背景知識生成模塊來增強語言模型(LMs)的能力

我們引入了一種兩步知識對齊方法,將PKG模塊與給定任務或領域所需的特定知識對齊。該方法基于指令微調,并使參數模塊能夠進行高效的離線更新

我們對各種下游任務進行了廣泛的實驗,以評估我們提出的PKG框架的有效性。這些實驗的結果表明,我們的PKG框架可以提高LLMs在這些任務上的能力

2 參數化知識引導

在(zai)本節中,我們(men)介紹了一種(zhong)名為參(can)數知識(shi)引導(PKG)的(de)(de)創新(xin)框架(jia),旨(zhi)在(zai)提(ti)高“黑(hei)箱”LLMs在(zai)長(chang)尾或(huo)領(ling)域特定(ding)任務(wu)上(shang)的(de)(de)性能。PKG利(li)用一個(ge)離線參(can)數知識(shi)生成(cheng)模塊(kuai),該模塊(kuai)與(yu)(yu)LLM集成(cheng),以在(zai)運(yun)行時(shi)提(ti)供(gong)相(xiang)關知識(shi),指導其推理。為實現這一目標,我們(men)首先利(li)用一個(ge)小(xiao)型(xing)(xing)開(kai)源語言模型(xing)(xing)來高效地與(yu)(yu)領(ling)域特定(ding)知識(shi)對齊,這些知識(shi)通常是(shi)長(chang)尾的(de)(de)或(huo)不存(cun)在(zai)于(yu)LLM的(de)(de)訓練數據中。然后(hou),給(gei)定(ding)一個(ge)輸(shu)入(ru)問題或(huo)句子,PKG提(ti)供(gong)相(xiang)應的(de)(de)背景文檔,擴(kuo)展LLMs的(de)(de)輸(shu)入(ru)上(shang)下文,使(shi)它們(men)能夠(gou)處(chu)理更廣泛(fan)的(de)(de)任務(wu)。

**2.1 導引器的知識對(dui)齊(qi) **

針對特(te)定(ding)(ding)任(ren)務(wu)或(huo)領域(yu),我(wo)(wo)們(men)通(tong)過(guo)指(zhi)令(ling)微(wei)調(diao) [Ouyang et al., 2022] 將(jiang)導(dao)引器模(mo)塊(kuai)與相關知(zhi)識對齊。如(ru)圖2所(suo)示(shi),我(wo)(wo)們(men)將(jiang)此過(guo)程分為兩(liang)個步驟。首(shou)先,我(wo)(wo)們(men)收集有(you)關目標任(ren)務(wu)/領域(yu)的(de)原始數據,作為我(wo)(wo)們(men)的(de)知(zhi)識來(lai)(lai)源。然(ran)后,我(wo)(wo)們(men)將(jiang)數據轉換為一(yi)組(指(zhi)令(ling),輸入,輸出)三(san)(san)元組。指(zhi)令(ling)作為輸入的(de)提(ti)(ti)示(shi),并(bing)指(zhi)導(dao)模(mo)塊(kuai)與預期輸出對齊。接下來(lai)(lai),采用這組三(san)(san)元組來(lai)(lai)調(diao)整(zheng)我(wo)(wo)們(men)的(de)基本PKG模(mo)塊(kuai),優化其為給定(ding)(ding)任(ren)務(wu)或(huo)領域(yu)的(de)LLMs提(ti)(ti)供相關且有(you)效指(zhi)導(dao)的(de)能力。這個過(guo)程使(shi)PKG模(mo)塊(kuai)能夠學習并(bing)生成領域(yu)特(te)定(ding)(ding)知(zhi)識,并(bing)在運(yun)行時提(ti)(ti)供給LLMs。指(zhi)令(ling)提(ti)(ti)示(shi)的(de)示(shi)例是:

指令(ling)作為提示,指導模型提供與特(te)定領域(yu)或(huo)任(ren)務相(xiang)(xiang)關的(de)背(bei)景知(zhi)(zhi)識(shi)(shi)。輸入是(shi)(shi)一個提示,提示模型在(zai)指定的(de)領域(yu)或(huo)任(ren)務中生成(cheng)一句(ju)話或(huo)回答問(wen)題。輸出(chu)是(shi)(shi)模型基(ji)(ji)于給(gei)定指令(ling)和輸入生成(cheng)的(de)相(xiang)(xiang)關知(zhi)(zhi)識(shi)(shi)。為生成(cheng)輸出(chu),我們以自回歸方式訓(xun)練基(ji)(ji)本的(de)導引(yin)器(qi)模塊,其中模型在(zai)給(gei)定先(xian)前上下文的(de)情況(kuang)下生成(cheng)輸出(chu)。一旦訓(xun)練完成(cheng),基(ji)(ji)本模型就會演變(bian)成(cheng)參數化知(zhi)(zhi)識(shi)(shi)導引(yin)器(qi),可(ke)以根據相(xiang)(xiang)應的(de)指令(ling)生成(cheng)特(te)定領域(yu)/任(ren)務的(de)背(bei)景知(zhi)(zhi)識(shi)(shi)。

2.2 用PKG增強LLMs

在許多(duo)情(qing)況下(xia),使(shi)用(yong)“黑箱”LLMs的(de)標準方(fang)法(fa)是(shi)將(jiang)輸(shu)入句(ju)子(zi)/問(wen)(wen)題作為提示(shi),并請求LLMs使(shi)用(yong)API返(fan)回響應/答案。然而,這(zhe)種方(fang)法(fa)對于需要超出輸(shu)入本身所(suo)含知識的(de)復雜任(ren)務可能(neng)并不有(you)效。為了克服這(zhe)個(ge)限制,一(yi)種常見(jian)的(de)方(fang)法(fa)是(shi)為LLMs提供額外的(de)上(shang)下(xia)文,使(shi)它(ta)們能(neng)夠(gou)訪(fang)問(wen)(wen)與任(ren)務相(xiang)關的(de)更多(duo)相(xiang)關信息。在PKG的(de)情(qing)況下(xia),我們增(zeng)強(qiang)輸(shu)入與領(ling)域(yu)特定的(de)背景知識,擴展輸(shu)入上(shang)下(xia)文。這(zhe)個(ge)補充信息作為LLMs的(de)指南,使(shi)它(ta)們能(neng)夠(gou)訪(fang)問(wen)(wen)更豐富的(de)任(ren)務上(shang)下(xia)文,從而潛在地提高它(ta)們生(sheng)成(cheng)響應的(de)準確性。一(yi)個(ge)增(zeng)強(qiang)的(de)提示(shi)的(de)例子(zi)是(shi):

3 實驗

在(zai)本節(jie)中,評估了所(suo)提(ti)(ti)(ti)出(chu)的(de)(de)PKG框(kuang)架在(zai)四種不同類型的(de)(de)知(zhi)識(shi)上的(de)(de)有(you)效性:事實性、表(biao)格性、醫學(xue)和(he)多模態知(zhi)識(shi)。將(jiang)所(suo)提(ti)(ti)(ti)出(chu)方(fang)法的(de)(de)性能與幾(ji)個基線方(fang)法進(jin)行了比較,表(biao)1和(he)表(biao)2所(suo)示的(de)(de)結果表(biao)明(ming),PKG比"黑盒" LLM取(qu)得了顯著的(de)(de)改進(jin)。這些發(fa)現為(wei)所(suo)提(ti)(ti)(ti)出(chu)方(fang)法的(de)(de)通用性和(he)有(you)效性提(ti)(ti)(ti)供了令(ling)人信服的(de)(de)證(zheng)據。

付費5元查看完整內容

Pre-trained Language Models (PLMs) which are trained on large text corpus via self-supervised learning method, have yielded promising performance on various tasks in Natural Language Processing (NLP). However, though PLMs with huge parameters can effectively possess rich knowledge learned from massive training text and benefit downstream tasks at the fine-tuning stage, they still have some limitations such as poor reasoning ability due to the lack of external knowledge. Research has been dedicated to incorporating knowledge into PLMs to tackle these issues. In this paper, we present a comprehensive review of Knowledge-Enhanced Pre-trained Language Models (KE-PLMs) to provide a clear insight into this thriving field. We introduce appropriate taxonomies respectively for Natural Language Understanding (NLU) and Natural Language Generation (NLG) to highlight these two main tasks of NLP. For NLU, we divide the types of knowledge into four categories: linguistic knowledge, text knowledge, knowledge graph (KG), and rule knowledge. The KE-PLMs for NLG are categorized into KG-based and retrieval-based methods. Finally, we point out some promising future directions of KE-PLMs.

本指南將向(xiang)您展示如(ru)何優化Segformer,這是(shi)一(yi)種最(zui)先進的語義分割模型。我們的目(mu)標(biao)是(shi)為一(yi)個(ge)(ge)送(song)披薩的機器人構(gou)建(jian)一(yi)個(ge)(ge)模型,這樣它(ta)就可以看到(dao)該開車(che)去哪里,并識別障礙物????。我們首先在(zai)Segments.ai上標(biao)記一(yi)組人行道圖像。然后,我們將通過使用??transformer來優化一(yi)個(ge)(ge)預訓(xun)練的SegFormer模型,這是(shi)一(yi)個(ge)(ge)開源庫,提供了最(zui)先進的模型的易于使用的實現。在(zai)此過程中,您將學習如(ru)何使用Hugging Face Hub,最(zui)大(da)的模型和數據集(ji)的開源目(mu)

付費5元查看完整內容

This paper surveys and organizes research works in a new paradigm in natural language processing, which we dub "prompt-based learning". Unlike traditional supervised learning, which trains a model to take in an input x and predict an output y as P(y|x), prompt-based learning is based on language models that model the probability of text directly. To use these models to perform prediction tasks, the original input x is modified using a template into a textual string prompt x' that has some unfilled slots, and then the language model is used to probabilistically fill the unfilled information to obtain a final string x, from which the final output y can be derived. This framework is powerful and attractive for a number of reasons: it allows the language model to be pre-trained on massive amounts of raw text, and by defining a new prompting function the model is able to perform few-shot or even zero-shot learning, adapting to new scenarios with few or no labeled data. In this paper we introduce the basics of this promising paradigm, describe a unified set of mathematical notations that can cover a wide variety of existing work, and organize existing work along several dimensions, e.g.the choice of pre-trained models, prompts, and tuning strategies. To make the field more accessible to interested beginners, we not only make a systematic review of existing works and a highly structured typology of prompt-based concepts, but also release other resources, e.g., a website //pretrain.nlpedia.ai/ including constantly-updated survey, and paperlist.

Neural machine translation (NMT) is a deep learning based approach for machine translation, which yields the state-of-the-art translation performance in scenarios where large-scale parallel corpora are available. Although the high-quality and domain-specific translation is crucial in the real world, domain-specific corpora are usually scarce or nonexistent, and thus vanilla NMT performs poorly in such scenarios. Domain adaptation that leverages both out-of-domain parallel corpora as well as monolingual corpora for in-domain translation, is very important for domain-specific translation. In this paper, we give a comprehensive survey of the state-of-the-art domain adaptation techniques for NMT.

北京阿比特科技有限公司