hf2q 0.1.1

Pure Rust CLI for converting HuggingFace models to hardware-optimized formats and serving them over an OpenAI-compatible API on Apple Silicon
//! ADR-033 P0 — pure-Rust ports of llama.cpp's ggml-quants.c kernels.
//!
//! Each submodule is a byte-identity port of `quantize_row_<T>_ref` and
//! (where it diverges from `_ref`) `quantize_row_<T>_impl` from
//! `/opt/llama.cpp/ggml/src/ggml-quants.c` at the SHA recorded in
//! `data/llama_cpp_pin.txt`.
//!
//! Acceptance gate: each kernel's `#[test]`s load the byte-identity
//! fixtures at `tests/fixtures/ggml_quants/<type>_<n>_<variant>_{input,expected}.bin`
//! (generated by `scripts/ggml_quants_harness/gen` via the public
//! `ggml_quantize_chunk`) and assert `quantize(...) == expected`
//! byte-for-byte.
//!
//! v1 set (11 files): q2_k, q3_k, q4_0, q4_1, q5_0, q5_1, q4_k, q5_k,
//! q6_k, q8_0, iq4_nl. Per ADR-033 §P0 amendment A.

pub mod apex;
pub mod common;
pub mod deepseek4_agentic;
pub mod error;
pub mod ggml_type;
pub mod iq4_nl;
pub mod iq4_xs;
pub mod llama_ftype;
pub mod q2_k;
pub mod q3_k;
pub mod q4_0;
pub mod q4_1;
pub mod q4_k;
pub mod q5_0;
pub mod q5_1;
pub mod q5_k;
pub mod q6_k;
pub mod q8_0;
pub mod quantizer;
pub mod standard_policy;
pub mod tensor_ref;
pub mod vision;

// P1 trait surface — per ADR-033 Decision §"Quantizer trait" + §"Per-tensor IR".
pub use deepseek4_agentic::{
    Deepseek4AgenticQ2Policy, DEEPSEEK4_AGENTIC_Q2_METADATA_KEY, DEEPSEEK4_AGENTIC_Q2_NAME,
};
pub use error::QuantizeError;
pub use ggml_type::GgmlType;
pub use llama_ftype::LlamaFtype;
pub use quantizer::{quantizer_for, GgmlQuantizer, Quantizer};
pub use standard_policy::{tensor_type_fallback, StandardPolicy, TensorCategory};
pub use tensor_ref::{ArchName, SourceDtype, TensorRef};
pub use vision::{is_audio_tensor_pattern, is_vision_tensor_pattern};