Agent-FLAN: 대규모 언어 모델을 위한 효과적인 에이전트 튜닝을 위한 데이터 및 방법 설계
Agent-FLAN: Designing Data and Methods of Effective Agent Tuning for Large Language Models
March 19, 2024
저자: Zehui Chen, Kuikun Liu, Qiuchen Wang, Wenwei Zhang, Jiangning Liu, Dahua Lin, Kai Chen, Feng Zhao
cs.AI
초록
오픈소스 대형 언어 모델(LLMs)은 다양한 자연어 처리(NLP) 작업에서 큰 성공을 거두었지만, 에이전트로 작동할 때는 여전히 API 기반 모델에 비해 크게 뒤떨어집니다. 일반 LLMs에 에이전트 능력을 통합하는 방법은 중요하고 시급한 문제로 대두되고 있습니다. 본 논문은 먼저 세 가지 주요 관찰을 제시합니다: (1) 현재의 에이전트 학습 코퍼스는 형식 준수와 에이전트 추론이 혼재되어 있어 사전 학습 데이터의 분포와 크게 다르다는 점, (2) LLMs는 에이전트 작업에 필요한 능력에 대해 서로 다른 학습 속도를 보인다는 점, (3) 현재의 접근 방식은 에이전트 능력을 향상시키면서 환각(hallucination) 문제를 유발한다는 점입니다. 이러한 발견을 바탕으로, 우리는 에이전트를 위한 언어 모델을 효과적으로 미세 조정하는 Agent-FLAN을 제안합니다. 학습 코퍼스를 신중하게 분해하고 재설계함으로써, Agent-FLAN은 Llama2-7B가 다양한 에이전트 평가 데이터셋에서 기존 최고의 작업보다 3.5% 더 나은 성능을 달성하도록 합니다. 또한, 철저히 구성된 부정 샘플을 통해 Agent-FLAN은 우리가 구축한 평가 벤치마크를 기반으로 환각 문제를 크게 완화합니다. 더불어, 모델 크기를 확장할 때 LLMs의 에이전트 능력을 지속적으로 향상시키면서 일반적인 능력도 약간 개선합니다. 코드는 https://github.com/InternLM/Agent-FLAN에서 확인할 수 있습니다.
English
Open-sourced Large Language Models (LLMs) have achieved great success in
various NLP tasks, however, they are still far inferior to API-based models
when acting as agents. How to integrate agent ability into general LLMs becomes
a crucial and urgent problem. This paper first delivers three key observations:
(1) the current agent training corpus is entangled with both formats following
and agent reasoning, which significantly shifts from the distribution of its
pre-training data; (2) LLMs exhibit different learning speeds on the
capabilities required by agent tasks; and (3) current approaches have
side-effects when improving agent abilities by introducing hallucinations.
Based on the above findings, we propose Agent-FLAN to effectively Fine-tune
LANguage models for Agents. Through careful decomposition and redesign of the
training corpus, Agent-FLAN enables Llama2-7B to outperform prior best works by
3.5\% across various agent evaluation datasets. With comprehensively
constructed negative samples, Agent-FLAN greatly alleviates the hallucination
issues based on our established evaluation benchmark. Besides, it consistently
improves the agent capability of LLMs when scaling model sizes while slightly
enhancing the general capability of LLMs. The code will be available at
https://github.com/InternLM/Agent-FLAN.