Bntqa Mbart
B
Bntqa Mbart
vaishaliによって開発
BnTQA-mBart は mBART アーキテクチャに基づく低リソースベンガル語表質問応答モデルで、ベンガル語の構造化表データに対する質問応答タスク専用に設計されています。
ダウンロード数 17
リリース時間 : 9/27/2024
モデル概要
このモデルは低リソースインド語族(特にベンガル語)の表質問応答タスクに特化しており、構造化表から情報を抽出したり、回答として表を生成したりできます。
モデル特徴
低リソース言語サポート
ベンガル語などの低リソースインド語族向けに特別に設計されており、これらの言語における表質問応答分野の空白を埋めます
完全自動データ生成
完全自動の大規模表質問応答データ生成プロセスを採用し、低リソース言語の注釈付きデータ不足問題を解決します
言語間転移能力
ゼロショット言語間転移能力を備えており、関連言語のタスクに適応可能です
モデル能力
表質問応答
構造化データクエリ
数学的推論
言語間転移
使用事例
ビジネスインテリジェンス
財務諸表分析
ベンガル語の財務諸表から特定のデータ項目を抽出
教育
学習教材質問応答
ベンガル語教材の表内容に基づく質問に回答
🚀 低リソーステーブル質問応答モデル (BnTQA - mBart)
このプロジェクトは、低リソース言語(特にベンガル語)に対するテーブル質問応答システムを提供します。Transformerベースのモデルを使用して、構造化情報を持つテーブルに関する質問に回答します。
🚀 クイックスタート
このモデルを使用するには、以下の手順に従ってください。
💻 使用例
基本的な使用法
import pandas as pd
from datasets import load_dataset
from transformers import MBartForConditionalGeneration
model = MBartForConditionalGeneration.from_pretrained("vaishali/BnTQA-mBart")
tokenizer = AutoTokenizer.from_pretrained(args.pretrained_model_name, src_lang="bn_IN", tgt_lang="bn_IN")
forced_bos_id = forced_bos_token_id = tokenizer.lang_code_to_id["bn_IN"]
# linearize table
def process_header(headers: List):
return "<কলাম> " + " | ".join(headers)
def process_row(row: List, row_index: int):
en2bnDigits = {'0': '০', '1': '১', '2': '২', '3': '৩', '4': '৪', '5': '৫', '6': '৬', '7': '৭', '8': '৮', '9': '৯', '.': '.'}
row_str = ""
row_cell_values = []
for cell_value in row:
if isinstance(cell_value, int) or isinstance(cell_value, float):
cell_value = convert_engDigit_to_bengali(str(cell_value))
row_cell_values.append(str(cell_value))
else:
row_cell_values.append(cell_value)
row_str += " | ".join(row_cell_values)
bn_row_index = []
for c in str(row_index):
bn_row_index.append(en2bnDigits[c])
return "<রো " + "".join(bn_row_index) + "> " + row_str
def process_table(table_content: Dict):
table_str = process_header(table_content["header"]) + " "
for i, row_example in enumerate(table_content["rows"]):
table_str += process_row(row_example, row_index=i + 1) + " "
return table_str.strip()
# load the dataset
banglatableQA = load_dataset("vaishali/banglaTabQA")
for sample in banglatableQA['train']:
question = sample['question']
input_table = pd.read_json(sample['table'], orient='split')
answer = pd.read_json(sample['answer'], orient='split')
# create the input sequence: query + linearized input table
table_content = {"header": list(input_table.columns)[1:], "rows": [list(row.values)[1:] for i, row in input_table.iterrows()]}
linearized_inp_table = process_table(table_content)
linearized_output_table = process_table({"name": None, "header": [translate_column(col) for col in list(answer.columns)],
"rows": [list(row.values) for i, row in answer.iterrows()]})
source = query + " " + linearized_inp_table
target = linearized_output_table
input = tokenizer(source,
return_tensors="pt",
padding="max_length",
truncation="longest_first",
max_length=1024,
add_special_tokens=True)
with tokenizer.as_target_tokenizer():
labels = tokenizer(target,
return_tensors="pt",
padding="max_length",
truncation="longest_first",
max_length=1024,
add_special_tokens=True).input_ids
# inference
out = model.generate(input["input_ids"].to("cuda"), num_beams=5, return_dict_in_generate=True,
output_scores=True, max_length=1024)
📚 詳細ドキュメント
モデル情報
属性 | 详情 |
---|---|
モデルタイプ | 低リソース言語用のテーブル質問応答モデル |
訓練データ | vaishali/banglaTabQA データセット |
BibTeX引用
@inproceedings{pal-etal-2024-table,
title = "Table Question Answering for Low-resourced {I}ndic Languages",
author = "Pal, Vaishali and
Kanoulas, Evangelos and
Yates, Andrew and
de Rijke, Maarten",
editor = "Al-Onaizan, Yaser and
Bansal, Mohit and
Chen, Yun-Nung",
booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2024",
address = "Miami, Florida, USA",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.emnlp-main.5",
pages = "75--92",
abstract = "TableQA is the task of answering questions over tables of structured information, returning individual cells or tables as output. TableQA research has focused primarily on high-resource languages, leaving medium- and low-resource languages with little progress due to scarcity of annotated data and neural models. We address this gap by introducing a fully automatic large-scale tableQA data generation process for low-resource languages with limited budget. We incorporate our data generation method on two Indic languages, Bengali and Hindi, which have no tableQA datasets or models. TableQA models trained on our large-scale datasets outperform state-of-the-art LLMs. We further study the trained models on different aspects, including mathematical reasoning capabilities and zero-shot cross-lingual transfer. Our work is the first on low-resource tableQA focusing on scalable data generation and evaluation procedures. Our proposed data generation method can be applied to any low-resource language with a web presence. We release datasets, models, and code (https://github.com/kolk/Low-Resource-TableQA-Indic-languages).",
}
📄 ライセンス
このプロジェクトはMITライセンスの下で公開されています。
Distilbert Base Cased Distilled Squad
Apache-2.0
DistilBERTはBERTの軽量蒸留バージョンで、パラメータ数が40%減少し、速度が60%向上し、95%以上の性能を維持しています。このモデルはSQuAD v1.1データセットで微調整された質問応答専用バージョンです。
質問応答システム 英語
D
distilbert
220.76k
244
Distilbert Base Uncased Distilled Squad
Apache-2.0
DistilBERTはBERTの軽量蒸留バージョンで、パラメータ数が40%減少し、速度が60%向上し、GLUEベンチマークテストでBERTの95%以上の性能を維持します。このモデルは質問応答タスク用に微調整されています。
質問応答システム
Transformers 英語

D
distilbert
154.39k
115
Tapas Large Finetuned Wtq
Apache-2.0
TAPASはBERTアーキテクチャに基づく表質問応答モデルで、ウィキペディアの表データで自己監督方式により事前学習され、表内容に対する自然言語質問応答をサポート
質問応答システム
Transformers 英語

T
google
124.85k
141
T5 Base Question Generator
t5-baseに基づく質問生成モデルで、答えとコンテキストを入力すると、対応する質問を出力します。
質問応答システム
Transformers

T
iarfmoose
122.74k
57
Bert Base Cased Qa Evaluator
BERT-base-casedに基づく質問と回答のペアの評価モデルで、質問と回答が意味的に関連しているかどうかを判断するために使用されます。
質問応答システム
B
iarfmoose
122.54k
9
Tiny Doc Qa Vision Encoder Decoder
MIT
MITライセンスに基づく文書質問応答モデルで、主にテスト目的で使用されます。
質問応答システム
Transformers

T
fxmarty
41.08k
16
Dpr Question Encoder Single Nq Base
DPR(密集パッセージ検索)はオープンドメイン質問応答研究のためのツールとモデルです。このモデルはBERTベースの質問エンコーダーで、Natural Questions(NQ)データセットでトレーニングされています。
質問応答システム
Transformers 英語

D
facebook
32.90k
30
Mobilebert Uncased Squad V2
MIT
MobileBERTはBERT_LARGEの軽量化バージョンで、SQuAD2.0データセットで微調整された質問応答システムモデルです。
質問応答システム
Transformers 英語

M
csarron
29.11k
7
Tapas Base Finetuned Wtq
Apache-2.0
TAPASはTransformerベースの表質問応答モデルで、ウィキペディアの表データで自己教師あり学習により事前学習され、WTQなどのデータセットでファインチューニングされています。
質問応答システム
Transformers 英語

T
google
23.03k
217
Dpr Question Encoder Multiset Base
BERTベースの密集パラグラフ検索(DPR)の質問エンコーダーで、オープンドメイン質問応答研究に使用され、複数のQAデータセットで訓練されています。
質問応答システム
Transformers 英語

D
facebook
17.51k
4
おすすめAIモデル
Llama 3 Typhoon V1.5x 8b Instruct
タイ語専用に設計された80億パラメータの命令モデルで、GPT-3.5-turboに匹敵する性能を持ち、アプリケーションシナリオ、検索拡張生成、制限付き生成、推論タスクを最適化
大規模言語モデル
Transformers 複数言語対応

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-TinyはSODAデータセットでトレーニングされた超小型対話モデルで、エッジデバイス推論向けに設計されており、体積はCosmo-3Bモデルの約2%です。
対話システム
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
RoBERTaアーキテクチャに基づく中国語抽出型QAモデルで、与えられたテキストから回答を抽出するタスクに適しています。
質問応答システム 中国語
R
uer
2,694
98