Extract output
#49
by
tkaintura
- opened
Hi,
I ran the Gemma Model and I use tokenizer.decode(outputs[0]) and it give me the with the input text I have given to the tokenizer and then the output followed by an . Is there any way that I can just get the output as a string without the input text in the generated output?
Hi @tkaintura , Models will give input text in generated output. To skip it Please follow below solutions:
- Use the length of the input tokens to determine where the generated tokens start.
- Decode the tokens that follow the input length.
Kindly find the below screenshot for more reference. Thank you.