A toolkit for building an LLM from scratch
Project description
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)
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
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 llm_scratch_lab-0.0.3.tar.gz.
File metadata
- Download URL: llm_scratch_lab-0.0.3.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9295592d3aed4f6b2786961900aa87bafccc0ae2fb0bb8b24d98680113edb69d
|
|
| MD5 |
5a892828a1b2c22ed29349f2659ce2c1
|
|
| BLAKE2b-256 |
aa205a9771f7e1e036807334b6b064976883f707fe94fb37bcee0539795503f9
|
File details
Details for the file llm_scratch_lab-0.0.3-py3-none-any.whl.
File metadata
- Download URL: llm_scratch_lab-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b7fd441595eebbfb12f873847e35c571a714eb5a552bc55ef466014c913e13
|
|
| MD5 |
96eaaaa13a632545ec761f3dc3455a9c
|
|
| BLAKE2b-256 |
d236c712c6f3203cdb5b1221fc7f5fbede1e31c5d7da99babbe959adef40393c
|