How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
# Warning: Pipeline type "question-answering" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# pip install "transformers<5.0.0"
from transformers import pipeline

pipe = pipeline("question-answering", model="airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa")
model = AutoModelForQuestionAnswering.from_pretrained("airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa", device_map="auto")
Quick Links

wangchanberta-base-wiki-20210520-spm-finetune-qa

Finetuning airesearchth/wangchanberta-base-wiki-20210520-spmd with the training set of iapp_wiki_qa_squad, thaiqa_squad, and nsc_qa (removed examples which have cosine similarity with validation and test examples over 0.8; contexts of the latter two are trimmed to be around 300 newmm words). Benchmarks shared on wandb using validation and test sets of iapp_wiki_qa_squad. Trained with thai2transformers.

Run with:

export MODEL_NAME=airesearchth/wangchanberta-base-wiki-20210520-news-spm
CUDA_LAUNCH_BLOCKING=1 python train_question_answering_lm_finetuning.py \\n  --model_name $MODEL_NAME \\n  --dataset_name chimera_qa \\n  --output_dir $MODEL_NAME-finetune-chimera_qa-model \\n  --log_dir $MODEL_NAME-finetune-chimera_qa-log \\n  --model_max_length 400 \\n  --pad_on_right \\n  --fp16
Downloads last month
61
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa 1