realizar 0.3.2

Pure Rust ML inference engine built from scratch - model serving for GGUF and safetensors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use realizar::gguf::GGUFModel;
use std::fs;

fn main() {
    let data = fs::read("/home/noah/src/aprender/tinyllama-1.1b-chat-v1.0.Q4_0.gguf").unwrap();
    let model = GGUFModel::from_bytes(&data).unwrap();

    println!("Tensor dimensions (first layer Q/K/V and embedding):");
    for t in &model.tensors {
        if t.name.contains("token_embd")
            || t.name.contains("output.weight")
            || t.name.contains("blk.0.")
        {
            println!("  {}: dims={:?}, qtype={}", t.name, t.dims, t.qtype);
        }
    }
}