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 class | Module | Models |
|---|---|---|
LlamaForCausalLM | llama | Llama 1/2/3, Mistral, CodeLlama, Vicuna, WizardLM |
PhiForCausalLM | phi | Phi-1/2/3/3.5 |
GemmaForCausalLM | gemma | Gemma, Gemma 2 |
GPT2LMHeadModel | gpt2 | GPT-2, CodeGen, GPT-J |
BertForMaskedLM | bert | BERT, RoBERTa, DistilBERT |
Qwen2ForCausalLM | qwen | Qwen, Qwen2, Qwen2.5 |
MixtralForCausalLM | mixtral | Mixtral-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.