Skip to main content

A GPT-2 implementation for training and inference in pytorch

Project description

How to Run

Language & Framework

  • Language: Python
  • Framework: PyTorch

Installation

Make sure you have Python installed, then run the following commands to set up the environment:

pip install -i https://test.pypi.org/simple/ sagar-nueron-gpt2==0.1.7
pip install torch
pip install tiktoken

Train the Model

To train and save your GPT-2 model weights, run the following:

from sagar_nueron_gpt2.TrainAndSaveGptWeights import Execute

exe = Execute()
exe.execute()

Inference from Trained Model

To run inference using the model you trained:

from sagar_nueron_gpt2.inference_model import Inferencing

exe = Inferencing()
exe.inference()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sagar_nueron_gpt2-0.1.8.tar.gz (371.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sagar_nueron_gpt2-0.1.8-py3-none-any.whl (194.6 kB view details)

Uploaded Python 3

File details

Details for the file sagar_nueron_gpt2-0.1.8.tar.gz.

File metadata

  • Download URL: sagar_nueron_gpt2-0.1.8.tar.gz
  • Upload date:
  • Size: 371.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for sagar_nueron_gpt2-0.1.8.tar.gz
Algorithm Hash digest
SHA256 53b8aad0f32a4e762c63a35bcc29fa4b662ca9459ad37ad38ed04cd7156f495f
MD5 69860c285417e63f00aea3482b35e9e5
BLAKE2b-256 dabb1a8be504a12bc3e5c6f3690154ac7eaff23eb4d79da3d7d7d32fb06ee9ff

See more details on using hashes here.

File details

Details for the file sagar_nueron_gpt2-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for sagar_nueron_gpt2-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4ce9705b10db46c164e0ffce699455dbc6188b9d5dad645d716e3e65da20a61a
MD5 86bc5aa83fe007fcfb1df02220aa675c
BLAKE2b-256 c2ea0a51476a9d820b514f67c37cabe8dccff4dc403850d70ac84602f2c463ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page