Files
zeekayandHanzo Dev 6a363f7ee3 merge: upstream main ddf1b879 and the aarch64 repack branch 35d7ae7c
Three-way per file through the rename: base 39355c6c91, theirs the upstream
merge of main with 35d7ae7c (via 7ef6a694d), ours origin/main.

Lands the barrier thread pool, runtime CPU feature dispatch, aarch64 and x86
repacked quantized kernels (indexed_gemv, gemv_fused_shared_lhs), quantized
embedding on CPU/Metal/CUDA, paged flash-attn kernels, cutile fused MoE, the
in-place op aliasing API, parking_lot storage locks, Metal buffer builders and
debug labels, safetensors 0.8, hf-hub 1.0, tokenizers 0.23.

Ours keeps ROCm, Vulkan, wgpu, the IQ/MXFP4/NVFP4/TQ dtypes, and the i-quant
weight/activation block split in matmul. Our backends ride InplaceOpN and the
quantized embedding; Metal get_rows gains the IQ kernels. ug leaves, as upstream.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-15 15:52:28 -07:00

172 lines
4.5 KiB
TOML

[package]
name = "hanzo-ml-examples"
# Not published: example programs, built and tested in-tree only.
publish = false
version = "0.11.8"
edition = "2021"
description = "Multi-backend tensor & ML framework for Rust — part of the Hanzo ML stack."
repository = "https://github.com/hanzoai/ml"
keywords = ["blas", "tensor", "machine-learning"]
categories = ["science"]
license = "MIT OR Apache-2.0"
readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
hanzo-ml = { workspace = true }
hanzo-datasets = { workspace = true, optional = true }
hanzo-nn = { workspace = true }
hanzo-transformers = { workspace = true }
hanzo-flash-attn = { workspace = true, optional = true }
hanzo-onnx = { workspace = true, optional = true }
chrono = "0.4"
csv = "1.3.0"
cudarc = { workspace = true, optional = true }
half = { workspace = true, optional = true }
hf-hub = { workspace = true }
image = { workspace = true }
intel-mkl-src = { workspace = true, optional = true }
num-traits = { workspace = true }
minijinja = { version = "2", features = ["loader"] }
palette = { version = "0.7.6", optional = true }
enterpolation = { version = "0.3.0", optional = true }
pyo3 = { version = "0.24.1", features = ["auto-initialize", "abi3-py38"], optional = true }
rayon = { workspace = true }
anyhow = { workspace = true }
rubato = { version = "5", optional = true }
safetensors = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
symphonia = { version = "0.6.0", features = ["all"], optional = true }
tokenizers = { workspace = true, features = ["fancy-regex"] }
cpal = { version = "0.18.2", optional = true }
pdf2image = { version = "0.1.2", optional = true }
tekken-rs = { version = "0.1.1", optional = true }
[dev-dependencies]
anyhow = { workspace = true }
byteorder = { workspace = true }
clap = { workspace = true }
imageproc = { workspace = true }
memmap2 = { workspace = true }
rand = { workspace = true }
ab_glyph = { workspace = true }
tracing = { workspace = true }
tracing-chrome = { workspace = true }
tracing-subscriber = { workspace = true }
# Necessary to disambiguate with tokio in wasm examples which are 1.28.1
tokio = "1.48.0"
[build-dependencies]
anyhow = { workspace = true }
cudaforge = { version = "0.1.2", optional = true }
hf-hub = { workspace = true, optional = true }
[features]
default = []
accelerate = [
"dep:accelerate-src",
"hanzo-ml/accelerate",
"hanzo-nn/accelerate",
"hanzo-transformers/accelerate",
]
cuda = [
"hanzo-ml/cuda",
"hanzo-nn/cuda",
"hanzo-transformers/cuda",
"dep:cudaforge",
]
cudnn = ["hanzo-ml/cudnn", "hanzo-nn/cudnn", "hanzo-transformers/cudnn"]
flash-attn = ["cuda", "hanzo-transformers/flash-attn", "dep:hanzo-flash-attn"]
mkl = [
"dep:intel-mkl-src",
"hanzo-ml/mkl",
"hanzo-nn/mkl",
"hanzo-transformers/mkl",
]
nccl = ["cuda", "cudarc/nccl", "dep:half"]
onnx = ["hanzo-onnx"]
metal = ["hanzo-ml/metal", "hanzo-nn/metal"]
metal-debug-labels = ["metal", "hanzo-ml/metal-debug-labels", "hanzo-nn/metal-debug-labels", "hanzo-transformers/metal-debug-labels"]
microphone = ["cpal", "rubato"]
encodec = ["cpal", "symphonia", "rubato"]
mimi = ["cpal", "symphonia", "rubato"]
snac = ["cpal", "symphonia", "rubato"]
depth_anything_v2 = ["palette", "enterpolation"]
tekken = ["tekken-rs"]
buildtime-model = []
voxtral = ["tekken", "symphonia", "rubato"]
buildtime-download = ["dep:hf-hub"]
[[example]]
name = "llama_multiprocess"
required-features = ["cuda", "nccl", "flash-attn"]
[[example]]
name = "reinforcement-learning"
required-features = ["pyo3"]
[[example]]
name = "onnx"
required-features = ["onnx"]
[[example]]
name = "onnx-llm"
required-features = ["onnx"]
[[example]]
name = "onnx_basics"
required-features = ["onnx"]
[[example]]
name = "bert_single_file_binary"
required-features = ["buildtime-model"]
[[example]]
name = "voxtral"
required-features = ["voxtral"]
[[example]]
name = "whisper"
required-features = ["symphonia"]
[[example]]
name = "whisper-microphone"
required-features = ["microphone"]
[[example]]
name = "mnist-training"
required-features = ["hanzo-datasets"]
[[example]]
name = "llama2-c"
required-features = ["hanzo-datasets"]
[[example]]
name = "mimi"
required-features = ["mimi"]
[[example]]
name = "snac"
required-features = ["snac"]
[[example]]
name = "encodec"
required-features = ["encodec"]
[[example]]
name = "depth_anything_v2"
required-features = ["depth_anything_v2"]
[[example]]
name = "silero-vad"
required-features = ["onnx"]
[[example]]
name = "colpali"
required-features = ["pdf2image"]
[lints]
workspace = true