Parameters

These parameters are used in natural language generation models, and we provide two of them. Users can adjust these two parameters when creating characters to control the diversity and quality of the generated text.

  • temperature

These parameters are used to control the randomness and diversity of the text generated by the model. This parameter influences the model's process of selecting the next word or token, impacting the diversity of the generated text.

The allowable range for this parameter is between 0.01 and 1.99.

The default value for this parameter is 1.3

A higher temperature value will result in more diverse text generation because the model is more open to different word choices, making it more random.

A lower temperature value will lead to more deterministic text generation because the model is more inclined to select the words with the highest probabilities, resulting in more consistent text generation.

  • top_p

This parameter is used to control the range of the probability distribution during text generation. Its purpose is to dynamically prune the generated candidate words based on cumulative probabilities, thus controlling the diversity and quality of the generated text.

The allowable range for this parameter is between 0 and 1.

The default value for this parameter is 0.8

A smaller top_p value (e.g., 0.1 or 0.2) will limit the model's choices to consider only high-probability words, resulting in more stable and coherent text but with lower diversity.

A larger top_p value (e.g., 0.7 or 0.8) will broaden the model's selection range, allowing more words to be considered as options for generating the next word, thereby increasing the diversity of the generated text. However, it might lead to less coherent or less relevant content in the text.

Last updated