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
Release history Release notifications | RSS feed
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.7.tar.gz
(371.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sagar_nueron_gpt2-0.1.7.tar.gz.
File metadata
- Download URL: sagar_nueron_gpt2-0.1.7.tar.gz
- Upload date:
- Size: 371.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4cb62911f913a7a91bab78ac9e97699744f1ab4d56ccddb77b37481c692a19f
|
|
| MD5 |
4136daf17eecd5d22c2c8bade6bd3b02
|
|
| BLAKE2b-256 |
74f0ec0ee1700e236ee5801cd56026f0d97d4b61b4ec86468df8a856cfc7e980
|
File details
Details for the file sagar_nueron_gpt2-0.1.7-py3-none-any.whl.
File metadata
- Download URL: sagar_nueron_gpt2-0.1.7-py3-none-any.whl
- Upload date:
- Size: 194.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84b6a47194367712f9b53f31a33d3de8b653a9f19684cc949a2ab244372b0eaa
|
|
| MD5 |
106880d155d0ab0df83610a19a0e9108
|
|
| BLAKE2b-256 |
0023942e5f09393691a13cee28ce803b8867ce08da6e097a529dce793cbf53bd
|