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 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.0.tar.gz (2.9 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.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: propy_alamstein-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 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.0.tar.gz
Algorithm Hash digest
SHA256 b2582fdbef827583bb4fe8c64a7216b6bd63f082b311b1bd515940c459d7a4d2
MD5 51b6ec300a06c31d05099d5fb328dea2
BLAKE2b-256 c197b8be64db4988288df1662cbd6d07630fba0fa6d44281e70f380580ffff51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for propy_alamstein-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2df4569e6715d3d5ca4cd54a07e76c3fcb71ae5e51f9508a2aecef87f40d52d
MD5 663b5937b49e3faabe5b2fbd268d2d87
BLAKE2b-256 473712efc87ed7e48533fded63ad46ee5199a6b892f64882e8759d3802589070

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