I created a fine-tuned model and now I’m trying to use it as a classifier. I have 6 possible outputs but they all have different lengths varying from 1 token to 4-5 tokens. I am sending the various inputs with max_tokens set to 5 because that’s the length of the longest class. When the classification result is 1 token, it returns extra stuff appended to the first token, but so far the first token results in the correct answer. I’m trying to understand if there’s a better way to do this.
Is there any way I can get an exact class back instead of a string with multiple classes for the cases when the result is less than max_tokens?