xlang-ai / UnifiedSKG

[EMNLP 2022] Unifying and multi-tasking structured knowledge grounding with language models
https://arxiv.org/abs/2201.05966
Apache License 2.0
549 stars 58 forks source link

WikiSQL model producing only one token as output #20

Closed MatriXcel closed 2 years ago

MatriXcel commented 2 years ago

I tried to go off the collab demo and loaded the wikiSQL tokenizer and model, when I tried running it, the output just spit out one token and I have no idea what's wrong.

image image

Timothyxxx commented 2 years ago

HI,

It may because you fed a Spider-like input into a specially prefix-tuned model on WikiSQL task. If I understand rightly. If you want to use it to do WikiSQL task, you should fed into WikiSQL-like string. For example, struct_in should be col : player | no. | nationality | position | years in toronto | school/ club team row 1 : antonio lang | 21 | united states | guard-forward | 1999-2000 | duke row 2 : voshon lenard | 2 | united states | guard | 2002-03 | minnesota row 3 : martin lewis | 32, 44 | united states | guard-forward | 1996-97 | butler cc (ks) row 4 : brad lohaus | 33 | united states | forwardcenter | 1996 | iowa row 5 : art long | 42 | united states | forward-center | 2002-03 | cincinnati row 6 : john long | 25 | united states | guard | 1996-97 | detroit row 7 : kyle lowry | 3 | united states | guard | 2012-present | villanova and request_in should be what position does the player who played for butler cc (ks) play?. For more details, please check how we exactly do it in here and Appendix F in the paper.

Hope these information helpful!

Thanks!

Timothyxxx commented 2 years ago

Contact us if you have further problem!