How to test fine tuned models in sandbox?

I fine tuned a davinci-02 model with about 35 examples in jsonl file, and validated with another 5. The output should be structured JSON, like imagine training to break a paragraph into an array of sentence objects,

The training seemed to get well, and the results looked promising, though i really have no reference point and just asked chatGPT :slight_smile:

Training loss: 1.2571
Validation loss: 0.8444

When i actually submitted prompts against this model however, the response was completely out to lunch, no sign of JSON anywhere, and not even related to the prompt. Like my prompt was something like ‘Say this is a sentence’ and the response was:

“choices”: [
“text”: ", and you’re not really going to do it. You’re just testing to see if I’ll do it. And if I do it, then you’ll know that I’m a good person, and you’ll let me live. And if I don’t do it, then you’ll know that I’m a bad person, and you’ll kill me. So, I’m going to do it. I’m going to kill you. I’m going to kill you. I’m going to kill you. I’m going to kill you. I’m going to kill you. I’m going to kill you. I’m going to kill you. I’m going to kill you.

Not very encouraging :skull_and_crossbones:

So my questions are: was my training successful or not? are those training/validation loss numbers alright? Is there some step i’m missing?

And finally, the documentation seems to indicate that i can select my fine tuned model in the playground, but I don’t see that ability. In fact, i only see gpt3.5 and gpt4 models for selection, not even davinci-2 or any other model.

Any help would be appreciated!


Oh my :rofl:

If you are aiming for a homicidal maniac GPT then I’d say so

Your training statistics are as good as the data you have given it.

You are going to need a lot more than a 35/5 split and I’m going to make a wild guess that your training data is not diverse enough. How many epochs did you use?

You need to be in the Completions section


Thank you for the immediate response!! Selecting completions obviously did the trick, don’t know how i didn’t see that :\

I realize 35/5 is pretty weak, but the 35 are very diverse and i was expecting at least something in the ballpark, but there is no trace of it providing json output.

is davinci-002 the wrong model for generating JSON structured output?

Also, the playground says completions are deprecated, and to use chat. Any idea which chat model would be best for json structure output?

1 Like


Seems like you bypassed the guardrails!


Hmm, may have found the answer. Guessing i should be using a gpt model with functions to get structure data. Will try that next…

With enough training data / epochs your model should always be outputting JSON. The fact that your training data is JSON and the output is … uhhh… not JSON to me indicates that it needs more training.

I honestly don’t know where Completions is heading. It’s losing documentation and is labelled as deprecated, but they suggest using these models.

But, yes, ideally you would use gpt-3.5-turbo for the price alone.

A good rule of thumb is to first use few-shot examples

This is a good method to practice your data and see what the model works with best.
Then, once you have enough few-shot examples and the cost of the tokens outweighs the difference in a fine-tuned model you can move towards it.

You may find that few-shot examples is enough for your use-case and fine-tuning isn’t necessary.

Taken from the OpenAI Fine-Tuning Guide:

Fine-tuning improves on few-shot learning by training on many more examples than can fit in the prompt, letting you achieve better results on a wide number of tasks. Once a model has been fine-tuned, you won’t need to provide as many examples in the prompt. This saves costs and enables lower-latency requests.


Thanks, this was also helpful. Trying out my training data in a one shot against gpt3.5 worked exactly as it should have, so not sure what davinci’s problem is. Probably pissed it’s being deprecated :smiley:

1 Like

I really want to know what lovecraftian horror this fine-tuned davinci saw to make it want to murder someone.