#fine_tunes.preparedata says I need `stop=["END"]` -- how do I implement that?

19 messages · Page 1 of 1 (latest)

granite iris
#

I have an open model with "prompt":"" and the completions are paragraphs each ending with END (also tried \n), but the bot rambles until it's out of tokens. I got it to stop saying END END END END by removing any spaces before END , but the output still rambles. -- When I run fine_tunes.preparedata it says "Make sure to include stop=["END"] so that the generated texts ends at the expected place." -- How can I fix this jsonl line: {"prompt": "", "completion": " A paragraph of text.END"}

granite iris
#

Actually, no. I still get END END END written at the end with it prepared in the above format.

dapper magnet
#

Try using a unique end like <|endoftext|> or ###

#

And then including the unique identifier as your stop

#

stop=["###"]

dapper magnet
#

It's strange that it's still writing the stop. Would you mind sharing your POST request?

granite iris
#

Maybe this is what I'm missing "And then including the unique identifier as your stop
stop=["###"]" -- Where does this go?

dapper magnet
#

It goes in your post request

#

{prompt: "say hi", stop: ["###"]}

granite iris
#

using a next.js front-end...

#

{  "model": "text-davinci-003",  "max_tokens": 7,  "temperature": 0,  "top_p": 1,  "n": 1,  "stream": false,  "logprobs": null,  "stop": "END" }

#

(so wish I could add line breaks in Discord...)

#

Ok so that line go somewhere in it's complete form. I'll request an update to the front-end tutorial (I believe it's the only front-end tutotial out there right now)

dapper magnet
#

Is it working now?

granite iris
#

yes, got it. here's the js after a few syntax updates:

#

const baseCompletion = await openai.createCompletion({
model: 'curie:ft-model-id-number',
prompt: ${basePromptPrefix}${req.body.userInput},
temperature: 0.4,
max_tokens: 130, 
stop: 'END'
});

dapper magnet
#

Right on. Good luck in your venture(s)

granite iris
#

Thank you. One last question? Is 1000 entries/examples in the json too much? Weights & Biases says no, but I've read elsewhere its way too much. (And I'm better it recognizing overtrained image models...)

dapper magnet
#

Not at all. I take the documentation as a rough guideline as they are constantly updating their services. What may be true today may change tomorrow, for the better