An open API service indexing awesome lists of open source software.

https://github.com/starxsky/gpt

Refactored GPT-2 based on TF2/Pytorch
https://github.com/starxsky/gpt

deep-learning gpt-2 image-gpt ml python pytorch tensorflow2

Last synced: about 1 year ago
JSON representation

Refactored GPT-2 based on TF2/Pytorch

Awesome Lists containing this project

README

          

# GPT(GPT-2 & Image-GPT)
![Pytorch](https://avatars.githubusercontent.com/u/21003710?s=88&v=4) ![TensorFlow](https://avatars.githubusercontent.com/u/15658638?s=88&v=4)

|特点
|----------------------------------
| Use Tensorflow2.7.0 / Pytorch Build OpenAI'GPT-2
| 使用Pytorch复现了OpenAI的iGPT模型
| 使用最新tensorflow2.7.0 / pytorch构建openai官方的GPT-2 NLP模型

# Binder
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/StarxSky/GPT-2/HEAD)

# 进度/News
|进度
|----------------------------------
|增加测试版的[BNNGPT-2](https://github.com/StarxSky/GPT/tree/main/BNNGPT)模型(贝叶斯神经网络GPT模型) --2022/06/13
|新增web交互 Dash application: A nice web interface for the dialogue model (Author: [xiejiachen](https://github.com/xiejiachen)) --2022/04/08
|增添了交互模式[CNGPT](https://github.com/StarxSky/GPT-2/tree/main/CNGPT) --2022/04/08
|新增[CNGPT](https://github.com/StarxSky/GPT-2/tree/main/CNGPT)可以实现在中文数据集上运行GPT -- 2022/03/15

|示例效果
|----------------------------------
|![im](https://github.com/StarxSky/GPT-2/blob/main/%E7%AE%80%E4%BB%8B/h.png?raw=true)

# 优点

- 使用无监督技术
- 拥有大量词汇量
- 可实现续写
- 实现对话后续将应用于[FloatTech的Bot](https://github.com/FloatTech/AI-Bot/blob/main/TF2_GPT-2/README.md)

# 食用方法
|使用方法
|------------------------------------------------------
| [(iGPT) Pytorch复现iGPT](https://github.com/StarxSky/GPT/blob/main/iGPT)
| [(TensorFlow)TF2_GPT-2生成英文文章的教程](https://github.com/StarxSky/GPT/blob/main/%E7%AE%80%E4%BB%8B/TF2_GPT-2.md)
| [(Pytorch) 如果想训练中文GPT-2请您移步至CNGPT](https://github.com/StarxSky/GPT-2/tree/main/CNGPT)

# Setting

* python >= 3.6
* numpy==1.16.4
* sentencepiece==0.1.83
* tensorflow-gpu==2.7.0
* torch

# Test Results
![Test](https://github.com/StarxSky/GPT/blob/main/%E7%AE%80%E4%BB%8B/loss.jpg)

# Link

- [New GELU Activate Function](https://arxiv.org/abs/1606.08415)
- [OpenAi-GPT-2](https://github.com/openai/gpt-2)

# Thanks To My Friends
- [FloatTech](https://github.com/FloatTech)
- [夜黎](https://github.com/DawnNights)
- [MayuriNFC](https://github.com/MayuriNFC)
- [理酱](https://github.com/Yiwen-Chan)

# [LICENCE](https://github.com/StarxSky/TF2_GPT-2/blob/main/LICENSE)

```
██████ ███ ███████ ██████ ██████████████████████
██████ ███ ███████ ██████ ██████████████████████
██████ ███ ███████ ██████ █████
██████ ███ ███████ █████
██████ ███ ███████ ██████ █████
██████ ███████ ██████ █████
██████ ███████ ██████ █████
██████ ███████ ██████ █████
```