https://github.com/cosmoquester/transformers-tf-finetune
Scripts to finetune huggingface transformers models with Tensorflow 2
https://github.com/cosmoquester/transformers-tf-finetune
nlp tensorflow transformers
Last synced: 5 months ago
JSON representation
Scripts to finetune huggingface transformers models with Tensorflow 2
- Host: GitHub
- URL: https://github.com/cosmoquester/transformers-tf-finetune
- Owner: cosmoquester
- License: mit
- Created: 2021-07-05T06:19:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-11T13:38:11.000Z (over 1 year ago)
- Last Synced: 2025-09-05T01:42:10.786Z (10 months ago)
- Topics: nlp, tensorflow, transformers
- Language: Python
- Homepage:
- Size: 113 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Transformers tf finetune
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://app.circleci.com/pipelines/github/cosmoquester/transformers-tf-finetune)
[](https://codecov.io/gh/cosmoquester/transformers-tf-finetune)
- Scripts and notebooks to train hugginface transformers models with Tensorflow 2.
- You can train models with jupyter or python script using a separate machine, and even without it, you can learn with two clicks from the colab.
- Select Task below, enter `[Open in Colab]`, and click `[Runtime]` - `[Run all]` to automatically load, learn, and evaluate data.
- All code support GPU and TPU both.
- Tensorflow 2를 이용해 Transformer 모델들을 파인튜닝합니다.
- 별도의 머신을 이용해 노트북이나 스크립트로 학습할 수 있으며 그게 없더라도 colab 에서 클릭 두 번으로 학습할 수 있습니다.
- 아래에서 Task를 골라 `[Open in Colab]`으로 들어간 뒤에 `[Runtime]` - `[Run all]` 을 클릭하면 데이터로딩과 학습, 평가까지 자동으로 수행됩니다.
- 모든 코드는 GPU, TPU 디바이스를 전부 지원합니다.
## Tasks
| TaskName | Supported Models | Script | Colab |
| --- | --- | --- | --- |
| [Chatbot](https://github.com/songys/Chatbot_data) | EncoderDecoder (e.g. BART, T5, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_chatbot.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_chatbot.ipynb) |
| [HateSpeech](https://github.com/kocohub/korean-hate-speech) | BART | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_hate_speech.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_hate_speech.ipynb) |
| [KLUE NLI](https://github.com/KLUE-benchmark/KLUE/tree/main/klue_benchmark/klue-nli-v1.1) | SequenceClassification (e.g. BERT, BART, GPT, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_klue_nli.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_klue_nli.ipynb) |
| [KLUE STS (Bi-Encoder)](https://github.com/KLUE-benchmark/KLUE/tree/main/klue_benchmark/klue-sts-v1.1) | SequenceClassification (e.g. BERT, BART, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_klue_sts.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_klue_sts.ipynb) |
| [KLUE TC](https://github.com/KLUE-benchmark/KLUE/tree/main/klue_benchmark/ynat-v1.1) | SequenceClassification (e.g. BERT, BART, GPT, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_klue_tc.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_klue_tc.ipynb) |
| [KorSTS (Bi-Encoder)](https://github.com/kakaobrain/KorNLUDatasets/tree/master/KorSTS) | SequenceClassification (e.g. BERT, BART, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_korsts.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_korsts.ipynb) |
| [NSMC](https://github.com/e9t/nsmc) | SequenceClassification (e.g. BERT, BART, GPT, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_nsmc.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_nsmc.ipynb) |
| [QuestionPair](https://github.com/aisolab/nlp_classification/tree/master/BERT_pairwise_text_classification/qpair) | SequenceClassification (e.g. BERT, BART, GPT, ...) | [Link](https://github.com/cosmoquester/transformers-tf-finetune/blob/master/scripts/train_question_pair.py) | [](https://colab.research.google.com/github/cosmoquester/transformers-tf-finetune/blob/master/notebooks/train_question_pair.ipynb) |