I noticed the repetition_penalty_whitelist is sent to the API as array of arrays while the web ui is sending a flat array of numbers.
Therefore I don't know, if the way we are sending it now is even used by the API.
I'm not sure if my approach is good (I'm not a python developer), but it works.
Feel free to give hints on how better send the list as flat int array.
It seems I indeed forgot to flatten the list. Side effect of using the tokenizer instead of token indexes directly.
Code seems fine, might have starred the lists for one less loop, but it's a minor detail.
I noticed the
repetition_penalty_whitelist
is sent to the API as array of arrays while the web ui is sending a flat array of numbers. Therefore I don't know, if the way we are sending it now is even used by the API.I'm not sure if my approach is good (I'm not a python developer), but it works.
Feel free to give hints on how better send the list as flat int array.