Closed zhaochenyang20 closed 1 year ago
Unfortunately I think "t5-small" is a bit too small, the model isn't very good at following JSON conventions. it would work in theory, but as above, it seems to want to generate things like {"name": " "}
, since we chop/stop at the first generated "
I did revamp the string generation logic to include a start quote in the prompt, removing the requirement that the model generates the start quote. This should make it less brittle, but in order to get sensible outputs, I think going larger on the model is your best bet @zhaochenyang20
@zhaochenyang20 just published 0.10.0, can you retry with that version? It's not much progress with the model you're using though, but it does not error anymore.
With your example I get {"name": ":"}
Thanks!
I will see if this works out. And here is a related paper for you:
In your
readme.md
, your model and tokenizer are:I just want to use a typical
T5ForConditionalGeneration
model as follows:But failed due to the error when generating string:
And I might have to say, could you add more docstring and type hints for your project?