lattice

(★ 40)

Run, quantize, and fine-tune LLMs on Apple Silicon. Pure Rust, no Python, no CUDA, no ONNX

File Explorer

  • .gitignore
  • _typos.toml
  • AGENTS.md
  • Cargo.lock
  • Cargo.toml
  • CLAUDE.md
  • deno.json
  • deny.toml
  • LICENSE-APACHE
  • LICENSE-MIT
  • Makefile
  • pyproject.toml
  • README.md
  • rust-toolchain.toml

# 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.

🔍

cargo bench

View Details ▼

Compile and execute benchmarks.

cargo bench

Execute all benchmarks of a package:

cargo bench --no-fail-fast

Don't stop when a benchmark fails:

cargo bench --no-run

Compile, but don't run benchmarks:

🔍

cargo build

View Details ▼

Compile a local package and all of its dependencies.

cargo {{[b|build]}}

Build the package or packages defined by the `Cargo.toml` manifest file in the local path:

cargo {{[b|build]}} {{[-r|--release]}}

Build artifacts in release mode, with optimizations:

cargo {{[b|build]}} --locked

Require that `Cargo.lock` is up to date:

🔍

cargo install

View Details ▼

Build and install a Rust binary.

cargo install {{package}}@{{version}}

Install a package from <https://crates.io> (the version is optional - latest by default):

cargo install --git {{repo_url}}

Install a package from the specified Git repository:

cargo install --git {{repo_url}} --{{branch|tag|rev}} {{branch_name|tag|commit_hash}}

Build from the specified branch/tag/commit when installing from a Git repository:

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

huggingface-cli

View Details ▼

This command is an alias of `hf`.

tldr hf

View documentation for the original command:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

rustup update

View Details ▼

Update Rust toolchains and `rustup` itself (if not installed using a package manager).

rustup update

Update all installed toolchains and `rustup`:

rustup update {{toolchain}}

Install or update a specific toolchain (see `rustup help toolchain` for more information):

🔍

serve

View Details ▼

Static file serving and directory listing.

serve

Start an HTTP server listening on the default port to serve the current directory:

serve -p {{port}} {{path/to/directory}}

Start an HTTP server on a specific [p]ort to serve a specific directory:

serve {{[-C|--cors]}}

Start an HTTP server with CORS enabled by including the `Access-Control-Allow-Origin: *` header in all responses:

🔍

shasum

View Details ▼

Calculate SHA cryptographic checksums.

shasum {{path/to/file1 path/to/file2 ...}}

Calculate the SHA1 checksum for one or more files:

shasum --algorithm {{1|224|256|384|512|512224|512256}} {{path/to/file1 path/to/file2 ...}}

Calculate the SHA checksum for one or more files with the specified algorithm:

{{command}} | shasum

Calculate a SHA1 checksum from `stdin`:

🔍

tar

View Details ▼

Archiving utility.
Often combined with a compression method, such as `gzip` or `bzip2`.

tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}

[c]reate an archive and write it to a [f]ile:

tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}

[c]reate a g[z]ipped archive and write it to a [f]ile:

tar czf {{path/to/target.tar.gz}} {{[-C|--directory]}} {{path/to/directory}} .

[c]reate a g[z]ipped (compressed) archive from a directory using relative paths:

🔍

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:

🔍

xattr

View Details ▼

Utility to work with extended filesystem attributes.

xattr -l {{file}}

List key:value extended attributes for a given file:

xattr -w {{attribute_key}} {{attribute_value}} {{file}}

Write an attribute for a given file:

xattr -d {{com.apple.quarantine}} {{file}}

Delete an attribute from a given file:

// repository documentation