-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context_setting.completion error #9
Comments
pls ignore this. I found an alternate way to achieve this. |
The python package needs updating, I am very busy with school but I'll try
to fix this when I get a chance
…On Wed, Sep 21, 2022, 3:37 PM shivatmica ***@***.***> wrote:
pls ignore this. I found an alternate way to achieve this.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK2ESRECH2WH7KZTO7EX4HTV7NPWLANCNFSM6AAAAAAQO42LII>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
How did you fix it? |
Can you update how to fix this issue? I am working on GPT-J to generate prompts and I am unable to run the code. During handling of the above exception, another exception occurred: I am getting the following error when I tried running
My python version is 3.10.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am getting the following error from context_setting.completion API.
I have tried both basic and adv example but similar issue.
Any pointers on how to resolve this?
Thanks!
/usr/lib/python3.7/json/decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
=================================================================
My code based on your example:
from gpt_j.Basic_api import simple_completion
In the prompt enter something you want to generate
prompt = "def perfect_square(num):"
Max length of completion
Max = 200
Temperature controls the creativity of the model
A low temperature means the model will take less changes when completing a prompt
A high temperature will make the model more creative
Both temperature and top probability must be a float
temperature = 0.6
top probability is an alternative way to control the randomness of the model
top_probability = 1.0
top_k is the number of top responses to return
This is the number of responses the model will return
top_k = 1
Rep is the number of times the model will repeat itself
This is the number of times the model will repeat itself when generating a response
rep = 0.216
Here you set query equal to the desired values
Note values higher that 512 tend to take more time to generate
res = context_setting.completion(prompt,
user=User,
bot=Bot,
max_tokens=max_tokens,
temperature=temperature,
top_p=top_probability,
top_k=top_k,
rep=repetition)
Finally we print the result
print(res)
The text was updated successfully, but these errors were encountered: