Skip to main content

Final Project for Matt Harrison / MetaSnake's 'Professional Python' Course

Project description

Small Language Model

Final project for Matt Harrison / MetaSnake's Professional Python course.

The core code in this repo is the class SmallLanguageModel in the file small_language_model.py. However, that code is largely irrelevant, and exists just as a vehicle for us to explore modern tools used in Python development:

  • uv instead of pip for installing packages
  • LLMs to write code
  • Automated tests with pytest
  • Type Annotations
  • pre-commit and GitHub Actions to automate testing, linting with ruff, etc.
  • Deploying a package to PyPI

If, despite the above warning, you still want to run the code in this repo, you can do so like this:

from propy_alamstein.small_language_model import SmallLanguageModel

slm = SmallLanguageModel()
slm.train("The quick brown fox jumped over the lazy dogs")

slm.predict_next("a")
slm.get_character_training_frequency()

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

propy_alamstein-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

propy_alamstein-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file propy_alamstein-0.1.1.tar.gz.

File metadata

  • Download URL: propy_alamstein-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for propy_alamstein-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb619f9309e4df31008b7470db4cdabd9a20e12285f0e091eef6a12fb1e8460f
MD5 86918071335919a545187bec2dc42362
BLAKE2b-256 4562a84d39044bf44bf8b28e0c0616afe3464048a155209b7538f724544e3c25

See more details on using hashes here.

File details

Details for the file propy_alamstein-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for propy_alamstein-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 611180417f0e4deac74932ac3656b0c97b932feaa69f197c6fd8dcc9c06a9333
MD5 6d08e5b183a9061f9e04dc93004b546e
BLAKE2b-256 774ed1aaca92d44e50d62e82a25d7c5c3b496fadcce1a7e2b525530eb8ad81c8

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