mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-21 02:36:58 +00:00
The workspace was mid-migration (mistralrs-* -> hanzo-* rebrand) and the "aggressive theirs" upstream-sync merge left the tree non-building. Make `cargo build -p hanzo-engine` compile green on CPU default features. Workspace + crate layout: - Cargo.toml: reconcile [workspace] members with disk (drop dead hanzo-federation/hanzo-zen5 + all stale mistralrs-* entries; canonical set is hanzo-*). Repoint [workspace.dependencies] path-deps to hanzo-*, add hanzo-ml/hanzo-nn/hanzo-metal-kernels aliases + cutile/cuda-* and sandbox host deps (itoa/nix/landlock/seccompiler). - hanzo-engine is now the canonical core crate: install the full core lib.rs (was mistralrs-core/src/lib.rs, crate-idents scrubbed to hanzo_*) and the full core manifest (cuda/cudnn/cutile/vulkan/wgpu/rocm/metal/ flash-attn*/accelerate/mkl/nccl/utoipa/ring/code-execution features). Drop the stale thin api/mistral_engine/zen5_engine wrapper + bad [[bin]]. - Delete legacy mistralrs-core/, mistralrs-quant/, hanzo-zen5/ (+submodule). - Scrub remaining candle_*/mistralrs_* crate-idents across hanzo-engine/src to hanzo_ml/hanzo_nn/hanzo_quant/hanzo_audio/hanzo_llm_mcp/hanzo_sandbox/ hanzo_code_exec; rename HANZO_GIT_REVISION; declare `mod vulkan`. Brace/structure repair (merge corruption): - layers.rs ~913 + 3 more: drop orphaned RoPE forward bodies; add the dropped forward_positions/qk_rms_norm_rope_positions and re-add the lost rot_width/head_dim locals in qk_rms_norm_mrope. - attention/backends/flash.rs, pipeline/mod.rs (step chunked-prefill), utils/debug.rs: close unbalanced/duplicated blocks. - Voxtral MultimodalModel::forward: pass the real ctx (was undefined). Trait + model fixes: - NormalModel/MultimodalModel::forward now take &mut ModelForwardContext; update every impl (incl. unreachable!() stubs) + their callers. - MoE routing (mixtral/granite/quantized_llama/qwen3_moe/qwen3_next/ qwen3_5*/llama4 + xlora): restore moe_router_topk/topk bindings. - Add missing positions-rotary methods (forward_positions / apply_rotary_emb_positions / forward_qk[v]_norm_positions) on the Phi/DeepSeekV2/GptOss/glm4/OrdinaryRoPE/Proportional rotary structs and quantized_phi2/3 layers; import softcap, FlashParams/PagedAttentionInput Metadata, TopKLastDimOp/TopKOutput, DeviceLocation, std::iter::zip. - Add `?` to compute_kv_shard/compute_n_kv_groups; deref n_expert_used; clone &Device in the nccl/ring branch; restore sampling content_delta. Result: `cargo build -p hanzo-engine` Finished (0 errors). The 3 in-flight arches: qwen3_asr (1ba95ad51) + qwen_image (04d59e31c) are on main and compile in-tree; qwen3_tts (532e43554) is on its feature branch and its model code compiles against this tree (only its SpeechGenerationConfig:: Qwen3Tts enum wiring lives on the branch). Co-authored-by: Hanzo Dev <[email protected]>
86 lines
2.1 KiB
TOML
86 lines
2.1 KiB
TOML
[package]
|
|
name = "hanzo-quant"
|
|
readme = "../README.md"
|
|
authors = ["Hanzo AI"]
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
description.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
categories.workspace = true
|
|
license.workspace = true
|
|
homepage.workspace = true
|
|
|
|
[dependencies]
|
|
hanzo-ml.workspace = true
|
|
hanzo-nn.workspace = true
|
|
half.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
lazy_static.workspace = true
|
|
paste.workspace = true
|
|
tracing.workspace = true
|
|
indicatif.workspace = true
|
|
rayon.workspace = true
|
|
byteorder.workspace = true
|
|
float8.workspace = true
|
|
objc2-metal = { workspace = true, optional = true }
|
|
objc2-foundation = { workspace = true, optional = true }
|
|
dispatch2 = { workspace = true, optional = true }
|
|
hanzo-metal-kernels = { workspace = true, optional = true }
|
|
thiserror.workspace = true
|
|
yoke.workspace = true
|
|
memmap2.workspace = true
|
|
safetensors.workspace = true
|
|
regex.workspace = true
|
|
hf-hub.workspace = true
|
|
tokio.workspace = true
|
|
cutile = { workspace = true, optional = true }
|
|
cutile-compiler = { workspace = true, optional = true }
|
|
cutile-ir = { workspace = true, optional = true }
|
|
cuda-core = { workspace = true, optional = true }
|
|
cuda-async = { workspace = true, optional = true }
|
|
cuda-bindings = { workspace = true, optional = true }
|
|
|
|
[features]
|
|
cuda = [
|
|
"hanzo-ml/cuda",
|
|
"hanzo-nn/cuda",
|
|
"dep:cudaforge"
|
|
]
|
|
nccl = ["cuda", "hanzo-ml/nccl"]
|
|
rocm = ["hanzo-ml/rocm", "hanzo-nn/rocm"]
|
|
vulkan = ["hanzo-ml/vulkan", "hanzo-nn/vulkan"]
|
|
wgpu = ["hanzo-ml/wgpu"]
|
|
metal = [
|
|
"hanzo-ml/metal",
|
|
"hanzo-nn/metal",
|
|
"dep:objc2-metal",
|
|
"dep:objc2-foundation",
|
|
"dep:dispatch2",
|
|
"dep:hanzo-metal-kernels",
|
|
]
|
|
accelerate = ["hanzo-ml/accelerate", "hanzo-nn/accelerate"]
|
|
arm-nightly-feat = []
|
|
ring = []
|
|
|
|
cuda-11040 = []
|
|
cuda-11050 = []
|
|
cuda-11060 = []
|
|
cuda-11070 = []
|
|
cuda-11080 = []
|
|
cuda-12000 = []
|
|
cuda-12010 = []
|
|
cuda-12020 = []
|
|
cuda-12030 = []
|
|
cuda-12040 = []
|
|
cuda-12050 = []
|
|
cuda-12060 = []
|
|
cuda-12080 = []
|
|
cuda-12090 = []
|
|
cuda-13000 = []
|
|
|
|
[build-dependencies]
|
|
cudaforge = { workspace = true, optional = true }
|