Large language model

최근글


새댓글


Hot Deal


Gen AI 분류

The `top_k` parameter (range: 0.0 - 40, default 40)

컨텐츠 정보

본문

#### The `top_k` parameter (range: 0.0 - 40, default 40) ##### What is _top_k_? `top_k` changes how the model selects tokens for output. A `top_k` of 1 means the selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding). In contrast, a `top_k` of 3 means that the next token is selected from the top 3 most probable tokens (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. ##### How does _top_k_ affect the response? Specify a lower value for less random responses and a higher value for more random responses. For more information on the `top_k` parameter for text models, please refer to the [documentation on model parameters](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#text_model_parameters).

관련자료

댓글 1

Goormit님의 댓글

'top_k' 파라미터(범위: 0.0 - 40, 기본값 40)

##### _top_k_가 무엇입니까?
top_k는 모델이 출력할 토큰을 선택하는 방법을 바꿉니다. 1의 top_k는 선택된 토큰이 모델의 어휘에 있는 모든 토큰 중에서 가장 가능성이 높다는 것을 의미합니다. 반면 3의 top_k는 (온도를 사용하여) 가장 가능성이 높은 상위 3개의 토큰 중에서 다음 토큰을 선택한다는 것을 의미합니다. 각 토큰 선택 단계에 대해 가장 가능성이 높은 top_k 토큰을 샘플링합니다. 그런 다음 온도 샘플링을 사용하여 선택된 최종 토큰으로 top_p를 기준으로 토큰을 더 필터링합니다.

##### _top_k_가 응답에 어떤 영향을 미칩니까?

랜덤 반응이 적으면 낮은 값을 지정하고 랜덤 반응이 많으면 높은 값을 지정합니다.

텍스트 모델의 'top_k' 파라미터에 대한 자세한 내용은 [모델 파라미터에 대한 document](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#text_model_parameters) 를 참조하시기 바랍니다.
전체 12 / 1 페이지
RSS
번호
제목
이름