TFKit is a deep natural language process framework for classification/tagging/question answering/embedding study and language generation.
It leverages the use of transformers on many tasks with different models in this all-in-one framework.
All you need is a little change of config.
With transformer models - BERT/ALBERT/T5/BART......
Classification | 🏷️ multi-class and multi-label classification |
Question Answering | 📃 extractive qa |
Question Answering | 🔘 multiple-choice qa |
Tagging | 👁️🗨️ sequence level tagging / sequence level with crf |
Text Generation | 📝 seq2seq language model |
Text Generation | 🖊️ causal language model |
Text Generation | 🖨️ once generation model / once generation model with ctc loss |
Text Generation | 📝 onebyone generation model |
Self-supervise Learning | 🤿 mask language model |
Learn more from the document.
Simple installation from PyPI
pip install tfkit
input, target
tfkit-train \
--model clas \
--config xlm-roberta-base \
--train training_data.csv \
--test testing_data.csv \
--lr 4e-5 \
--maxlen 384 \
--epoch 10 \
--savedir roberta_sentiment_classificer
tfkit-eval \
--model roberta_sentiment_classificer/1.pt \
--metric clas \
--valid testing_data.csv
Multi-task training
tfkit-train \
--model clas clas \
--config xlm-roberta-base \
--train training_data_taskA.csv training_data_taskB.csv \
--test testing_data_taskA.csv testing_data_taskB.csv \
--lr 4e-5 \
--maxlen 384 \
--epoch 10 \
--savedir roberta_sentiment_classificer_multi_task
- transformers models list: you can find any pretrained models here
- nlprep: download and preprocessing data in one line
- nlp2go: create demo api as quickly as possible.
Thanks for your interest.There are many ways to contribute to this project. Get started here.
Icons modify from Freepik from www.flaticon.com
Icons modify from Nikita Golubev from www.flaticon.com