How can I prevent a fine-tuned model from generating a lot of END tokens?

Hi friends,

I’ve been trying to experiment with fine-tuning an ada model to ouput IaC files, however the model generates random tokens to the max lenght I’ve set in the portal, is there any way to stop this from happening?

1 Like

Please post an example of the prompt and the expected completion.

Also, please post example lines of your JSONL fine-tuning training file and note the parameters you used when you fine tuned your ada base model.

Please post actual text and not screen shots, because to help you we can easily test and we do not want to type from a screen shot (take too much time and so that will not happen), but copy-and-paste from the actually text (so we can test quickly and accurately).

Thanks @ionascumihaig


@ruby_coder Thanks, for taking the time to answer.


This module create a storageAccount resource with apiVersion 2021-01-01.

Expected output:

{‘type’: ‘’, ‘apiversion’: ‘2019-04-01’, ‘name’: "[variables(‘diagnostic_storagegroup_name’)]", ‘location’: "[parameters(‘location’)]", ‘sku’: {‘name’: ‘standard_lrs’, ‘tier’: ‘standard’}, ‘kind’: ‘storagev2’, ‘properties’: {‘networkacls’: {‘bypass’: ‘azureservices’, ‘defaultaction’: ‘allow’}, ‘supportshttpstrafficonly’: false, ‘encryption’: {‘services’: {‘file’: {‘enabled’: true}, ‘blob’: {‘enabled’: true}}, ‘keysource’: ‘’}}} END"}

JSONL file used for fine tuning: train_prepared.jsonl - Google Drive