自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

清華等開源「工具學習基準」ToolBench,微調模型ToolLLaMA性能超越ChatGPT

人工智能
人工智能基礎模型也類似,如果僅靠訓練階段得到的權重,使用場景就會非常受限,而最近提出的工具學習(tool learning),將特定領域的專用工具與大規(guī)?;A模型相結合,可以實現(xiàn)更高的效率、性能。

人類具有創(chuàng)造和利用工具的能力,使得我們可以突破身體的限制,探索更廣闊的世界。 

人工智能基礎模型也類似,如果僅靠訓練階段得到的權重,使用場景就會非常受限,而最近提出的工具學習(tool learning),將特定領域的專用工具與大規(guī)?;A模型相結合,可以實現(xiàn)更高的效率、性能。

不過目前工具學習的相關研究還不夠深入,也缺乏相關的開源數(shù)據和代碼。

最近,清華大學自然語言處理實驗室等支持的開源社區(qū)OpenBMB (Open Lab for Big Model Base)發(fā)布了ToolBench項目,可以幫助開發(fā)者構建開源、大規(guī)模、高質量的指令調優(yōu)數(shù)據,促進構建具有通用工具使用能力的大型語言模型。

圖片

倉庫鏈接:https://github.com/OpenBMB/ToolBench

ToolBench倉庫中提供了相關數(shù)據集、訓練和評估腳本,以及在ToolBench上微調的功能模型ToolLLaMA,具體特點為:

1. 支持單工具和多工具方案

其中單工具設置遵循LangChain提示風格,多工具設置遵循AutoGPT的提示風格。

2. 模型回復不僅包括最終答案,還包含模型的思維鏈過程、工具執(zhí)行和工具執(zhí)行結果

3. 支持真實世界級別的復雜性,支持多步工具調用

4. 豐富的API,可用于現(xiàn)實世界中的場景,如天氣信息、搜索、股票更新和PowerPoint自動化

5. 所有的數(shù)據都是由OpenAI API自動生成并由開發(fā)團隊進行過濾,數(shù)據的創(chuàng)建過程很容易擴展

不過需要注意的是,目前發(fā)布的數(shù)據還不是最終版本,研究人員仍然在對數(shù)據進行后處理來提高數(shù)據質量,并增加真實世界工具的覆蓋范圍。

ToolBench

ToolBench的總體思路是基于BMTools,在有監(jiān)督數(shù)據中訓練大型語言模型。

圖片

倉庫中包含31.2萬次真實API調用得到的9800條數(shù)據,涵蓋單工具場景和多工具場景,下面是單工具的統(tǒng)計信息。

圖片

其中每行數(shù)據都是一個json dict,包含數(shù)據創(chuàng)建的提示模板、工具使用的人工指令(查詢)、中間思維/工具執(zhí)行循環(huán)和最終答案。

Tool Descrition:
BMTools Tool_name: translation
Tool action: get_translation
action_input: {"text": target texts, "tgt_lang": target language}


Generated Data:
{
    "prompt": "Answer the following questions as best you can. Specifically, you have access to the following APIs:\n\nget_translation: . Your input should be a json (args json schema): {{\"text\" : string, \"tgt_lang\" : string, }} The Action to trigger this API should be get_translation and the input parameters should be a json dict string. Pay attention to the type of parameters.\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [get_translation]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times, max 7 times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin! Remember: (1) Follow the format, i.e,\nThought:\nAction:\nAction Input:\nObservation:\nFinal Answer:\n (2) Provide as much as useful information in your Final Answer. (3) Do not make up anything, and if your Observation has no link, DO NOT hallucihate one. (4) If you have enough information and want to stop the process, please use \nThought: I have got enough information\nFinal Answer: **your response. \n The Action: MUST be one of the following:get_translation\nQuestion: {input}\n Agent scratchpad (history actions):\n {agent_scratchpad}",
    "query": "My intention is to convert the data provided in ?? ?? ??????? ??????? ?????? ???????? into Arabic(ara).\n",
    "chains": [
        {
            "thought": "I need to use the get_translation API to convert the text into Arabic.",
            "action": "get_translation",
            "action_input": "{\"text\": \"What are the three branches of the military?\", \"tgt_lang\": \"ara\"}",
            "observation": "\"?? ?? ?????? ??????? ????? ?\""
        }
    ],
    "answer": "The translation of \"What are the three branches of the military?\" into Arabic is \"?? ?? ?????? ??????? ????? ?\"."
}

模型實驗

機器評估:研究人員對每個工具隨機抽取100個鏈步(chain steps)來構建機器評估測試平臺,平均27個最終步驟和73個中間工具調用步驟,其中最終步驟的評估使用Rouge-L指標,中間步驟的評估使用ExactMatch指標進行評估。


圖片

人工評估:在天氣、地圖、股票、翻譯、化學和WolframAlpha工具中隨機抽取10個query,然后評估工具調用過程的通過率、最終答案以及和ChatGPT最終答案的比較。

ChatGPT評估:通過ChatGPT對LLaMA和ChatGPT的答案和工具使用鏈進行自動評估。

評估結果如下(分數(shù)越高越好),可以看到ToolLLaMA在不同場景下與ChatGPT的性能相同或更好。

圖片

工具學習

在清華大學、人民大學、北京郵電大學等個國內外知名高校和大學聯(lián)合發(fā)布的一篇論文中,對工具學習進行了系統(tǒng)的研究,介紹了工具學習的背景,包括認知起源、基礎模型的范式轉變,以及工具和模型的互補作用。

圖片

論文鏈接:https://arxiv.org/pdf/2304.08354.pdf

文中還回顧了現(xiàn)有的工具學習研究,包括工具增強型和工具導向型學習,并制定了一個通用的工具學習框架:從理解用戶指令開始,模型應該學會把一個復雜的任務分解成幾個子任務,通過推理動態(tài)地調整計劃,并通過選擇合適的工具有效地征服每個子任務。

文中還討論了如何訓練模型以提高工具使用能力并促進工具學習的普及。

考慮到之前的工作中缺乏系統(tǒng)的工具學習評估,研究人員用17種有代表性的工具進行了實驗,并展示了當前基礎模型在熟練利用工具方面的潛力。

論文最后討論了幾個需要進一步研究的工具學習的開放性問題,例如確保安全和可信賴的工具使用、用基礎模型實現(xiàn)工具創(chuàng)建,以及解決個性化的難題。

參考資料:

https://github.com/OpenBMB/ToolBench

責任編輯:武曉燕 來源: 新智元
相關推薦

2023-08-02 13:50:06

2024-04-18 10:39:57

2025-02-05 12:53:21

2023-10-17 12:33:27

AI模型

2023-07-04 10:18:25

開源模型

2023-06-05 12:32:48

模型論文

2024-01-03 12:56:39

2021-11-23 09:30:34

架構AI技術

2025-03-19 09:15:00

AI算法模型

2023-10-16 13:28:00

數(shù)據AI

2025-02-06 14:28:16

2023-09-11 15:57:16

人工智能模型GPT-4

2024-03-06 18:09:06

Linux性能工具

2023-08-08 14:36:11

模型AI

2023-09-26 11:58:32

2024-10-09 08:27:30

2024-07-10 14:35:19

2024-10-15 13:07:38

2024-07-22 07:10:00

小模型機器學習蘋果

2023-03-06 13:59:38

模型參數(shù)
點贊
收藏

51CTO技術棧公眾號