llm-from-scratch

(★ 130)

Build LLM from scratch

File Explorer

  • .gitignore
  • BENCHMARK.md
  • LICENSE
  • pyproject.toml
  • README.md
  • README_cn.md
  • uv.lock

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

gunzip

View Details ▼

This command is an alias of `gzip --decompress`.

tldr gzip

View documentation for the original command:

🔍

npm

View Details ▼

JavaScript and Node.js package manager.
Manage Node.js projects and their module dependencies.
Some subcommands such as `install`, `run`, etc. have their own usage documentation.

npm init {{[-y|--yes]}}

Create a `package.json` file with default values (omit `--yes` to do it interactively):

npm {{[i|install]}}

Download all the packages listed as dependencies in `package.json`:

npm {{[i|install]}} {{package_name}}@{{version}}

Download a specific version of a package and add it to the list of dependencies in `package.json`:

🔍

parallel

View Details ▼

Run commands on multiple CPU cores.
See also: `xargs`.

parallel gzip ::: {{path/to/file1 path/to/file2 ...}}

Gzip several files at once, using all cores:

ls *.txt | parallel {{[-j|--jobs]}} 4 gzip

Read arguments from `stdin`, run 4 jobs at once:

parallel convert {} {.}.png ::: *.jpg

Convert JPEG images to PNG using replacement strings:

🔍

pytest

View Details ▼

Run Python tests.

pytest {{path/to/test_file1.py path/to/test_file2.py ...}}

Run tests from specific files:

pytest -k {{expression}}

Run tests with names matching a specific [k]eyword expression:

pytest {{[-x|--exitfirst]}}

Exit as soon as a test fails or encounters an error:

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

🔍

uv run

View Details ▼

Run a command or script in the project environment.

uv run {{path/to/script.py}}

Run a Python script:

uv run {{[-m|--module]}} {{module_name}}

Run a Python module:

uv run {{[-w|--with]}} {{package}} {{command}}

Run a command with additional packages installed temporarily:

// repository documentation