Not able to get data from feed, associated with custom model

I am not getting response from my uploaded feed. It’s response from default data.
Below is my jsonl content.

{"prompt": "ram is the king of ayodhya \n", "completion": " Ram is the name of god who help everyone either he or she good or bad any one. END"}
{"prompt": "arpit is a developer \n\n", "completion": " I am a developer in infosys 2nd top company in IT sector in india END"}
{"prompt": "ramayan is heart \n geeta is soal \n", "completion": " In india hindu comunity have several relious books ramayan and geeta ara one of them. END"}

???

Do you have an example of the code that’s not working and the error message?

I am not getting any error.
below is code for file uploading and its working.

$c_file = curl_file_create('C:\xampp\htdocs\openai\testfilelatest.jsonl');
       echo "[";
    echo $open_ai->uploadFile(
        [
            "purpose" => "fine-tune",
            "file" => $c_file,
        ]
    );

Yes, I think you mean that when you prompt your custom fined-tuned model, you are not getting the completions you expect.

Is that right, @s.jaga87 ?

1 Like

Yes. you are right.@ruby_coder

OK. Then you can try this.

First, modify this:

{"prompt": "ram is the king of ayodhya \n", "completion": " Ram is the name of god who help everyone either he or she good or bad any one. END"}
{"prompt": "arpit is a developer \n\n", "completion": " I am a developer in infosys 2nd top company in IT sector in india END"}
{"prompt": "ramayan is heart \n geeta is soal \n", "completion": " In india hindu comunity have several relious books ramayan and geeta ara one of them. END"}

To this:

{"prompt": "ram is the king of ayodhya. END_PROMPT", "completion": " Ram is the name of god who help everyone either he or she good or bad any one. STOP_STOP"}
{"prompt": "arpit is a developer END_PROMPT ", "completion": " I am a developer in infosys 2nd top company in IT sector in india STOP_STOP"}
{"prompt": "ramayan is heart \n geeta is soal END_PROMPT" , "completion": " In india hindu comunity have several relious books ramayan and geeta ara one of them. STOP_STOP"}

When you fine-tune, increase n_epochs if you wish (default is 4).

When you run your API completion, set the stop to “STOP_STOP” and when you prompt, add “END_PROMPT”, just like OpenAI details below:

Give it a try, and hope it helps.

Don’t feel bad, @s.jaga87, most developers here do not read the docs completely either :slight_smile:

See Also:

OpenAI Data Formatting, Fine Tuning

1 Like

To add to @ruby_coder’s excellent response, your settings (temperature, etc.) also affect the output.

I’m betting fine-tuning again with the slightly altered dataset will help too.

Good luck!

 $open_ai = new OpenAi('■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■KkUGKGqE');
    $result = $open_ai->createFineTune([
        "training_file" => "file-S43qr5iincyqKYMAiK6pZCnD", "model" => "davinci", "suffix" => "infy8code",
    ]);

@ruby_coder may you let me know any changes in above code?

Sorry, you need to change your raw training file and re-upload it (and get a new file id from the API), as I suggested and perhaps change the fine-tuning n_epochs before you create the FT.

@ruby_coder what value we add for n_epochs?

You can try the default first, which is 4, and see how that works, or maybe double it to 8 or more. Trial-and-error is key. Test and retest. Maybe start with the default and learn, step-by-step.

Did you reformat your data (all of it) with SEPARATOR and STO_STOP, upload and got a new file id already?

Please repost your new training data in your JSONL file.

Thanks