<p align="center">
<br>
<img src="https://raw.githubusercontent.com/voidful/TFkit/master/docs/img/tfkit.png" width="300"/>
<br>
</p>
<br/>
<p align="center">
<a href="https://pypi.org/project/tfkit/">
<img alt="PyPI" src="https://img.shields.io/pypi/v/tfkit">
</a>
<a href="https://github.com/voidful/tfkit">
<img alt="Download" src="https://img.shields.io/pypi/dm/tfkit">
</a>
<a href="https://github.com/voidful/tfkit">
<img alt="Build" src="https://img.shields.io/github/workflow/status/voidful/tfkit/Python package">
</a>
<a href="https://github.com/voidful/tfkit">
<img alt="Last Commit" src="https://img.shields.io/github/last-commit/voidful/tfkit">
</a>
<a href="https://www.codefactor.io/repository/github/voidful/tfkit/overview/master">
<img src="https://www.codefactor.io/repository/github/voidful/tfkit/badge/master" alt="CodeFactor" />
</a>
<a href="https://github.com/voidful/tfkit">
<img src="https://visitor-badge.glitch.me/badge?page_id=voidful.tfkit" alt="Visitor" />
</a>
<a href="https://codecov.io/gh/voidful/TFkit">
<img src="https://codecov.io/gh/voidful/TFkit/branch/master/graph/badge.svg" />
</a>
</p>
## What is it
TFKit is a tool kit mainly for 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.
## Task Supported
With transformer models - BERT/ALBERT/T5/BART......
| | |
|-|-|
| Text Generation | :memo: seq2seq language model |
| Text Generation | :pen: causal language model |
| Text Generation | :printer: once generation model / once generation model with ctc loss |
| Text Generation | :pencil: onebyone generation model |
# Getting Started
Learn more from the [document](https://voidful.github.io/TFkit/).
## How To Use
### Step 0: Install
Simple installation from PyPI
```bash
pip install git+https://github.com/voidful/TFkit.git@refactor-dataset
```
### Step 1: Prepare dataset in csv format
[Task format](https://voidful.tech/TFkit/tasks/)
```
input, target
```
### Step 2: Train model
```bash
tfkit-train \
--task clas \
--config xlm-roberta-base \
--train training_data.csv \
--test testing_data.csv \
--lr 4e-5 \
--maxlen 384 \
--epoch 10 \
--savedir roberta_sentiment_classificer
```
### Step 3: Evaluate
```bash
tfkit-eval \
--task roberta_sentiment_classificer/1.pt \
--metric clas \
--valid testing_data.csv
```
## Advanced features
<details>
<summary>Multi-task training </summary>
```bash
tfkit-train \
--task 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
```
</details>
## Not maintained task
Due to time constraints, the following tasks are temporarily not supported
| | |
|-|-|
| Classification | :label: multi-class and multi-label classification |
| Question Answering | :page_with_curl: extractive qa |
| Question Answering | :radio_button: multiple-choice qa |
| Tagging | :eye_speech_bubble: sequence level tagging / sequence level with crf |
| Self-supervise Learning | :diving_mask: mask language model |
## Supplement
- [transformers models list](https://huggingface.co/models): you can find any pretrained models here
- [nlprep](https://github.com/voidful/NLPrep): download and preprocessing data in one line
- [nlp2go](https://github.com/voidful/nlp2go): create demo api as quickly as possible.
## Contributing
Thanks for your interest.There are many ways to contribute to this project. Get started [here](https://github.com/voidful/tfkit/blob/master/CONTRIBUTING.md).
## License ![PyPI - License](https://img.shields.io/github/license/voidful/tfkit)
* [License](https://github.com/voidful/tfkit/blob/master/LICENSE)
## Icons reference
Icons modify from <a href="http://www.freepik.com/" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
Icons modify from <a href="https://www.flaticon.com/authors/nikita-golubev" title="Nikita Golubev">Nikita Golubev</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
Raw data
{
"_id": null,
"home_page": "https://github.com/voidful/TFkit",
"name": "tfkit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5.0",
"maintainer_email": "",
"keywords": "transformer huggingface nlp multi-task multi-class multi-label classification generation tagging deep learning machine reading",
"author": "Voidful",
"author_email": "voidful.stack@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/20/ac/3d7843ffc7960befa60b9617b5da9793842b4c5fd70a143b9cc8086675cb/tfkit-0.8.4.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <br>\n <img src=\"https://raw.githubusercontent.com/voidful/TFkit/master/docs/img/tfkit.png\" width=\"300\"/>\n <br>\n</p>\n<br/>\n<p align=\"center\">\n <a href=\"https://pypi.org/project/tfkit/\">\n <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/tfkit\">\n </a>\n <a href=\"https://github.com/voidful/tfkit\">\n <img alt=\"Download\" src=\"https://img.shields.io/pypi/dm/tfkit\">\n </a>\n <a href=\"https://github.com/voidful/tfkit\">\n <img alt=\"Build\" src=\"https://img.shields.io/github/workflow/status/voidful/tfkit/Python package\">\n </a>\n <a href=\"https://github.com/voidful/tfkit\">\n <img alt=\"Last Commit\" src=\"https://img.shields.io/github/last-commit/voidful/tfkit\">\n </a>\n <a href=\"https://www.codefactor.io/repository/github/voidful/tfkit/overview/master\">\n <img src=\"https://www.codefactor.io/repository/github/voidful/tfkit/badge/master\" alt=\"CodeFactor\" />\n </a>\n <a href=\"https://github.com/voidful/tfkit\">\n <img src=\"https://visitor-badge.glitch.me/badge?page_id=voidful.tfkit\" alt=\"Visitor\" />\n </a>\n <a href=\"https://codecov.io/gh/voidful/TFkit\">\n <img src=\"https://codecov.io/gh/voidful/TFkit/branch/master/graph/badge.svg\" />\n </a>\n</p>\n\n## What is it\nTFKit is a tool kit mainly for language generation. \nIt leverages the use of transformers on many tasks with different models in this all-in-one framework. \nAll you need is a little change of config. \n\n## Task Supported\nWith transformer models - BERT/ALBERT/T5/BART...... \n| | |\n|-|-|\n| Text Generation | :memo: seq2seq language model |\n| Text Generation | :pen: causal language model |\n| Text Generation | :printer: once generation model / once generation model with ctc loss |\n| Text Generation | :pencil: onebyone generation model |\n\n# Getting Started\nLearn more from the [document](https://voidful.github.io/TFkit/). \n\n## How To Use\n\n### Step 0: Install\nSimple installation from PyPI\n```bash\npip install git+https://github.com/voidful/TFkit.git@refactor-dataset\n```\n\n### Step 1: Prepare dataset in csv format\n[Task format](https://voidful.tech/TFkit/tasks/)\n``` \ninput, target\n```\n\n### Step 2: Train model\n```bash\ntfkit-train \\\n--task clas \\\n--config xlm-roberta-base \\\n--train training_data.csv \\\n--test testing_data.csv \\\n--lr 4e-5 \\\n--maxlen 384 \\\n--epoch 10 \\\n--savedir roberta_sentiment_classificer\n```\n\n### Step 3: Evaluate\n```bash\ntfkit-eval \\\n--task roberta_sentiment_classificer/1.pt \\\n--metric clas \\\n--valid testing_data.csv\n```\n\n## Advanced features\n<details>\n <summary>Multi-task training </summary>\n\n ```bash\n tfkit-train \\\n --task clas clas \\\n --config xlm-roberta-base \\\n --train training_data_taskA.csv training_data_taskB.csv \\\n --test testing_data_taskA.csv testing_data_taskB.csv \\\n --lr 4e-5 \\\n --maxlen 384 \\\n --epoch 10 \\\n --savedir roberta_sentiment_classificer_multi_task\n ```\n</details>\n\n## Not maintained task\nDue to time constraints, the following tasks are temporarily not supported\n| | |\n|-|-|\n| Classification | :label: multi-class and multi-label classification |\n| Question Answering | :page_with_curl: extractive qa |\n| Question Answering | :radio_button: multiple-choice qa |\n| Tagging | :eye_speech_bubble: sequence level tagging / sequence level with crf |\n| Self-supervise Learning | :diving_mask: mask language model |\n\n## Supplement\n- [transformers models list](https://huggingface.co/models): you can find any pretrained models here \n- [nlprep](https://github.com/voidful/NLPrep): download and preprocessing data in one line \n- [nlp2go](https://github.com/voidful/nlp2go): create demo api as quickly as possible.\n\n\n## Contributing\nThanks for your interest.There are many ways to contribute to this project. Get started [here](https://github.com/voidful/tfkit/blob/master/CONTRIBUTING.md).\n\n## License ![PyPI - License](https://img.shields.io/github/license/voidful/tfkit)\n\n* [License](https://github.com/voidful/tfkit/blob/master/LICENSE)\n\n## Icons reference\nIcons modify from <a href=\"http://www.freepik.com/\" title=\"Freepik\">Freepik</a> from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\">www.flaticon.com</a> \nIcons modify from <a href=\"https://www.flaticon.com/authors/nikita-golubev\" title=\"Nikita Golubev\">Nikita Golubev</a> from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\">www.flaticon.com</a> \n\n\n",
"bugtrack_url": null,
"license": "Apache",
"summary": "Transformers kit - Multi-task QA/Tagging/Multi-label Multi-Class Classification/Generation with BERT/ALBERT/T5/BERT",
"version": "0.8.4",
"split_keywords": [
"transformer",
"huggingface",
"nlp",
"multi-task",
"multi-class",
"multi-label",
"classification",
"generation",
"tagging",
"deep",
"learning",
"machine",
"reading"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "967cd81b13987a86f3fd4ab62d9ffe33",
"sha256": "9d8e8d7cccb0b1b69405872b788de8d20df9b99ce81afbb5a1b8ae10aab3246f"
},
"downloads": -1,
"filename": "tfkit-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "967cd81b13987a86f3fd4ab62d9ffe33",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5.0",
"size": 54213,
"upload_time": "2022-12-13T09:21:44",
"upload_time_iso_8601": "2022-12-13T09:21:44.744285Z",
"url": "https://files.pythonhosted.org/packages/c7/f0/6e2514266bea839511236ca1595612125b5532e1ef4514aaef4b22747c4e/tfkit-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "11af1818e4b854be79a41dfa37a7df7b",
"sha256": "b7f5b4635a91c689650b654815a971e736fd3adf6daae38db9711c81c5769403"
},
"downloads": -1,
"filename": "tfkit-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "11af1818e4b854be79a41dfa37a7df7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5.0",
"size": 220011,
"upload_time": "2022-12-13T09:21:48",
"upload_time_iso_8601": "2022-12-13T09:21:48.813435Z",
"url": "https://files.pythonhosted.org/packages/20/ac/3d7843ffc7960befa60b9617b5da9793842b4c5fd70a143b9cc8086675cb/tfkit-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-13 09:21:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "voidful",
"github_project": "TFkit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "tfkit"
}