Skip to main content

skippy_model/
lib.rs

1//! Validated source checkpoint metadata and tensor access for Skippy.
2
3mod float_convert;
4pub mod gguf_catalog;
5pub mod gguf_metadata;
6pub mod gguf_template;
7pub mod gguf_writer;
8pub mod hf_checkpoint;
9pub mod imatrix;
10mod inkling_metadata;
11pub mod package_carrier;
12pub mod tensor_map;
13pub mod tokenizer_metadata;
14
15use clap::ValueEnum;
16use serde::{Deserialize, Serialize};
17
18#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, ValueEnum)]
19#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
20pub enum ConvertOutputType {
21    F32,
22    F16,
23    Bf16,
24    Q8_0,
25    TQ1_0,
26    TQ2_0,
27    Auto,
28}
29
30impl ConvertOutputType {
31    pub fn as_arg(self) -> &'static str {
32        match self {
33            Self::F32 => "f32",
34            Self::F16 => "f16",
35            Self::Bf16 => "bf16",
36            Self::Q8_0 => "q8_0",
37            Self::TQ1_0 => "tq1_0",
38            Self::TQ2_0 => "tq2_0",
39            Self::Auto => "auto",
40        }
41    }
42}