Skip to main content

Crate sapient_models

Crate sapient_models 

Source
Expand description

sapient-models — pre-built LLM architecture graph builders.

Each architecture module builds a SAPIENT Graph from a ModelInfo, matching the exact HuggingFace architecture for that model family.

§Supported architectures

HuggingFace classModuleModels
LlamaForCausalLMllamaLlama 1/2/3, Mistral, CodeLlama, Vicuna, WizardLM
PhiForCausalLMphiPhi-1/2/3/3.5
GemmaForCausalLMgemmaGemma, Gemma 2
GPT2LMHeadModelgpt2GPT-2, CodeGen, GPT-J
BertForMaskedLMbertBERT, RoBERTa, DistilBERT
Qwen2ForCausalLMqwenQwen, Qwen2, Qwen2.5
MixtralForCausalLMmixtralMixtral-8x7B, Mixtral-8x22B

Re-exports§

pub use forward::mac_gpu_support;
pub use forward::total_system_ram_bytes;
pub use forward::ForwardEngine;
pub use forward::LlmBackendKind;
pub use forward::MacGpuSupport;
pub use registry::build_graph;
pub use registry::ModelGraph;

Modules§

architectures
forward
Real transformer forward passes for text generation.
gguf_weights
Map llama.cpp GGUF tensor names to HuggingFace layout for native forward passes.
registry
Architecture registry — dispatch from ArchType → graph builder.
weights
HuggingFace safetensors weight loading and key resolution.