mirror of
https://github.com/hanzoai/ml.git
synced 2026-11-20 22:46:50 +00:00
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]>
hanzo-ml-trocr
TrOCR is a transformer OCR Model. In this example it is used to
transcribe image text. See the associated model
card for details on
the model itself.
Supported models include:
--which base: small handwritten OCR model.--which large: large handwritten OCR model.--which base-printed: small printed OCR model.--which large-printed: large printed OCR model.
Running an example
cargo run --example trocr --release -- --image hanzo-ml-examples/examples/trocr/assets/trocr.png
cargo run --example trocr --release -- --which large --image hanzo-ml-examples/examples/trocr/assets/trocr.png
cargo run --example trocr --release -- --which base-printed --image hanzo-ml-examples/examples/trocr/assets/noto.png
cargo run --example trocr --release -- --which large-printed --image hanzo-ml-examples/examples/trocr/assets/noto.png
Outputs
industry , Mr. Brown commented icily . " Let us have a
industry , " Mr. Brown commented icily . " Let us have a
THE QUICK BROWN FOR JUMPS OVER THE LAY DOG
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG