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