hf_mirrors/GPT-neo-1.3B
Model Introduction
Files & versions
Analysis

Model Description

GPT-Neo 1.3B is a transformer model designed using EleutherAI's replication of the GPT-3 architecture. GPT-Neo refers to the class of models, while 1.3B represents the number of parameters of this particular pre-trained model.

Modification

  • Modify example and add npu support
  • Add denpendencies

Training data

GPT-Neo 1.3B was trained on the Pile, a large scale curated dataset created by EleutherAI for the purpose of training this model.

Training procedure

This model was trained on the Pile for 380 billion tokens over 362,000 steps. It was trained as a masked autoregressive language model, using cross-entropy loss.

Intended Use and Limitations

This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The model is best at what it was pretrained for however, which is generating texts from a prompt.

Denpendencies

  • transformers==4.44.2
  • psutil==6.0.0
  • better_profanity==0.7.0
  • einops==0.6.1
  • protobuf==5.28.2

How to use

You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run(essential part of code usage):

import argparse
import torch
from openmind import pipeline, is_torch_npu_available
from openmind_hub import snapshot_download

if is_torch_npu_available():
    device = "npu:0"
else:
    device = "cpu"
generator = pipeline('text-generation', model="SY_AICC/GPT-neo-1.3B", device=device)
output = generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5)
print(f">>>output={output}", flush=True)

Eval results

Linguistic Reasoning

Model and SizePile BPBPile PPLWikitext PPLLambada PPLLambada AccWinograndeHellaswag
GPT-Neo 1.3B0.75276.15913.107.49857.23%55.01%38.66%
GPT-2 1.5B1.0468-----17.4810.63451.21%59.40%40.03%
GPT-Neo 2.7B0.71655.64611.395.62662.22%56.50%42.73%
GPT-3 Ada0.9631----------9.95451.60%52.90%35.93%

Physical and Scientific Reasoning

Model and SizeMathQAPubMedQAPiqa
GPT-Neo 1.3B24.05%54.40%71.11%
GPT-2 1.5B23.64%58.33%70.78%
GPT-Neo 2.7B24.72%57.54%72.14%
GPT-3 Ada24.29%52.80%68.88%

BibTeX entry and citation info

@software{gpt-neo,
  author       = {Black, Sid and
                  Leo, Gao and
                  Wang, Phil and
                  Leahy, Connor and
                  Biderman, Stella},
  title        = {{GPT-Neo: Large Scale Autoregressive Language 
                   Modeling with Mesh-Tensorflow}},
  month        = mar,
  year         = 2021,
  note         = {{If you use this software, please cite it using 
                   these metadata.}},
  publisher    = {Zenodo},
  version      = {1.0},
  doi          = {10.5281/zenodo.5297715},
  url          = {https://doi.org/10.5281/zenodo.5297715}
}

@article{gao2020pile,
  title={The Pile: An 800GB Dataset of Diverse Text for Language Modeling},
  author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and others},
  journal={arXiv preprint arXiv:2101.00027},
  year={2020}
}