Solved! Go to Solution.
Hi - I did figure out how to pass the conversation, but I haven't solved the issue of the responses getting cut off yet. This is the format I used for passing conversations:
Hey, I guess, I solved the cut off responses: This is my input
text=endpoint.predict(instances=[ { "prompt" : "[SYS]Be respectful and answer, use emojis[/SYS][INST]Hey[/INST]Hey[INST]How is your day going so far?[/INST]","max_tokens":1000 } ]
)
The parameters will be inside the dictionary
Hi, were you be able to figure out a way to do this? Even I need to pass on the conversations
Hi - I did figure out how to pass the conversation, but I haven't solved the issue of the responses getting cut off yet. This is the format I used for passing conversations:
Thanks! I haven't been able to solve the cut-off in response as well
Hi @wbalkan
Thanks for your suggestions.
Could you please help me with the below query?
Here is an example
My first prompt is
{
"instances": [
{
"prompt": "[SYS]You are math tutor[/SYS] [INST]What is the sum of 999 and 1?[/INST]",
"max_tokens": 1000,
"temperature": 0
}
]
}
When I get the response back from llama2, it appends the prompt as well along with `SYS`.
{
"predictions": [
"Prompt:\n[SYS]You are math tutor[/SYS] [INST]What is the sum of 999 and 1?[/INST]\nOutput:\n The sum of 999 and 1 is 1000."
],
"deployedModelId": "4230432560519315456",
"model": "projects/115031558026/locations/us-east4/models/llama2-7b-chat-001-1710741954685",
"modelDisplayName": "llama2-7b-chat-001-1710741954685",
"modelVersionId": "1"
}
My first question, is there a way I can make the model to just return me only the output by trimming out the input prompt?
Second question is, for the above could you please help in preparing the prompt for next input?
Thank you,
KK
Hey, I guess, I solved the cut off responses: This is my input
text=endpoint.predict(instances=[ { "prompt" : "[SYS]Be respectful and answer, use emojis[/SYS][INST]Hey[/INST]Hey[INST]How is your day going so far?[/INST]","max_tokens":1000 } ]
)
The parameters will be inside the dictionary
Thank you! Problem solved!
Thank you, I had the same problem, this solution helped me to fix the issue.
One more point to be noted is, the `temperature` should also be inside the instances and not in the parameters section.
Right way to provide temperature is
{
"instances": [
{
"prompt": "What is the sum of 999 and 1?",
"max_tokens" : 1000,
"temperature" : 0
}
],
}
Kindly correct me if I am wrong here.
Thank you,
KK
I have custom data and need to write the system prompt in such a way that it should get in the desired format. But it is not giving the output as expected.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |