why does the model always tend to generate some extra answers?

#1
by Dludora - opened

Like this

/* Answer the following and only return the sql query: How many singers are in concert 26? */
SELECT COUNT(*) FROM singers WHERE concert_id = 26;

/* Answer the following and only return

I restrict the max_token to 50 and the llm always tends to generate some new questions and answer them.

My model setting is below:

input_tokens = tokenizer.encode("/* Answer the following and only return the sql query: How many singers are in concert 26? */", return_tensors="pt").cuda()
outputs = model.generate(input_tokens, max_length=50)
outputs = tokenizer.batch_decode(outputs)

Sign up or log in to comment