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
|
Download README.md from airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa: direct link, hf CLI and curl.
- Browser
- Download file 2.43 kB
-
https://huggingface.co/airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa/resolve/main/README.md
- Command line
-
hf download hf://airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa/README.md
-
curl -L -o README.md https://huggingface.co/airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa/resolve/main/README.md
2.43 kB
metadata
language: th
widget:
- text: สวนกุหลาบเป็นโรงเรียนอะไร
context: >-
โรงเรียนสวนกุหลาบวิทยาลัย (Suankularb Wittayalai School) (อักษรย่อ : ส.ก.
/ S.K.) เป็นโรงเรียนชายล้วน ระดับชั้นมัธยมศึกษาขนาดใหญ่พิเศษ
สังกัดสำนักงานเขตพื้นที่การศึกษามัธยมศึกษาเขต 1
สำนักงานคณะกรรมการการศึกษาขั้นพื้นฐาน (ชื่อเดิม: กรมสามัญศึกษา)
กระทรวงศึกษาธิการ ก่อตั้งโดย พระบาทสมเด็จพระจุลจอมเกล้าเจ้าอยู่หัว
ได้รับการสถาปนาขึ้นในวันที่ 8 มีนาคม พ.ศ. 2424 (ขณะนั้นนับวันที่ 1 เมษายน
เป็นวันขึ้นปีใหม่ เมื่อนับอย่างสากลถือเป็น พ.ศ. 2425)
โดยเป็นโรงเรียนรัฐบาลแห่งแรกของประเทศไทย
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