Skip to main content

Crate pictor

Crate pictor 

Source
Expand description

§Pictor

Pure Rust 1-bit LLM inference engine for PrismML Bonsai models.

Pictor is a high-performance inference engine designed for 1-bit quantized large language models in GGUF format. It provides a complete pipeline from model loading through token generation, with optional RAG, tokenization, evaluation, and HTTP serving capabilities.

§Quick Start

use pictor::core::GgufStreamParser;

// Parse a GGUF model file via the streaming parser
let _parser = GgufStreamParser::new();

§Crate Organization

CrateDescription
pictor-coreGGUF loader, tensor types, quantization, configuration
pictor-kernelsOptimized compute kernels (SIMD, matmul, softmax)
pictor-modelTransformer model definitions, KV cache, attention
pictor-runtimeInference engine, sampling, speculative decoding
pictor-tokenizerHuggingFace tokenizer integration
pictor-ragRetrieval-augmented generation pipeline
pictor-evalModel evaluation and benchmarking
pictor-serveOpenAI-compatible HTTP server

§Feature Flags

FeatureDescription
serverHTTP server support via pictor-serve
ragRetrieval-augmented generation
native-tokenizerHuggingFace tokenizer support
evalModel evaluation framework
fullEnable all optional features
simd-avx2AVX2 SIMD kernels (x86_64)
simd-avx512AVX-512 SIMD kernels (x86_64)
simd-neonNEON SIMD kernels (AArch64)
wasmWebAssembly target support

§License

Apache-2.0 — derived from oxibonsai (COOLJAPAN OU). See LICENSE and NOTICE.

Re-exports§

pub use pictor_core as core;
pub use pictor_kernels as kernels;
pub use pictor_model as model;
pub use pictor_runtime as runtime;