# PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization

Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen 외 7명 · arXiv · 2023년 6월 8일

- **연구 문제** 명령어 튜닝 LLM의 하이퍼파라미터를 자동이고 신뢰할 수 있게 평가하는 방법이 필요합니다.
- **연구 방법** Alpaca 데이터에서 만든 응답 쌍을 GPT-3.5로 증류하고 위치 편향 필터링을 거쳐 LLaMA 기반 판정 모델 PandaLM을 학습합니다.
- **주요 결과** 사람 레이블 테스트에서 PandaLM-70B는 정확도 0.6687로 GPT-4의 0.6647을 넘었고, PandaLM이 고른 설정은 Alpaca 기본 설정보다 우수 응답을 더 많이 얻었습니다.

## LLM 명령어 튜닝 하이퍼파라미터 평가의 어려움

명령어 튜닝된 대형 언어 모델(LLM)의 성능은 옵티마이저, 학습률, 에폭 수, 학습 데이터의 품질과 규모에 크게 좌우됩니다. 그런데 이러한 하이퍼파라미터를 고르려면 튜닝된 모델들을 자동이고 신뢰할 수 있게 평가할 수 있어야 합니다. 기존 평가 방식은 사람 주석이나 API 기반 평가에 의존하며, 비용과 시간이 많이 들고 재현성과 일관성에 한계가 있습니다. 또한 정확도나 F1 같은 전통적 지표는 응답의 간결성, 명확성, 지시 준수, 포괄성, 형식성 같은 주관적 품질을 충분히 반영하지 못합니다. 저자들은 이러한 문제를 해결하기 위해 하이퍼파라미터 최적화에 쓸 수 있는 판정 모델을 만드는 것을 목표로 합니다.

## PandaLM의 데이터 증류와 학습 절차

PandaLM은 LLaMA를 기반으로 한 판정 모델로, 같은 지시문에 대한 두 응답을 입력받아 어느 쪽이 더 우수한지 판단하고 그 이유와 참조 응답을 생성하도록 학습됩니다. 학습 데이터의 입력 지시문과 입력은 Alpaca 52K에서 가져오며, 응답 쌍은 LLaMA-7B, Bloom-7B, Cerebras-GPT-6.7B, OPT-7B, Pythia-6.9B가 Alpaca와 같은 데이터와 하이퍼파라미터로 튜닝되어 만든 것입니다. 사람이 모든 라벨을 만드는 대신 self-instruct 방식을 따라 GPT-3.5로 평가 결과, 이유, 참조 응답을 증류합니다. 이후 응답 순서를 바꿔 두 번 추론했을 때 결과가 충돌하는 샘플을 제거하여 위치 편향을 줄이고 최종적으로 30만 개의 샘플을 얻습니다.

학습에서는 다음 토큰 예측을 위한 교차 엔트로피 손실을 사용하며, AdamW 옵티마이저, 학습률 2e-5, 코사인 스케줄러로 2 에폭 동안 미세 조정합니다.

![Figure 6: The prompt for training PandaLM](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-8ed2bfbe107ed0e82aa7a9a74ff24f52.png?thumb=512)

**Figure 6** : The prompt for training PandaLM.

[원문](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 사람 레이블 테스트셋에서의 판정 정확도

PandaLM의 신뢰성은 사람이 라벨한 테스트셋으로 확인합니다. 테스트 데이터는 self-instruct의 사람 평가 데이터에서 가져오며, 세 명의 평가자가 독립적으로 라벨을 붙이고 각 평가자의 Inter Annotator Agreement가 0.85보다 크도록 차이가 큰 샘플을 제외합니다. 필터링 후 테스트셋은 1K 샘플입니다. Table 2에서 사람 주석과 비교한 정확도는 GPT-3.5가 0.6296, GPT-4가 0.6647, PandaLM-7B가 0.5926이며, PandaLM-70B는 0.6687로 GPT-4를 넘어섭니다. 따라서 PandaLM-7B는 이 정확도 지표에서 두 GPT 평가자보다 낮고, 원문이 말하는 GPT-3.5·GPT-4와의 비슷한 성능은 PandaLM-7B의 여러 지표와 비교 그래프를 함께 본 결과입니다.

이 결과는 사람이 라벨한 테스트셋과 해당 샘플 선별 조건에서 얻은 것입니다.

## 튜닝 하이퍼파라미터 선택 효과

PandaLM이 선택한 하이퍼파라미터의 효과는 Alpaca 기본 설정과 비교해 확인합니다. 탐색 공간은 에폭 1에서 5, 학습률 2e-6, 1e-5, 2e-5, 2e-4, SGD와 AdamW 두 옵티마이저, 코사인과 선형 두 스케줄러의 조합으로 구성된 80개 설정입니다. 이 탐색은 800번의 비교로 수행되며, 모델마다 최적 설정이 다르게 나타납니다. 학습 데이터는 두 설정에서 동일하게 유지됩니다. GPT-4를 평가자로 사용한 실험에서 PandaLM이 고른 설정의 다섯 모델은 평균 47.0개의 우수 응답과 26.2개의 열등 응답을 얻었고, 사람 평가에서는 평균 79.8개의 우수 응답과 25.2개의 열등 응답을 얻었다고 보고됩니다.

평가자별 세부 비교는 Table 5에서 확인할 수 있습니다.

![Figure 1: The models are evaluated and compared using both GPT-3.5, GPT-4 and human annotators. The ‘Win’ count represents the number of responses where models…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-082f89354e586176ea309e815cb03304.png?thumb=512)

**Figure 1** : The models are evaluated and compared using both GPT-3.5, GPT-4 and human annotators. The ‘Win’ count represents the number of responses where models fine-tuned with PandaLM-selected optimal hyperparameters outperform models using Alpaca’s hyperparameters. Conversely, the ‘Lose’ count represents the number of responses where models utilizing Alpaca’s hyperparameters produce superior responses compared with those fine-tuned with the optimal hyperparameters determined by PandaLM. Note that the overall test set comprises 170 instances, and ‘Tie’ scenarios are not considered in this illustration.

[원문](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

![Table 5: Evaluation of the effectiveness of PandaLM’s selected hyperparameters and Alpaca’s hyperparameters. The tuple in the table means (#win,#lose,#tie). Sp…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-b962075b539029fa7569970e8d92a2db.png?thumb=512)

**Table 5** : Evaluation of the effectiveness of PandaLM’s selected hyperparameters and Alpaca’s hyperparameters. The tuple in the table means (#win,#lose,#tie). Specifically, (45,26,99) in the first line of the table indicates that PandaLM’s hyperparameter-tuned LLaMA-7B outperforms Alpaca’s version in 45 responses, underperforms in 26, and matches the quality in 99 instances. The ‘Judged By’ column represents different methods of response evaluation.

[원문](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Figure 8: Hyperparameter Optimization Analysis in PandaLM. The figure illustrates the performance across different learning rates and variability in model perf…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-ff8cd52ef106bad823f9def18758a61c.png?thumb=512)

**Figure 8** : Hyperparameter Optimization Analysis in PandaLM. The figure illustrates the performance across different learning rates and variability in model performance across epochs.

[원문](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 원문 그림 인용 · 원본 PDF 21쪽에서 그림 영역을 추출했습니다.

## 평가 이유와 참조 응답의 역할

PandaLM은 승패 레이블뿐 아니라 평가 이유와 참조 응답을 함께 학습합니다. 이 설계의 효과를 보기 위해 이유와 참조 응답을 제외하고 승·패·무승부 레이블만 남긴 PandaLM-7B를 다시 학습했습니다. 그 결과 정확도는 0.4725로, 전체 설정의 0.5926보다 낮게 보고됩니다. 이 실험은 이유와 참조 응답이 판정 학습에 도움이 되었다는 근거이며, 같은 실험에서 다른 구성 요소의 기여까지 함께 증명한 것은 아닙니다.

![Table 4: Comparison of PandaLM performance w/ and w/o reasons and references](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-4818552bd2b9e863914a5fc417d75f60.png?thumb=512)

**Table 4** : Comparison of PandaLM performance w/ and w/o reasons and references.

[원문](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 범위와 한계

저자들은 하이퍼파라미터 탐색 범위가 일반적 관행과 선행 문헌을 바탕으로 정해졌기 때문에 절대적으로 최적인 설정을 포함하지 않을 수 있다고 밝힙니다. 또한 핵심 학습 데이터가 GPT-3.5에서 증류되었으므로 사람의 선호와 완전히 일치하지 않을 수 있습니다. 논문은 주로 결과 기반 평가에 초점을 두며, 지도 학습 설정만 다루었습니다. 따라서 반지도, 노이즈, 불균형 학습으로의 확장은 향후 과제로 남아 있습니다.

## 논문 정보

- **저자**: Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 6월 8일
- **등록일**: 2026년 11월 5일
- **수정일**: 2024년 5월 24일
- **버전**: v2
- **arXiv**: 2306.05087
- **분류**: cs.CL · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2306.05087v2) · [원문 PDF ↗](https://arxiv.org/pdf/2306.05087v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Instruction tuning large language models (LLMs) remains a challenging task, owing to the complexity of hyperparameter selection and the difficulty involved in evaluating the tuned models. To determine the optimal hyperparameters, an automatic, robust, and reliable evaluation benchmark is essential. However, establishing such a benchmark is not a trivial task due to the challenges associated with evaluation accuracy and privacy protection. In response to these challenges, we introduce a judge large language model, named PandaLM, which is trained to distinguish the superior model given several LLMs. PandaLM's focus extends beyond just the objective correctness of responses, which is the main focus of traditional evaluation datasets. It addresses vital subjective factors such as relative conciseness, clarity, adherence to instructions, comprehensiveness, and formality. To ensure the reliability of PandaLM, we collect a diverse human-annotated test dataset, where all contexts are generated by humans and labels are aligned with human preferences. Our results indicate that PandaLM-7B achieves 93.75% of GPT-3.5's evaluation ability and 88.28% of GPT-4's in terms of F1-score on our test dataset. PandaLM enables the evaluation of LLM to be fairer but with less cost, evidenced by significant improvements achieved by models tuned through PandaLM compared to their counterparts trained with default Alpaca's hyperparameters. In addition, PandaLM does not depend on API-based evaluations, thus avoiding potential data leakage. All resources of PandaLM are released at https://github.com/WeOpenML/PandaLM.

## 원문 인용

Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang (2023). PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization. arXiv:2306.05087v2. https://arxiv.org/abs/2306.05087v2

**BibTeX**

```
@misc{wang2023pandalm,
  title = {{PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization}},
  author = {Yidong Wang and Zhuohao Yu and Zhengran Zeng and Linyi Yang and Cunxiang Wang and Hao Chen and Chaoya Jiang and Rui Xie and Jindong Wang and Xing Xie and Wei Ye and Shikun Zhang and Yue Zhang},
  year = {2023},
  eprint = {2306.05087},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.05087v2}
}
```

## 이 논문의 용어

- [accuracy](https://refivu.com/terms/1995c0cd6282-accuracy)
- [Perplexity](https://refivu.com/terms/2b204e513801-perplexity)
- [cross-entropy loss](https://refivu.com/terms/14067bdf8b9f-cross-entropy-loss)
- [GPT-4](https://refivu.com/terms/1e2d0d2cdc44-gpt-4)
- [AdamW](https://refivu.com/terms/3228299bf379-adamw)
- [Federated Learning](https://refivu.com/terms/c6fc55e6f812-federated-learning)
- [SGD](https://refivu.com/terms/96a2d83e44ca-sgd)
- [GPT-3.5](https://refivu.com/terms/30414fb33dba-gpt-3-5)
- [Cohen’s Kappa](https://refivu.com/terms/25228dabdda8-cohen-s-kappa)
- [log-likelihood](https://refivu.com/terms/1b600a4b0bbc-log-likelihood)
- [PubMedQA](https://refivu.com/terms/238ad55bc6c5-pubmedqa)
- [Self-Instruct](https://refivu.com/terms/599304dadef6-self-instruct)
- [BioASQ](https://refivu.com/terms/8cd523109c6e-bioasq)
- [position bias](https://refivu.com/terms/a70d2454f5a2-position-bias)
- [LLaMA-7B](https://refivu.com/terms/31b2db9bb595-llama-7b)
- [lm-eval](https://refivu.com/terms/8ae3f1b63257-lm-eval)
- [PandaLM](https://refivu.com/terms/df34d9c92878-pandalm)

## 다른 논문 해설

- [Mind the Gap: Conformative Decoding to Improve Output Diversity of Instruction-Tuned Large Language Models](https://refivu.com/papers/937dbbed-286c-4773-a886-944ee9d12103-mind-the-gap-conformative-decoding-to-improve-output.md)
- [ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7-chatretriever-adapting-large-language-models-for-generalized.md)
- [Astraios: Parameter-Efficient Instruction Tuning Code Large Language Models](https://refivu.com/papers/b61f49a7-6245-42de-8be2-62db558d11f2-astraios-parameter-efficient-instruction-tuning-code-large.md)
- [Large Language Models are Perplexed by some Political Parties](https://refivu.com/papers/07ee32dd-3a4a-4c38-8a88-39cd5e3494a5-large-language-models-are-perplexed-by-some-political.md)
- [Conformity in Large Language Models](https://refivu.com/papers/da9a0128-629d-4c9c-bdf2-329cc9841cc4-conformity-in-large-language-models.md)
- [MultiPLY: A Multisensory Object-Centric Embodied Large Language Model in 3D World](https://refivu.com/papers/cf200415-a9b6-4192-ac1e-4030b14e4a6a-multiply-a-multisensory-object-centric-embodied-large.md)
- [CLUE: A Chinese Language Understanding Evaluation Benchmark](https://refivu.com/papers/b4bc9096-0098-4c87-8ac2-865871c6cfda-clue-a-chinese-language-understanding-evaluation-benchmark.md)
- [Are All the Datasets in Benchmark Necessary? A Pilot Study of Dataset Evaluation for Text Classification](https://refivu.com/papers/46a32659-d4af-4908-875b-7732e6ac9530-are-all-the-datasets-in-benchmark-necessary-a.md)
- [Bitstream-Corrupted Video Recovery: A Novel Benchmark Dataset and Method](https://refivu.com/papers/b2fc93d6-c62d-4e40-a2b7-21d887fc8d68-bitstream-corrupted-video-recovery-a-novel-benchmark-dataset.md)
- [ELEVATER: A Benchmark and Toolkit for Evaluating Language-Augmented Visual Models](https://refivu.com/papers/d3be8dc0-aaa4-4e80-84d7-1f3c5a5c7c5b-elevater-a-benchmark-and-toolkit-for-evaluating-language.md)
- [SEAHORSE: A Multilingual, Multifaceted Dataset for Summarization Evaluation](https://refivu.com/papers/01a68808-9d3a-4a53-a65f-3ebd9270c5dc-seahorse-a-multilingual-multifaceted-dataset-for.md)
- [A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation](https://refivu.com/papers/19636609-291c-4c63-937d-9e2b965bec9e-a-eval-a-benchmark-for-cross-dataset-evaluation.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2-pandalm-an-automatic-evaluation-benchmark-for-llm)
