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 449 Bytes
-
https://huggingface.co/airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa/resolve/6bc2da77b17a9e8b5c78f6f030dcbfee46f5804d/README.md
- Command line
-
hf download hf://airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa@6bc2da77b17a9e8b5c78f6f030dcbfee46f5804d/README.md
-
curl -L -o README.md https://huggingface.co/airesearch/wangchanberta-base-wiki-20210520-spm-finetune-qa/resolve/6bc2da77b17a9e8b5c78f6f030dcbfee46f5804d/README.md
449 Bytes
Run with:
export WANDB_PROJECT=wangchanberta-qa
export MODEL_NAME=airesearchth/wangchanberta-base-wiki-20210520-spm
CUDA_LAUNCH_BLOCKING=1 python train_question_answering_lm_finetuning.py \
--model_name $MODEL_NAME \
--revision main@ckp-25000 \
--dataset_name iapp_thaiqa \
--output_dir $MODEL_NAME-finetune-iapp_thaiqa-model \
--log_dir $MODEL_NAME-finetune-iapp_thaiqa-log \
--model_max_length 400 \
--pad_on_right \
--fp16