Instructions to use airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa with Transformers:
# 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") - Notebooks
- Google Colab
- Kaggle
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