-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
135 lines (107 loc) · 3.88 KB
/
Copy pathCargo.toml
File metadata and controls
135 lines (107 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[package]
authors = ["Eric Evans <CireSnave@gmail.com>"]
categories = ["algorithms", "science"]
description = "Machine Learning Model Files - Loading, saving, and dynamic mapping for ML models"
edition = "2024"
keywords = [
"gguf",
"machine-learning",
"model-files",
"safetensors",
"transformers",
]
license = "MIT OR Apache-2.0"
name = "mlmf"
readme = "README.md"
repository = "https://github.com/CireSnave/mlmf"
version = "0.3.0"
[dependencies]
# Candlelight - Unified Candle ML framework wrapper (from GitHub)
# Use default-features = false to avoid pulling in flash-attn and other CUDA
# acceleration features. MLMF is a file-loading library and never runs inference
# kernels, so it only needs DType/Device from candlelight. flash-attn's build
# script fetches CUTLASS from GitHub and checks out files with extremely long
# Doxygen-generated HTML names that exceed Windows' MAX_PATH (260 chars), breaking
# the build on Windows entirely.
candlelight = { git = "https://github.com/ciresnave/candlelight", default-features = false }
# Serialization and file handling
safetensors = "0.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Error handling and utilities
anyhow = "1.0"
bytemuck = "1.14"
byteorder = "1.5"
regex = "1.10"
sysinfo = "0.38"
thiserror = "2"
# Optional dependencies for specific formats
tokenizers = { version = "0.22", optional = true }
# Progress reporting and distributed timestamps
chrono = { version = "0.4", features = ["serde"] }
indicatif = { version = "0.18", optional = true }
# Parallel processing
rayon = { version = "1.10", optional = true }
# Memory mapping for GGUF
memmap2 = { version = "0.9", optional = true }
# ONNX support
prost = { version = "0.14", optional = true }
prost-types = { version = "0.14", optional = true }
# Model card timestamps
time = { version = "0.3", features = ["serde"] }
# Half precision floats for ONNX
half = { version = "2.3", optional = true }
# Distributed computing support
tokio = { version = "1.0", features = ["full"] }
uuid = { version = "1.0", features = ["v4"] }
[features]
# Comprehensive by default - MLMF should be full-featured out of the box
default = ["awq", "gguf", "onnx", "progress", "pytorch", "rayon", "tokenizers"]
# Individual format features (can be used for custom combinations)
awq = []
gguf = ["memmap2"]
onnx = ["half", "prost", "prost-types"]
pytorch = []
# Utility features
progress = ["indicatif"]
rayon = ["dep:rayon"]
tokenizers = ["dep:tokenizers"]
# Minimal build for resource-constrained environments
minimal = ["progress"]
[dev-dependencies]
tempfile = "3"
[build-dependencies]
prost-build = "0.14"
[[example]]
name = "load_llama"
required-features = []
[[example]]
name = "test_gguf_loading"
required-features = ["gguf"]
[[example]]
name = "smart_mapping_test"
required-features = []
[[example]]
name = "test_awq_loading"
required-features = ["awq"]
[[example]]
name = "test_full_gguf_loading"
required-features = ["gguf"]
[[example]]
name = "test_gguf_export"
required-features = ["gguf"]
[[example]]
name = "gguf_export_guide"
required-features = ["gguf"]
[[example]]
name = "pytorch_support_example"
required-features = ["pytorch"]
[[example]]
name = "model_card_example"
required-features = []
[[example]]
name = "onnx_import_example"
required-features = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]