Open ds-ssj opened 1 week ago
I think the output seems correct. Your problem seems to be a corner case that we did not enter in our experiments: our model is supposed to generate only a number, but it seems sometimes it will append some additional tokens.
For a quick fix, since it is not very open, you can do a try-except like:
ret = []
for s in outputs:
try:
v = int(s.strip())
ret.append(v)
except:
ret.append(100)
One possible reason why this happens is maybe different lib version can lead to unstability.
One possible reason why this happens is maybe different lib version can lead to unstability.
Thank you for your assistance. I understand that sometimes a legitimate output might be followed by an additional token. May I ask which library would cause some difference in this output behavior?
Not sure. The most likely ones are transformers
and torch
.
Hi. When I use the following commands in README:
An error accurs:
I observe the values of the
outputs
, like thisIs the
outputs
array is correct? I use all of config files the repo provided. Thelora-path
is downloaded from HF as mentioned in README.Thanks!