Large language model

최근글


새댓글


Hot Deal


Gen AI 분류

Parameter values

컨텐츠 정보

본문

Parameter values Each call that you send to a model includes parameter values that control how the model generates a response. The model generates different results for different parameter values. For this task, you experiment with different parameter values to get the best results for the task. The parameters available for different models may differ, but the most common are: Temperature Token limit Top-K Top-P Temperature Temperature controls the degree of randomness in token selection, when Top-K and Top-P are applied. Lower temperatures are good for prompts that require a more deterministic and less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 is deterministic, meaning that the highest probability response is always selected. For most use cases, try starting with a temperature of 0.2. If the model returns a response that's too generic, too short, or the model gives a fallback response, try increasing the temperature. Token limit Token limit determines the maximum amount of text output from one prompt. A token is approximately four characters. The default value is 256. Specify a lower value for shorter responses and a higher value for longer responses. Top-K Top-K changes how the model selects tokens for output. A Top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a Top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature. For each token selection step, the Top-K tokens with the highest probabilities are sampled. Then tokens are further filtered based on Top-P with the final token selected using temperature sampling. Specify a lower value for less random responses and a higher value for more random responses. The default Top-K is 40. Top-P Top-P changes how the model selects tokens for output. Tokens are selected from the most (see Top-K) to least probable until the sum of their probabilities equals the Top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the Top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate. Specify a lower value for less random responses and a higher value for more random responses. The default Top-P is 0.80.

관련자료

댓글 1

Goormit님의 댓글

매개변수 값
모델에 보내는 각 호출에는 모델이 응답을 생성하는 방식을 제어하는 매개변수 값이 포함됩니다. 모델은 다른 매개변수 값에 대해 다른 결과를 생성합니다. 이 작업의 경우 최상의 결과를 얻기 위해 다양한 매개변수 값을 실험합니다.

다양한 모델에 사용 가능한 매개변수는 다를 수 있지만 가장 일반적인 것은:

온도(Temperature)
토큰 제한(Token limit)
Top-K
Top-P
온도(Temperature)
온도는 Top-K 및 Top-P가 적용될 때 토큰 선택의 무작위성 정도를 제어합니다. 더 낮은 온도는 보다 결정론적이고 덜 개방적이거나 창의적인 응답을 필요로 하는 프롬프트에 적합하며, 더 높은 온도는 더 다양하거나 창의적인 결과를 초래할 수 있습니다. 온도가 0이면 결정론적이어서 가장 높은 확률의 응답이 항상 선택됩니다.

대부분의 사용 사례의 경우 0.2의 온도로 시작해보십시오. 모델이 너무 일반적이거나 너무 짧은 응답을 반환하거나 모델이 폴백 응답을 제공하면 온도를 높여보십시오.

토큰 제한(Token limit)
토큰 제한은 하나의 프롬프트에서 출력되는 텍스트의 최대 양을 결정합니다. 토큰은 대략 네 글자입니다. 기본값은 256입니다.

더 짧은 응답을 위해 더 낮은 값을 지정하고 더 긴 응답을 위해 더 높은 값을 지정하십시오.

Top-K
Top-K는 모델이 출력을 위해 토큰을 선택하는 방식을 변경합니다. Top-K가 1인 경우 다음 선택된 토큰은 모델의 어휘에 있는 모든 토큰 중에서 가장 확률이 높은 토큰입니다(그리디 디코딩이라고도 함). 반면 Top-K가 3인 경우 다음 토큰은 세 개의 가장 확률이 높은 토큰 중에서 온도를 사용하여 선택됩니다.

각 토큰 선택 단계에서는 확률이 가장 높은 Top-K 토큰이 샘플링됩니다. 그런 다음 토큰은 Top-P를 기반으로 추가로 필터링되며 최종 토큰은 온도 샘플링을 사용하여 선택됩니다.

더 적은 무작위 응답을 위해 더 낮은 값을 지정하고 더 많은 무작위 응답을 위해 더 높은 값을 지정하십시오. 기본 Top-K는 40입니다.

Top-P
Top-P는 모델이 출력을 위해 토큰을 선택하는 방식을 변경합니다. 토큰은 가장 확률이 높은 토큰(참조 Top-K)에서 가장 확률이 낮은 토큰까지 선택되며 그들의 확률의 합이 Top-P 값과 같아질 때까지 선택됩니다. 예를 들어, 토큰 A, B, C가 각각 0.3, 0.2, 0.1의 확률을 가지고 있고 Top-P 값이 0.5인 경우 모델은 온도를 사용하여 다음 토큰으로 A 또는 B를 선택하고 C를 후보에서 제외합니다.

더 적은 무작위 응답을 위해 더 낮은 값을 지정하고 더 많은 무작위 응답을 위해 더 높은 값을 지정하십시오. 기본 Top-P는 0.80입니다.
전체 12 / 1 페이지
RSS
번호
제목
이름