hf2q 0.1.4

Pure Rust CLI for converting HuggingFace models to hardware-optimized formats and serving them over an OpenAI-compatible API on Apple Silicon
//! DeepSeek-V4-Flash inference primitives.
//!
//! This module is deliberately architecture-specific. DeepSeek-V4's
//! sqrt-softplus router and Hyper-Connection residual mixer are not
//! interchangeable with the Qwen or Gemma graphs.

pub mod attention;
mod attention_entry;
mod attention_forward;
mod attention_weights;
pub mod cache;
mod cache_buffers;
mod compressed_attention;
mod compressed_attention_common;
mod compressed_attention_indexer;
mod compressed_attention_main;
mod compressed_attention_weights;
pub mod compressor;
pub mod config;
mod ffn_forward;
pub mod forward;
mod forward_support;
pub mod hyper_connection;
pub mod model;
mod output_forward;
mod prefill_flash_attention;
pub mod residency;
pub mod rope;
pub mod routing;
mod submission;
pub mod tokenizer;
mod verifier_forward;
pub mod weights;

pub use config::Deepseek4Config;
pub(crate) use forward_support::{
    decode_scratch_stats, prefill_scratch_stats, release_decode_scratch, release_prefill_scratch,
    TransientScratchStats,
};
pub use model::Deepseek4Model;
pub use residency::Deepseek4Weights;
pub(crate) use verifier_forward::matrix_prefill_chunk_len;

#[cfg(test)]
mod attention_forward_tests;
#[cfg(test)]
mod cache_tests;
#[cfg(test)]
mod ffn_forward_tests;
#[cfg(test)]
mod forward_tests;
#[cfg(test)]
mod model_tests;
#[cfg(test)]
mod real_artifact_tests;
#[cfg(test)]
mod residency_tests;

pub const ARCH_DEEPSEEK4: &str = "deepseek4";