Tensorflow and GPT 2 based Spelling Association Tool
#Related Repo https://github.com/bao1018/seifer
Code from the paper "Language Models are Unsupervised Multitask Learners".
We have currently released small (124M parameter), medium (355M parameter), and large (774M parameter) versions of GPT-2*, with only the full model as of yet unreleased. We have also released a dataset for researchers to study their behaviors.
You can read about GPT-2 and release decisions in our original blog post and 6 month follow-up post.
* Note that our original parameter counts were wrong due to an error (in our previous blog posts and paper). Thus you may have seen small referred to as 117M and medium referred to as 345M.
This repository is meant to be a starting point for researchers and engineers to experiment with GPT-2.
For basic information, see our model card.
- GPT-2 models' robustness and worst case behaviors are not well-understood. As with any machine-learned model, carefully evaluate GPT-2 for your use case, especially if used without fine-tuning or in safety-critical applications where reliability is important.
- The dataset our GPT-2 models were trained on contains many texts with biases and factual inaccuracies, and thus GPT-2 models are likely to be biased and inaccurate as well.
- To avoid having samples mistaken as human-written, we recommend clearly labeling samples as synthetic before wide dissemination. Our models are often incoherent or inaccurate in subtle ways, which takes more than a quick read for a human to notice.
Please let us know if you’re doing interesting research with or working on applications of GPT-2! We’re especially interested in hearing from and potentially working with those who are studying
- Potential malicious use cases and defenses against them (e.g. the detectability of synthetic text)
- The extent of problematic content (e.g. bias) being baked into the models and effective mitigations
See DEVELOPERS.md
See CONTRIBUTORS.md
Please use the following bibtex entry:
@article{radford2019language,
title={Language Models are Unsupervised Multitask Learners},
author={Radford, Alec and Wu, Jeff and Child, Rewon and Luan, David and Amodei, Dario and Sutskever, Ilya},
year={2019}
}
We may release code for evaluating the models on various benchmarks.
We are still considering release of the larger models.
Run base on Python 3
- Install the python dependencies
pip install numpy
pip install tensorflow
pip install -r requirements.txt
- Download the models
python download_model.py 124m
- Download the serving model TBD,send email to github repo owner for getting that data
# Linux
python3 src/generate_unconditional_samples.py | tee samples
# With param
python3 src/generate_unconditional_samples.py --top_k 40 --temperature 0.7 | tee samples
# Interactive mode
python3 src/interactive_conditional_samples.py --top_k 40
### the path of serving: models should be replaced by your actual codebase path
docker run -t --rm -p 8501:8501 -v /Users/jbao009/Documents/github/wb/gpt-2-master/serving:/models -e MODEL_NAME=use tensorflow/serving