🚀 TAPAS微小模型在順序問答(SQA)上的微調版本
本模型有兩個可用版本。默認版本對應於原始GitHub倉庫中的tapas_sqa_inter_masklm_tiny_reset
檢查點。該模型在掩碼語言模型(MLM)和作者所稱的中間預訓練的額外步驟上進行了預訓練,然後在SQA上進行了微調。它使用相對位置嵌入(即在表格的每個單元格處重置位置索引)。
另一個(非默認)可用版本是:
no_reset
,對應於tapas_sqa_inter_masklm_tiny
(中間預訓練,絕對位置嵌入)。
免責聲明:發佈TAPAS的團隊並未為該模型編寫模型卡片,此模型卡片由Hugging Face團隊和貢獻者編寫。
✨ 主要特性
本模型基於TAPAS架構,經過預訓練和微調,可用於順序問答任務。它有不同的版本,分別採用相對位置嵌入和絕對位置嵌入,以適應不同的需求。
📚 詳細文檔
SQA上的開發準確率結果
模型描述
TAPAS是一個類似於BERT的Transformer模型,以自監督的方式在來自維基百科的大量英文數據語料庫上進行預訓練。這意味著它僅在原始表格和相關文本上進行預訓練,沒有人工進行任何標註(這就是為什麼它可以使用大量公開可用的數據),並通過自動過程從這些文本中生成輸入和標籤。更準確地說,它以兩個目標進行預訓練:
- 掩碼語言模型(MLM):給定一個(扁平化的)表格和相關上下文,模型隨機掩碼輸入中15%的單詞,然後將整個(部分掩碼的)序列輸入模型。模型隨後需要預測被掩碼的單詞。這與通常逐個處理單詞的傳統循環神經網絡(RNN)不同,也與像GPT這樣內部掩碼未來標記的自迴歸模型不同。它允許模型學習表格和相關文本的雙向表示。
- 中間預訓練:為了鼓勵在表格上進行數值推理,作者通過創建數百萬個語法生成的訓練示例的平衡數據集,對模型進行了額外的預訓練。在這裡,模型必須預測(分類)一個句子是否得到表格內容的支持或反駁。訓練示例基於合成語句和反事實語句創建。
通過這種方式,模型學習了表格和相關文本中使用的英語語言的內部表示,然後可用於提取對下游任務有用的特徵,例如回答關於表格的問題,或確定一個句子是否被表格內容所蘊含或反駁。微調是通過在預訓練模型之上添加一個單元格選擇頭,然後在SQA上聯合訓練這個隨機初始化的分類頭和基礎模型來完成的。
預期用途和限制
你可以使用此模型在對話場景中回答與表格相關的問題。關於代碼示例,請參考HuggingFace網站上TAPAS的文檔。
訓練過程
預處理
文本使用WordPiece進行小寫處理和分詞,詞彙表大小為30,000。模型的輸入形式如下:
[CLS] 問題 [SEP] 扁平化表格 [SEP]
微調
模型在32個Cloud TPU v3核心上進行了200,000步的微調,最大序列長度為512,批量大小為128。在這種設置下,微調大約需要20小時。使用的優化器是Adam,學習率為1.25e - 5,熱身比例為0.2。添加了一個歸納偏置,使模型僅選擇同一列的單元格。這反映在TapasConfig
的select_one_column
參數中。另請參閱原始論文中的表12。
BibTeX引用和引用信息
@misc{herzig2020tapas,
title={TAPAS: Weakly Supervised Table Parsing via Pre-training},
author={Jonathan Herzig and Paweł Krzysztof Nowak and Thomas Müller and Francesco Piccinno and Julian Martin Eisenschlos},
year={2020},
eprint={2004.02349},
archivePrefix={arXiv},
primaryClass={cs.IR}
}
@misc{eisenschlos2020understanding,
title={Understanding tables with intermediate pre-training},
author={Julian Martin Eisenschlos and Syrine Krichene and Thomas Müller},
year={2020},
eprint={2010.00571},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@InProceedings{iyyer2017search-based,
author = {Iyyer, Mohit and Yih, Scott Wen-tau and Chang, Ming-Wei},
title = {Search-based Neural Structured Learning for Sequential Question Answering},
booktitle = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics},
year = {2017},
month = {July},
abstract = {Recent work in semantic parsing for question answering has focused on long and complicated questions, many of which would seem unnatural if asked in a normal conversation between two humans. In an effort to explore a conversational QA setting, we present a more realistic task: answering sequences of simple but inter-related questions. We collect a dataset of 6,066 question sequences that inquire about semi-structured tables from Wikipedia, with 17,553 question-answer pairs in total. To solve this sequential question answering task, we propose a novel dynamic neural semantic parsing framework trained using a weakly supervised reward-guided search. Our model effectively leverages the sequential context to outperform state-of-the-art QA systems that are designed to answer highly complex questions.},
publisher = {Association for Computational Linguistics},
url = {https://www.microsoft.com/en-us/research/publication/search-based-neural-structured-learning-sequential-question-answering/},
}
📄 許可證
本模型採用Apache 2.0許可證。