기본 모델 튜닝을 위한 데이터 형식

마지막 업데이트 날짜: 2025년 3월 04일
기본 모델 튜닝을 위한 데이터 형식

모델을 튜닝하는 데 사용할 프롬프트 예제 세트를 준비하십시오. 예제에는 모델이 런타임 시 처리해야 하는 입력 유형 및 응답으로 생성할 모델에 대한 적절한 출력이 포함되어야 합니다.

하나의 파일을 훈련 데이터로 추가할 수 있습니다.

훈련 데이터 요구사항

훈련 데이터를 작성할 때 다음 가이드라인을 따르십시오.

  • 100개에서 1,000개의 라벨링된 예시를 추가합니다.

    50-10 ,000개 사이의 예제가 허용됩니다.

  • 훈련 데이터의 언어는 영어여야 합니다.

  • 실험에서 사용되는 최대 토큰 한계 내에서 입력 및 출력 예제를 유지하십시오. 그렇지 않으면 예제 텍스트가 잘립니다.

    자세한 정보는 사용되는 토큰 수 제어를 참조하십시오.

    토큰을 계수하는 방법은 모델에 따라 다르며, 이로 인해 토큰 수를 추정하기가 어렵습니다. 언어 기반 기초 모델의 경우, 256개의 토큰을 약 130-170개의 단어로, 128개의 토큰을 약 65-85개의 단어로 생각할 수 있습니다. 자세한 정보는 토큰 및 토큰화를 참조하십시오.

조정된 기초 모델을 사용하여 데이터를 분류하려는 경우 다음 추가 가이드라인을 따르십시오.

  • 클래스 레이블 수를 10이하로 제한하십시오.
  • 각 클래스 유형에 대해 동일한 수의 예제를 포함하십시오.

Prompt Lab 를 사용하여 훈련 데이터의 예를 만들 수 있습니다. 자세한 내용은 Prompt Lab.

대표적인 예제 세트를 수집한 후에는 예제를 훈련에 사용할 세트와 테스트 목적으로 사용할 별도의 작은 세트로 그룹화하십시오.

파일 형식 요구사항

훈련 데이터 파일은 다음 요구사항을 충족해야 합니다.

  • 다음 형식 중 하나를 사용합니다.
    • JavaScript 오브젝트 표기법(JSON, JavaScript Object Notation)
    • JSON행 (JSONL) 형식
  • 허용되는 최대 파일 크기는 200MB입니다.
  • 각 예제에는 하나의 inputoutput 쌍이 포함되어야 합니다.
  • 입력 또는 출력 텍스트에 따옴표가 포함된 경우 각 따옴표를 백슬래시 (\) 로 이스케이프하십시오. 예를 들어, He said, \"Yes.\"입니다.
  • 캐리지 리턴 또는 행 바꾸기를 표시하기 위해 \n 이스케이프 시퀀스를 사용하여 새 행을 표시할 수 있습니다. 예를 들어, ...end of paragraph.\nStart of new paragraph입니다.

JSON 예

다음 예제는 JSON 형식의 분류 태스크에 대한 레이블 지정된 프롬프트가 있는 훈련 데이터 파일에서 발췌한 것입니다.

[
  {
    "input":"Message: When I try to log in, I get an error.",
    "output":"Class name: Problem"
  },
  {
  "input":"Message: Where can I find the plan prices?",
  "output":"Class name: Question"
  },
  {
    "input":"Message: What is the difference between trial and paygo?",
    "output":"Class name: Question"
  },
  {
    "input":"Message: The registration page crashed, and now I can't create a new account.",
    "output":"Class name: Problem"
  },
  {
    "input":"Message: What regions are supported?",
    "output":"Class name: Question"
  },
  {
    "input":"Message: I can't remember my password.",
    "output":"Class name: Problem"
  },
  {
    "input":"Message: I'm having trouble registering for a new account.",
    "output":"Classname: Problem"
  },
  {
    "input":"Message: A teammate shared a service instance with me, but I can't access it. What's wrong?",
    "output":"Class name: Problem"
  },
  {
    "input":"Message: What extra privileges does an administrator have?",
    "output":"Class name: Question"
  },
  {
    "input":"Message: Can I create a service instance for data in a language other than English?",
    "output":"Class name: Question"
  }
]

JSONL 예제

다음 예제는 JSONL 형식의 분류 태스크에 대한 레이블 지정된 프롬프트가 있는 훈련 데이터 파일에서 발췌한 것입니다.

{"input":"Message: When I try to log in, I get an error.","output":"Class name: Problem"}
{"input":"Message: Where can I find the plan prices?","output":"Class name: Question"}
{"input":"Message: What is the difference between trial and paygo?","output":"Class name: Question"}
{"input":"Message: The registration page crashed, and now I can't create a new account.","output":"Class name: Problem"}
{"input":"Message: What regions are supported?","output":"Class name: Question"}
{"input":"Message: I can't remember my password.","output":"Class name: Problem"}
{"input":"Message: I'm having trouble registering for a new account.","output":"Classname: Problem"}
{"input":"Message: A teammate shared a service instance with me, but I can't access it. What's wrong?","output":"Class name: Problem"}
{"input":"Message: What extra privileges does an administrator have?","output":"Class name: Question"}
{"input":"Message: Can I create a service instance for data in a language other than English?","output":"Class name: Question"}

상위 주제: 기초 모델 조정