Files
zeekay 6a0a3ab088 Every crate names its dependencies itself, and every published crate moves a patch
No crate inherits from the workspace any longer: each manifest holds its
own version, package fields, lints and dependency specs, siblings as a
path and the exact version they publish at. The root keeps members,
exclude, resolver and profiles. Every publishable crate takes a patch
bump so the registry carries manifests that stand alone.

Claude-Session: https://claude.ai/code/session_01JupC8d38f9Lkfz62hvjG2q
2026-10-06 14:44:26 -07:00

178 lines
5.4 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 = { version = "0.3.2", optional = true }
hanzo-ml = { path = "../hanzo-ml", package = "hanzo-ml", version = "0.11.111" }
hanzo-datasets = { path = "../hanzo-datasets", version = "0.11.10", optional = true }
hanzo-nn = { path = "../hanzo-nn", version = "0.11.48" }
hanzo-transformers = { path = "../hanzo-transformers", version = "0.11.16" }
hanzo-flash-attn = { path = "../hanzo-flash-attn", version = "0.11.37", optional = true }
hanzo-onnx = { path = "../hanzo-onnx", version = "0.11.11", optional = true }
chrono = "0.4"
csv = "1.3.0"
cudarc = { version = "0.19.8", features = ["std", "cublas", "cublaslt", "curand", "driver", "nvrtc", "f16", "f8", "cuda-version-from-build-system", "dynamic-linking"], default-features = false, optional = true }
half = { version = "2.5.0", features = ["num-traits", "use-intrinsics", "rand_distr", "zerocopy"], optional = true }
hf-hub = { version = "1.0.0", features = ["blocking"] }
image = { version = "0.25.2", default-features = false, features = ["jpeg", "png"] }
intel-mkl-src = { version = "0.8.1", features = ["mkl-static-lp64-iomp"], optional = true }
num-traits = "0.2.15"
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 = "1.7.0"
anyhow = { version = "1", features = ["backtrace"] }
rubato = { version = "5", optional = true }
safetensors = "0.8.0"
serde = { version = "1.0.171", features = ["derive"] }
serde_json = "1.0.99"
symphonia = { version = "0.6.0", features = ["all"], optional = true }
tokenizers = { version = "0.23.1", default-features = false, 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 = { version = "1", features = ["backtrace"] }
byteorder = "1.4.3"
clap = { version = "4.2.4", features = ["derive"] }
imageproc = { version = "0.27.0", features = ["text"], default-features = false }
memmap2 = { version = "0.9.3", features = ["stable_deref_trait"] }
rand = "0.9.0"
ab_glyph = "0.2.23"
tracing = "0.1.37"
tracing-chrome = "0.7.1"
tracing-subscriber = "0.3.7"
# Necessary to disambiguate with tokio in wasm examples which are 1.28.1
tokio = "1.48.0"
[build-dependencies]
anyhow = { version = "1", features = ["backtrace"] }
cudaforge = { version = "0.1.2", optional = true }
hf-hub = { version = "1.0.0", features = ["blocking"], 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.clippy]
explicit_counter_loop = "allow"
unnecessary_unwrap = "allow"
manual_checked_ops = "allow"
needless_borrow = "allow"
large_const_arrays = "allow"
needless_range_loop = "allow"
too_many_arguments = "allow"