Skip to main content

llm-from-scratch-lab

Lab and python package for building a small GPT model. This code was adapted from the Build a Large Language Model (From Scratch) repository. This lab is intended to be a learning exercise, not a production-ready implementation. It is still very much a work in progress, and in some regards, a little incomplete. However, it is a good starting point for understanding how to build a small GPT model from scratch.

Usage

There is a run_lab.py script that can be used to run the lab. It will send a piece of text to the lab and the lab will perform the preprocessing, tokenization, and model inference steps. The output will be printed to the console.

Package Usage

Install the package using pip:

pip install llm-scratch-lab

Then, you can use the package in your Python scripts:

from llm_scratch_lab.lab import GPTLab

gpt_lab = GPTLab()
print("Running GPT Lab...")

gpt_lab.run("Hello, I am", with_manual_seed=True)

Metadata

Release files for llm-scratch-lab 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-scratch-lab 0.0.3
File Size Uploaded Provenance
llm_scratch_lab-0.0.3.tar.gz 6.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-scratch-lab 0.0.3
File Interpreter ABI Platform
llm_scratch_lab-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / llm_scratch_lab-0.0.3.tar.gz

Download URL llm_scratch_lab-0.0.3.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9295592d3aed4f6b2786961900aa87bafccc0ae2fb0bb8b24d98680113edb69d
BLAKE2b-256 checksum
How to use checksums
aa205a9771f7e1e036807334b6b064976883f707fe94fb37bcee0539795503f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / llm_scratch_lab-0.0.3-py3-none-any.whl

Download URL llm_scratch_lab-0.0.3-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08b7fd441595eebbfb12f873847e35c571a714eb5a552bc55ef466014c913e13
BLAKE2b-256 checksum
How to use checksums
d236c712c6f3203cdb5b1221fc7f5fbede1e31c5d7da99babbe959adef40393c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Security for llm-scratch-lab 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page