- Print
- PDF
CLOVA Studio JP concept
- Print
- PDF
Available in Classic and VPC
Before learning the entire scenario using CLOVA Studio JP, some concepts about CLOVA Studio JP will be explained. The following are the main concepts to be explained.
- Prompt and completion
- Token
- Probability-based language model
- Parameter
- Generation type
- Tuning
- Test app
- Service app
Please refer to CLOVA Studio JP glossary for better understanding of CLOVA Studio JP concept.
Prompt and completion
Prompts mean what you have to type in order to perform an action in CLOVA Studio JP. Based on the prompts entered in CLOVA Studio JP, the HyperCLOVA language model generates output values. The HyperCLOVA language model works based on probability, so even if the same prompt is input, different completions may be created.
<Example> If 'monkey's ass is red' is entered at the prompt, the result value 'red is an apple, and an apple is delicious' is generated with a high probability.
Token
Token means a word piece made by dividing a word for processing natural language. Korean words are mostly divided into one to two tokens of the unit of morpheme. However, the HyperCLOVA language model divides the tokens in accordance with the learned content, so an identical expression is not composed of the same tokens every time.
<Example> The expression 'delicious' can be divided into two tokens, 'taste' and 'there is' respectively.
Probability-based language model
A probability-based language mode refers to a language model that can predict the next word based on probabilities. The HyperCLOVA language model used in CLOVA Studio JP is a probability-based language model that generates results based on probabilities.
<Example> If you enter a description of nature in the prompt, and the first token of the result is 'that', you can predict 'tree', 'flower', and 'mountain' as the next word. At this time, each word has a probability, and the HyperCLOVA language model selects ‘tree’ and ‘on’ with the highest probabilities among them, and creates a result of ‘on that tree’ in principle.
Parameter
Parameters are values that you set in Playground to create phrases, and can be set in the Playground's left sidebar. Parameter items are as follows.
- Engine
- Top K
- Top P
- Maximum tokens
- Temperature
- Repetition penalty
- Stop sequences
- Inject start text
- Inject restart text
- Show probabilities
Engine
Engine is a language model used for creating phrases in the CLOVA Studio JP. The CLOVA Studio JP provides the Japanese engines of LJ-B, LJ-C, and you can select one of them. The greater the model size, the better the performance, but the speed may be lower.
- Japanese engine model size
LJ-B < LJ-C < LJ-D - Japanese engine model speed
LJ-D < LJ-C < LJ-B
Top K
Top K is a reference value used for selecting one of K numbers of tokens with the highest probabilities in the selection probability distribution of the tokens predicted by the natural language processing model.It is recommended to set Top K to 0 unless it is a special case.
<Example> In the case of Top K=5, one token is selected among the 5 tokens with the highest probabilities. Here, the probability is high that the token with the highest probability will be selected, but a token with a lower probability may be selected according to occasion.
Top P
Top P is a reference value used to remove a token not included in the accumulated probability value which is set after the tokens with higher selection probability values are arranged in order. It is recommended to set Top P to 0.8~ 1 unless it is a special case.
<Example> In the case of Top P=0.8, only tokens with cumulative probability values in the top 80% are selected as candidates.
Maximum tokens
Maximum tokens is the maximum number of tokens to use when generating the completion. The higher the number of tokens is set, the longer the output result. Only up to 2,048 tokens including prompt and completion are allowed.
Temperature
Temperature is a value to control diversity of sentences by granting changes in the weighted value to the probability distribution. If the temperature is set low, the ranking of the tokens included in the candidates is not changed, but the tokens with higher probabilities have even higher probabilities and the tokens with lower probabilities have even lower probabilities. Since there is a high possibility that the highest ranking token is selected, a typical completion is created. On the other hand, if the Temperature is set high, the differences in probability value between tokens are smaller and various sentences can be made, but sentences that do not completely match the rules may be created and the quality of sentences may be lower. Therefore, we recommend adjusting the temperature as needed while fixing the Top P value.
If the Temperature value is low
If the Temperature value is High
Repetition penalty
Repetition penalty is a value for granting a score-decreasing element to those repeated tokens so that repeated completions cannot be created when phrases are created in the CLOVA Studio JP. The higher the repetition penalty, the lower the probability that the same completion will be created repeatedly.
Stop sequences
Stop sequences are a text string to be used for suspending the creation of a result. You can register multiple Stop sequences, and when CLOVA Studio JP creates a result, if one of the Stop sequences is included in the result, only the contents up to that point are output.
<Example> If you enter 'monkey's ass is red' for the prompt and add the string 'apple' to the Stop sequences, the result will be output only up to 'red is', but not from 'apple'.
Inject start text
Inject start text is a text to always be output before the completion output by the CLOVA Studio JP.
<Example> When creating a phrase that has a conversation between the user and CLOVA, you can distinguish the speaker by entering 'User: Tell me what the weather is today' in the prompt and setting 'CLOVA:' in the Inject start text.
Inject restart text
Inject restart text is a text to always be output after the completion output by the CLOVA Studio JP.
<Example> If 'User:' is set in Inject restart text, 'User:' is output along with the result value for the first entered prompt, so you do not have to enter 'User:' when entering the next prompt.
Show probabilities
Show probabilities is an option to display the probability of each created token to be selected. You can check what other candidate values there are.
Generation type
Generation type is a completion creation method. The types and descriptions of generation types are as follows.
Rolling
Rolling is a method where, if you input a prompt and create a completion and then try to create again, it recognizes the previously created completion as a part of the prompt and creates another result. Since the completion created after the first-input prompt is not input by the user, as you repeat creating, the result may deviate from the original intention you had when you first input the prompt.
One-time
One-time is a method to display the completion created after inputting a prompt in a preview format instead of outputting the result in the editor area right away, and allows the user to apply the result to the editor area.
Multiple
Multiple is a method in which, when creating the completion after entering a prompt, you can select the result value to be applied after creating a specified number of result values.
Examples
Examples is a method to additionally input content similar to a desired answer and obtain a completion similar to the intention when creating a completion after inputting a prompt.
Tuning
Tuning refers to a method to transform a part of the pre-learned model parameter to fit a user’s purpose, and re-learn a part of the model for the user data. You can train and test a model optimized for the desired task type and data through tuning by inputting a certain amount of training/validation dataset. You can use the updated model by turning it into an API to meet new data and various purposes.
Job
Job refers to a standard unit for performing tuning. You can select one job type, language, and model engine for each job. Afterwards, you can create the most optimized model to the job type, language, model engine, and dataset by learning through the user dataset.
Test app
The test app is an app to provide an API temporarily for checking the possibility of the test or service. There is a limit in use (period, call volume), and if the test app is actually applied to a service, the service quality may have problems. In addition, if the test app is used for an actual service, it is blocked. During the beta period, you can use the test app up to the number of tokens granted.
Service app
The service app an access the CLOVA Studio JP API and is provided for actual users to utilize. If approved after going through the service app review issuance process, a key is issued, and if the service app is used for a purpose different from the review, the provision of the app is blocked without prior sharing.