Formerly: WellnessConversation-LanguageModel
Korean README: README.ko.md
Korean wellness/counseling chatbot models built with PyTorch and Hugging Face Transformers. This repository is a research/learning snapshot and contains two main directions:
Goal: given a user query, predict a wellness category (the dataset includes 359 category classes).
Typical training example format:
See:
train/run_koelectra.py, train/run_text_classification.pymodel/koelectra.py, model/kobert.pydataloader/wellness.pyexample/koelectra-wellness-qa.py, example/kobert-wellness-qa.pyIn the example scripts, the predicted category is used to retrieve a canned answer from the dataset (randomly sampled among answers for the category).
Goal: train an autoregressive model to generate the next response given a user query.
Typical training example format:
question answer pairs from the wellness datasetSee:
train/run_auto_regressive.pymodel/kogpt2.pydataloader/wellness.pyexample/kogpt2-text-generation.pyThis repo does not ship the AI Hub dataset itself.
songys/Chatbot_dataThe original wellness dataset is organized around:
From the original Korean README:
Install dependencies:
pip install -r requirements.txt
Notes:
transformers versions (see requirements.txt, e.g. transformers==3.0.2).data/ and checkpoint/ under the repo root.kogpt2-transformerskobert-transformerstransformers==3.0.2torchThe training scripts use hard-coded paths (examples below). You may need to adjust them to match your local data layout.
train/run_koelectra.py
data/wellness_dialog_for_text_classification_train.txtcheckpoint/koelectra-wellnesee-text-classification.pthtrain/run_text_classification.py
data/wellness_dialog_for_text_classification_train.txtcheckpoint/kobert-wellnesee-text-classification.pthtrain/run_auto_regressive.py
data/wellness_dialog_for_autoregressive_train.txtcheckpoint/kogpt2-wellnesee-auto-regressive.pthpreprocess/training_data.py contains helper functions used during dataset preparation (Excel → text files, splitting train/test, etc.).
It is best treated as a reference script; you may need to adapt it depending on how you store the dataset locally.
A simple REST API is provided:
service/api.py
/api/wellness/dialog/bert?s=.../api/wellness/dialog/electra?s=...2020.06 ~ 2020.07
45 commits
Jupyter Notebook
68.0%
Python
31.6%
Formerly: WellnessConversation-LanguageModel
Korean README: README.ko.md
Korean wellness/counseling chatbot models built with PyTorch and Hugging Face Transformers. This repository is a research/learning snapshot and contains two main directions:
Goal: given a user query, predict a wellness category (the dataset includes 359 category classes).
Typical training example format:
See:
train/run_koelectra.py, train/run_text_classification.pymodel/koelectra.py, model/kobert.pydataloader/wellness.pyexample/koelectra-wellness-qa.py, example/kobert-wellness-qa.pyIn the example scripts, the predicted category is used to retrieve a canned answer from the dataset (randomly sampled among answers for the category).
Goal: train an autoregressive model to generate the next response given a user query.
Typical training example format:
question answer pairs from the wellness datasetSee:
train/run_auto_regressive.pymodel/kogpt2.pydataloader/wellness.pyexample/kogpt2-text-generation.pyThis repo does not ship the AI Hub dataset itself.
songys/Chatbot_dataThe original wellness dataset is organized around:
From the original Korean README:
Install dependencies:
pip install -r requirements.txt
Notes:
transformers versions (see requirements.txt, e.g. transformers==3.0.2).data/ and checkpoint/ under the repo root.kogpt2-transformerskobert-transformerstransformers==3.0.2torchThe training scripts use hard-coded paths (examples below). You may need to adjust them to match your local data layout.
train/run_koelectra.py
data/wellness_dialog_for_text_classification_train.txtcheckpoint/koelectra-wellnesee-text-classification.pthtrain/run_text_classification.py
data/wellness_dialog_for_text_classification_train.txtcheckpoint/kobert-wellnesee-text-classification.pthtrain/run_auto_regressive.py
data/wellness_dialog_for_autoregressive_train.txtcheckpoint/kogpt2-wellnesee-auto-regressive.pthpreprocess/training_data.py contains helper functions used during dataset preparation (Excel → text files, splitting train/test, etc.).
It is best treated as a reference script; you may need to adapt it depending on how you store the dataset locally.
A simple REST API is provided:
service/api.py
/api/wellness/dialog/bert?s=.../api/wellness/dialog/electra?s=...2020.06 ~ 2020.07
45 commits
Jupyter Notebook
68.0%
Python
31.6%