When an LLM is used as your translation provider, adjustable translation parameters allow you to tailor the translation output to your preferences, for example by adapting the level of output creativity, sampling range and repetition tolerance.
Info: When setting up an LLM Profile in Smartling, it is optional to customize the translation parameters. If you do not specify any values for these parameters in your Profile, the default values for the selected model will be used. Please consult your provider's documentation for more details.
Depending on the LLM you are using as your translation provider, some of the following translation parameters may be be available for you to adjust.
Temperature
The temperature determines the output creativity. The lower the temperature, the more direct the LLM's translation will be. A higher temperature can be used to achieve a more creative translation output, however the lack of repeatability makes it difficult to reproduce the same translation output. A high temperature may also increase the probability of the model straying from the context or hallucinating.
Top P
Similarly to autocomplete options in other systems, LLMs can determine which word is the most likely to follow the previous tokens in a sentence. Top P refers to the probability of a certain word being chosen in a particular context. This parameter changes how the model selects tokens for output.
The range for the Top P parameter is 0.0 to 1.0.
Top K
The Top-K parameter changes how the model selects tokens for output. Specify a lower value for less random and more on-topic responses, and a higher value for more random responses.
Presence penalty
This parameter penalizes tokens which appear repeatedly, by encouraging the model to include a more diverse range of tokens in the generated text.
The Presence Penalty parameter ranges from -2.0 to 2.0. A high Presence Penalty will result in the model being more likely to generate tokens that have not yet been included in the output text and it can be used to prevent topic repetition.
Frequency penalty
This parameter penalizes tokens based on how many times they have already appeared in the generated text. The more frequently a token has appeared, the more it will be penalized. Therefore, the frequency penalty parameter can be used to avoid word repetitions and to encourage the use of synonyms.
The value ranges from -2.0 to 2.0. Negative values can make the repetition of words and phrases more likely, while positive values discourage repeated words.
Tip: When tweaking the translation parameters, it is recommended to only change one parameter at a time. This allows you to better gauge the effect that the changed parameter is having on the translation output.