1pub mod bert_encoder;
12pub mod bert_gguf_loader;
13pub mod block_residual;
14pub mod capability;
15pub mod chat_template;
16pub mod config;
17pub mod decoder;
18pub mod deepseek_v4_budget;
19pub mod deepseek_v4_decoder;
20pub mod device_budget;
21pub mod draft_model;
22pub mod embedding_model;
23pub mod encoder;
24pub mod engine;
25pub mod engine_factory;
26pub mod execution_plan;
27pub mod gdn;
28pub mod gemma4_engine;
29pub mod gemma4_gguf_loader;
30pub mod glm52_decoder;
31pub mod glm52_gguf_loader;
32pub mod glm_dsa;
33pub mod grammar;
34pub mod grammar_sampler;
35pub mod hf_pull;
36#[cfg(feature = "hub")]
37pub mod hub;
38pub mod hybrid_engine;
39pub mod hybrid_gguf_loader;
40pub mod hyper_connections;
41pub mod kda;
42pub mod kimi_decoder;
43pub mod kimi_generate;
44pub mod kimi_gguf_loader;
45pub mod kimi_loader;
46pub mod kimi_tokenizer;
47pub mod kimi_validate;
48pub mod kv_budget;
49pub mod latent_moe;
50pub mod llama4_engine;
51pub mod loader;
52pub mod minimax_engine;
53pub mod mla;
54pub mod mla_gguf_loader;
55pub mod mmproj;
56pub mod output_projection;
57pub mod penalty_window;
58pub mod pooling;
59pub mod prefix_cache;
60pub mod rank_head;
61pub mod recurrent_engine;
62pub mod residency_report;
63pub(crate) mod sampler_chain;
64pub mod sampling;
65pub mod speculative;
66pub mod t5_engine;
67pub mod tensor_role;
68pub mod tokenizer;
69pub mod vision;
70pub mod vl_engine;
71
72pub use bert_encoder::{BertEncoder, BertHparams, BertLayer};
73pub use bert_gguf_loader::{load_bert_encoder_from_path, read_bert_hparams, BERT_ARCH};
74pub use capability::{
75 architecture_catalog, coverage_report_markdown, resolve_architecture, resolve_profile,
76 ArchPath, ArchProfile, ArchScope, DecoderFamily, MemoryKind, QkNormStyle,
77};
78pub use config::{deepseek_v4_pro, glm_5_2, kimi_k3, FfnActivation, ModelConfig, RopeLayout};
79pub use decoder::{Decoder, MultiSeqKv};
80pub use device_budget::{BudgetBackend, DeviceBudget};
81pub use draft_model::{DraftModelSpeculator, VocabMismatch};
82pub use embedding_model::{is_embedding_arch, EmbedError, EmbeddingModel};
83pub use encoder::{EncodeError, PairSequence, TextEncoder};
84pub use engine::{
85 DeepseekV4Engine, Engine, Glm52Engine, KimiEngine, MlaDenseFfn, MlaEngine, MlaLayerFfn,
86 MlaLayerWeights, MlaMoeFfn, MlaMoeRuntime, TextTokenizer,
87};
88pub use engine_factory::{
89 ensure_generic_decoder, load_gemma4_engine_from_path, load_glm52_engine_from_path,
90 load_mla_engine_from_path, select_engine_kind, EngineSelectError, SelectedEngineKind,
91 ServedEngine,
92};
93pub use execution_plan::{ExecutionPlan, FusedOpCaps, MemoryPlan, PlanGeometry};
94pub use gemma4_engine::{Gemma4Engine, Gemma4Hparams, GEMMA4_ARCHES};
95pub use kv_budget::{
96 Ceiling, ContextCap, ContextFit, KvBudget, KvBudgetError, KvElem, KvLayout, KvShape,
97 CTX_AUTO_GRANULARITY,
98};
99pub use loader::LoadError;
100pub use output_projection::grouped_output_projection;
101pub use penalty_window::PenaltyWindow;
102pub use pooling::{l2_normalize, pool, PoolingError, PoolingType};
103pub use prefix_cache::{PrefixCache, PrefixCacheStats, PrefixMatch};
104pub use rank_head::{load_rank_head, RankHead};
105pub use sampling::{sampling_distribution, Sampler, SamplingParams};
106pub use speculative::{
107 accept_or_resample, speculative_decode, speculative_decode_with, DraftBlock, DraftDist,
108 Drafter, PromptLookupSpeculator, SpeculativeDecodeResult, SpeculativeOptions,
109};
110pub use tensor_role::TensorRole;
111pub use tokenizer::{
112 ByteTokenizer, GgufBpeTokenizer, GgufSpmTokenizer, GgufUnigramTokenizer,
113 GgufWordPieceTokenizer, NormalizerOptions, TokenizerLoadError,
114};
115
116#[cfg(feature = "metal")]
117pub use ferrox_metal::attn::{metal_greedy_argmax_active, set_metal_greedy_argmax};