Transformers-Tutorials icon indicating copy to clipboard operation
Transformers-Tutorials copied to clipboard

did you work on finetuning Tapex too? I see a finetuned model on huggingface

Open sujit420 opened this issue 2 years ago • 6 comments

did you work on finetuning Tapex too? I see a finetuned model on huggingface

sujit420 avatar Jun 02 '22 07:06 sujit420

Hi,

All examples regarding TAPEX can be found here: https://github.com/huggingface/transformers/tree/main/examples/research_projects/tapex

NielsRogge avatar Jun 02 '22 08:06 NielsRogge

Thanks a lot. I'll take a look. Also, I was curious to know, have you figured out a way to get logits and cell information from tapex wtq model?

sujit420 avatar Jun 02 '22 08:06 sujit420

You can get logits by specifying output_scores=True to the generate method.

NielsRogge avatar Jun 02 '22 08:06 NielsRogge

output_scores=True

It doesn't have that parameter. I am using the latest transformers version. Any idea about other alternative? tokenizer_tapex = TapexTokenizer.from_pretrained("microsoft/tapex-large-finetuned-wtq") model_tapex = BartForConditionalGeneration.from_pretrained("microsoft/tapex-large-finetuned-wtq") encoding = tokenizer_tapex(table=tmp_table, query=query, return_tensors="pt") outputs = model_tapex.generate(**encoding, output_scores=True)

Here, outputs don't have logits. @NielsRogge

sujit420 avatar Jun 02 '22 08:06 sujit420

output_scores=True

It doesn't have that parameter. I am using the latest transformers version. Any idea about other alternative? tokenizer_tapex = TapexTokenizer.from_pretrained("microsoft/tapex-large-finetuned-wtq") model_tapex = BartForConditionalGeneration.from_pretrained("microsoft/tapex-large-finetuned-wtq") encoding = tokenizer_tapex(table=tmp_table, query=query, return_tensors="pt") outputs = model_tapex.generate(**encoding, output_scores=True)

Here, outputs don't have logits. @NielsRogge

@NielsRogge can you please help here or at least guide me in a direction

sujit420 avatar Jun 03 '22 18:06 sujit420

They include the scores, which are the raw logits in case you use greedy decoding.

NielsRogge avatar Jun 06 '22 11:06 NielsRogge