[package]
edition = "2021"
rust-version = "1.88"
name = "anamnesis"
version = "0.7.2"
build = false
exclude = ["/fuzz"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
default-run = "anamnesis"
description = "Parse any tensor format, recover any precision — framework-agnostic FP8/GPTQ/AWQ/BnB dequantization, NPZ parsing, and PyTorch .pth conversion for Rust"
homepage = "https://github.com/PCfVW/anamnesis"
documentation = "https://docs.rs/anamnesis"
readme = "README.md"
keywords = [
"safetensors",
"dequantization",
"pytorch",
"gptq",
"machine-learning",
]
categories = [
"science",
"parser-implementations",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/PCfVW/anamnesis"
[package.metadata.docs.rs]
features = [
"npz",
"pth",
"gguf",
"awq",
"gptq",
"bnb",
"ollama",
]
[features]
awq = []
bnb = []
cli = ["dep:clap"]
default = ["parallel"]
gguf = []
gptq = []
indicatif = ["dep:indicatif"]
npz = ["dep:flate2"]
ollama = ["gguf"]
parallel = []
pth = ["dep:flate2"]
[lib]
name = "anamnesis"
path = "src/lib.rs"
[[bin]]
name = "amn"
path = "src/bin/amn.rs"
required-features = ["cli"]
[[bin]]
name = "anamnesis"
path = "src/bin/anamnesis.rs"
required-features = ["cli"]
[[test]]
name = "bench_convert_adhoc"
path = "tests/bench_convert_adhoc.rs"
[[test]]
name = "bench_dequant_adhoc"
path = "tests/bench_dequant_adhoc.rs"
[[test]]
name = "bench_gguf_convert_adhoc"
path = "tests/bench_gguf_convert_adhoc.rs"
[[test]]
name = "bench_gguf_inspect_adhoc"
path = "tests/bench_gguf_inspect_adhoc.rs"
[[test]]
name = "bench_npz_adhoc"
path = "tests/bench_npz_adhoc.rs"
[[test]]
name = "bench_parse_adhoc"
path = "tests/bench_parse_adhoc.rs"
[[test]]
name = "bench_pass2_adhoc"
path = "tests/bench_pass2_adhoc.rs"
[[test]]
name = "bench_pth_adhoc"
path = "tests/bench_pth_adhoc.rs"
[[test]]
name = "bench_pth_inspect_adhoc"
path = "tests/bench_pth_inspect_adhoc.rs"
[[test]]
name = "cli"
path = "tests/cli.rs"
[[test]]
name = "cli_convert"
path = "tests/cli_convert.rs"
[[test]]
name = "cross_validation"
path = "tests/cross_validation.rs"
[[test]]
name = "cross_validation_awq"
path = "tests/cross_validation_awq.rs"
[[test]]
name = "cross_validation_bnb"
path = "tests/cross_validation_bnb.rs"
[[test]]
name = "cross_validation_bnb_encode"
path = "tests/cross_validation_bnb_encode.rs"
[[test]]
name = "cross_validation_convert"
path = "tests/cross_validation_convert.rs"
[[test]]
name = "cross_validation_gguf"
path = "tests/cross_validation_gguf.rs"
[[test]]
name = "cross_validation_gptq"
path = "tests/cross_validation_gptq.rs"
[[test]]
name = "cross_validation_npz"
path = "tests/cross_validation_npz.rs"
[[test]]
name = "cross_validation_ollama"
path = "tests/cross_validation_ollama.rs"
[[test]]
name = "cross_validation_pth"
path = "tests/cross_validation_pth.rs"
[[test]]
name = "cross_validation_safetensors"
path = "tests/cross_validation_safetensors.rs"
[[test]]
name = "no_panic"
path = "tests/no_panic.rs"
[[test]]
name = "panic_profile"
path = "tests/panic_profile.rs"
[[test]]
name = "parallel_contract"
path = "tests/parallel_contract.rs"
[[test]]
name = "parse_owned_path"
path = "tests/parse_owned_path.rs"
[[test]]
name = "peak_heap_awq"
path = "tests/peak_heap_awq.rs"
[[test]]
name = "peak_heap_bnb_dq"
path = "tests/peak_heap_bnb_dq.rs"
[[test]]
name = "peak_heap_gptq"
path = "tests/peak_heap_gptq.rs"
[[test]]
name = "peak_heap_zip_metadata"
path = "tests/peak_heap_zip_metadata.rs"
[[test]]
name = "python_ownership_contract"
path = "tests/python_ownership_contract.rs"
[[test]]
name = "remember_orientation"
path = "tests/remember_orientation.rs"
[[bench]]
name = "convert"
path = "benches/convert.rs"
harness = false
required-features = ["gguf"]
[[bench]]
name = "dequant"
path = "benches/dequant.rs"
harness = false
required-features = [
"gptq",
"awq",
"bnb",
"gguf",
]
[[bench]]
name = "parsing"
path = "benches/parsing.rs"
harness = false
required-features = [
"npz",
"pth",
"gguf",
]
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true
[dependencies.flate2]
version = "1"
features = ["rust_backend"]
optional = true
default-features = false
[dependencies.float8]
version = "0.7"
[dependencies.half]
version = "2"
[dependencies.indicatif]
version = "0.18"
optional = true
[dependencies.memmap2]
version = "0.9"
[dependencies.safetensors]
version = "0.8"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dev-dependencies.criterion]
version = "5"
package = "codspeed-criterion-compat"
[dev-dependencies.dhat]
version = "0.3"
[dev-dependencies.flate2]
version = "1"
features = ["rust_backend"]
default-features = false
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.zip]
version = "2"
features = [
"deflate-flate2",
"flate2",
]
default-features = false
[lints.clippy]
as_conversions = "warn"
expect_used = "deny"
explicit_iter_loop = "warn"
indexing_slicing = "deny"
manual_filter_map = "warn"
manual_find_map = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
module_name_repetitions = "allow"
must_use_candidate = "warn"
needless_range_loop = "warn"
panic = "deny"
too_many_lines = "allow"
unwrap_used = "deny"
wildcard_enum_match_arm = "deny"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
elided_lifetimes_in_paths = "deny"
unsafe_code = "deny"
[profile.python]
panic = "unwind"
inherits = "release"
[profile.release]
panic = "abort"