jaosex.blogg.se

J download
J download













j download

Here you set query equal to the desired values If you are using temperature set top probability to one top_probability = 1.0 top k is an integer value that controls part of the model top_k = 40 Repetition penalty will result in less repetative results repetition = 0.216 Initializing the SimpleCompletion class If you are using top probability set temperature one User: the speaker the person who is giving gpt-j a promptīot: an imaginary character of your choiceĬontext: the part of the prompt that explains what is happening in the dialogĮxamples: a dictionary of user intentions and how the bot should respond Basic Usage In the prompt enter something you want to generate from gpt_j.Basic_api import simple_completion prompt = "def perfect_square(num):" The maximum length of the output response max_length = 100 Temperature controls the creativity of the modelĪ low temperature means the model will take less changes when completing a promptĪ high temperature will make the model more creativeīoth temperature and top probability must be a float temperature = 0.09 top probability is an alternative way to control the randomness of the model Rep: The likely hood of the model repeating the same tokens lower values are more repetative Advanced Parameters Top_p: top probability will use the most likely tokens

j download

higher values will be more random (suggestest to keep under 1.0 or less, something like 0.3 works) Temperature: controls the randomness of the model. Tokens: the number of tokens to generate (values 204 or less are recommended) Prompt: the prompt you wish to give to the model A GPT-J API to use with python Installing gpt-j pip install gptj















J download