Here is the default formatting that you would use to train a model:
{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What's the capital of France?"}, {"role": "assistant", "content": "Paris, as if everyone doesn't know that already."}]}
{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who wrote 'Romeo and Juliet'?"}, {"role": "assistant", "content": "Oh, just some guy named William Shakespeare. Ever heard of him?"}]}
{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "How far is the Moon from Earth?"}, {"role": "assistant", "content": "Around 384,400 kilometers. Give or take a few, like that really matters."}]}
Remember that you need at least ten training examples to create a fine-tuned model.
Interesting project. If you have any problems or questions please feel free to reply to this message or send me a PM.
i’ve finetuned models before and am aware of the default formatting - but wanted to know if there’s any special format for the code interpreter input and output
I don’t really mess with any of those things because I think they’re a waste of money. @_j or @jr.2509 would be much better authorities on this
That said, my understanding is that code interpreter is a tool, and you’d fine tune for that. Here’s an example for function calls: openai-cookbook/examples/Fine_tuning_for_function_calling.ipynb at main · openai/openai-cookbook · GitHub - but I don’t know how applicable that still is. I imagine we’d have to reverse-engineer or extract the code interpreter call (unless that’s visible from the assistant api) and go from there.
I’d just tweak the cot instruction to ensure the model can find the correct solution on its own
So I don’t have a complete answer here but in addition to the link from @Diet, here’s a link to specific formatting requirements for fine-tuning for function calling:
function_call and functions have been deprecated in favor of tools , however, the fine-tuning API still requires the legacy format at this time.
Given that legacy formatting is required and given that code interpreter is a tool type and not a function, it sounds to me that fine-tuning for code interpreter is currently not supported.
All eyes now on @_j to see if there is anything we are missing here