资源算法gpt-2-demo

gpt-2-demo

2020-03-03 | |  53 |   0 |   0

gpt-2-demo

Refactored and Abstracted the GPT-2 model code while putting it beside a flask API and dockerized for easy deployment.

Code and samples from the paper "Language Models are Unsupervised Multitask Learners".

See more details in blog post.

Installation

Download the model data (needs gsutil):

  • Download the model (Linux): sh download_model.sh 117M

  • Download the model (Windows - Bash): sh download_model_windows.sh 117M

In case it fails to download the models/117M/checkpoint file, just create checkpoint file at models/117M/ and add these lines:

model_checkpoint_path: "model.ckpt"
all_model_checkpoint_paths: "model.ckpt"

Build the docker image:

docker-compose build

Start the services

docker-compose up

visit the external IP/localhost to see the live demo.


上一篇:twitterbot-gpt2

下一篇:gpt2-k8s-cloud-run

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...