zeroquantz 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. zeroquantz/__init__.py +14 -0
  2. zeroquantz/__main__.py +8 -0
  3. zeroquantz/agent/__init__.py +16 -0
  4. zeroquantz/agent/dispatcher.py +520 -0
  5. zeroquantz/agent/intents.py +46 -0
  6. zeroquantz/agent/parser.py +255 -0
  7. zeroquantz/benchmark/__init__.py +7 -0
  8. zeroquantz/benchmark/latency.py +66 -0
  9. zeroquantz/benchmark/memory.py +41 -0
  10. zeroquantz/benchmark/quality.py +38 -0
  11. zeroquantz/benchmark/runner.py +151 -0
  12. zeroquantz/cli/__init__.py +7 -0
  13. zeroquantz/cli/app.py +98 -0
  14. zeroquantz/cli/commands.py +459 -0
  15. zeroquantz/cli/interactive.py +56 -0
  16. zeroquantz/core/__init__.py +7 -0
  17. zeroquantz/core/artifacts.py +179 -0
  18. zeroquantz/core/context.py +127 -0
  19. zeroquantz/core/events.py +30 -0
  20. zeroquantz/core/exceptions.py +105 -0
  21. zeroquantz/core/session.py +202 -0
  22. zeroquantz/core/subenv.py +202 -0
  23. zeroquantz/deploy/__init__.py +25 -0
  24. zeroquantz/deploy/assets.py +161 -0
  25. zeroquantz/deploy/launcher.py +80 -0
  26. zeroquantz/deploy/runtime_env.py +66 -0
  27. zeroquantz/deploy/targets.py +154 -0
  28. zeroquantz/export/__init__.py +8 -0
  29. zeroquantz/export/exporter.py +68 -0
  30. zeroquantz/export/report.py +203 -0
  31. zeroquantz/hardware/__init__.py +15 -0
  32. zeroquantz/hardware/capabilities.py +152 -0
  33. zeroquantz/hardware/detector.py +200 -0
  34. zeroquantz/hardware/gpu.py +31 -0
  35. zeroquantz/models/__init__.py +8 -0
  36. zeroquantz/models/architecture.py +168 -0
  37. zeroquantz/models/downloader.py +161 -0
  38. zeroquantz/models/hf_auth.py +105 -0
  39. zeroquantz/models/inspector.py +249 -0
  40. zeroquantz/models/metadata.py +108 -0
  41. zeroquantz/models/search.py +71 -0
  42. zeroquantz/optimization/__init__.py +22 -0
  43. zeroquantz/optimization/candidate.py +272 -0
  44. zeroquantz/optimization/constraints.py +70 -0
  45. zeroquantz/optimization/fit.py +203 -0
  46. zeroquantz/optimization/pareto.py +66 -0
  47. zeroquantz/optimization/planner.py +297 -0
  48. zeroquantz/optimization/recommender.py +149 -0
  49. zeroquantz/profiling/__init__.py +18 -0
  50. zeroquantz/profiling/calibration.py +74 -0
  51. zeroquantz/profiling/sensitivity.py +234 -0
  52. zeroquantz/quantization/__init__.py +17 -0
  53. zeroquantz/quantization/backends/__init__.py +8 -0
  54. zeroquantz/quantization/backends/bitsandbytes.py +210 -0
  55. zeroquantz/quantization/backends/torchao.py +198 -0
  56. zeroquantz/quantization/base.py +136 -0
  57. zeroquantz/quantization/catalog.py +321 -0
  58. zeroquantz/quantization/config.py +106 -0
  59. zeroquantz/quantization/gguf_pipeline.py +210 -0
  60. zeroquantz/quantization/isolated.py +248 -0
  61. zeroquantz/quantization/memory.py +133 -0
  62. zeroquantz/quantization/native.py +91 -0
  63. zeroquantz/quantization/registry.py +101 -0
  64. zeroquantz/render.py +341 -0
  65. zeroquantz/runtimes/__init__.py +18 -0
  66. zeroquantz/runtimes/base.py +64 -0
  67. zeroquantz/runtimes/compatibility.py +91 -0
  68. zeroquantz/runtimes/registry.py +70 -0
  69. zeroquantz/runtimes/transformers.py +53 -0
  70. zeroquantz/runtimes/vllm.py +83 -0
  71. zeroquantz/tui/__init__.py +13 -0
  72. zeroquantz/tui/app.py +77 -0
  73. zeroquantz/tui/banner.py +47 -0
  74. zeroquantz/tui/screens/__init__.py +25 -0
  75. zeroquantz/tui/screens/confirm.py +41 -0
  76. zeroquantz/tui/screens/execute.py +194 -0
  77. zeroquantz/tui/screens/model_select.py +206 -0
  78. zeroquantz/tui/screens/plan.py +177 -0
  79. zeroquantz/tui/screens/quantize_select.py +272 -0
  80. zeroquantz/tui/screens/settings.py +219 -0
  81. zeroquantz/tui/screens/token.py +94 -0
  82. zeroquantz/tui/screens/welcome.py +128 -0
  83. zeroquantz/tui/screens/workspace.py +175 -0
  84. zeroquantz/tui/styles/app.tcss +424 -0
  85. zeroquantz/tui/widgets/__init__.py +9 -0
  86. zeroquantz/tui/widgets/chip.py +36 -0
  87. zeroquantz/tui/widgets/sidebar.py +107 -0
  88. zeroquantz/tui/widgets/status_bar.py +43 -0
  89. zeroquantz/utils/__init__.py +8 -0
  90. zeroquantz/utils/config.py +46 -0
  91. zeroquantz/utils/env.py +78 -0
  92. zeroquantz/utils/logging.py +73 -0
  93. zeroquantz/utils/metrics.py +98 -0
  94. zeroquantz/utils/paths.py +57 -0
  95. zeroquantz/utils/units.py +134 -0
  96. zeroquantz/verification/__init__.py +17 -0
  97. zeroquantz/verification/logits.py +55 -0
  98. zeroquantz/verification/report.py +186 -0
  99. zeroquantz/verification/weights.py +44 -0
  100. zeroquantz/version.py +8 -0
  101. zeroquantz-0.1.0.dist-info/METADATA +72 -0
  102. zeroquantz-0.1.0.dist-info/RECORD +105 -0
  103. zeroquantz-0.1.0.dist-info/WHEEL +4 -0
  104. zeroquantz-0.1.0.dist-info/entry_points.txt +2 -0
  105. zeroquantz-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,186 @@
1
+ """Verification report + threshold evaluation.
2
+
3
+ ZeroQuantz must never silently claim a quantization is lossless. The verifier
4
+ compares a quantized model against its full-precision baseline and reports a
5
+ PASS/WARN/FAIL status against *configurable* thresholds, with the numbers that
6
+ drove the decision.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from typing import TYPE_CHECKING
12
+
13
+ from pydantic import BaseModel, Field
14
+
15
+ from zeroquantz.core.exceptions import DependencyError
16
+ from zeroquantz.utils import metrics
17
+ from zeroquantz.utils.env import capture_environment
18
+
19
+ if TYPE_CHECKING:
20
+ from collections.abc import Callable
21
+
22
+ from zeroquantz.hardware.capabilities import HardwareProfile
23
+
24
+
25
+ class VerificationThresholds(BaseModel):
26
+ min_logit_cosine: float = 0.99
27
+ max_mean_kl: float = 0.10
28
+ max_perplexity_increase: float = 0.05 # 5% relative
29
+
30
+
31
+ class VerificationReport(BaseModel):
32
+ base_model: str
33
+ quant_model: str
34
+ samples: int = 0
35
+ logit_cosine: float | None = None
36
+ mean_kl: float | None = None
37
+ top1_agreement: float | None = None
38
+ perplexity_baseline: float | None = None
39
+ perplexity_quantized: float | None = None
40
+ perplexity_delta: float | None = None # relative fraction
41
+ status: str = "INCONCLUSIVE"
42
+ reasons: list[str] = Field(default_factory=list)
43
+ thresholds: VerificationThresholds = Field(default_factory=VerificationThresholds)
44
+ environment: dict = Field(default_factory=dict)
45
+ measured: bool = True
46
+
47
+ def summary_rows(self) -> list[tuple[str, str]]:
48
+ rows: list[tuple[str, str]] = [("Samples", str(self.samples))]
49
+ if self.logit_cosine is not None:
50
+ rows.append(("Logit cosine similarity", f"{self.logit_cosine:.4f}"))
51
+ if self.mean_kl is not None:
52
+ rows.append(("Mean KL divergence", f"{self.mean_kl:.4f}"))
53
+ if self.top1_agreement is not None:
54
+ rows.append(("Top-1 agreement", f"{self.top1_agreement:.4f}"))
55
+ if self.perplexity_baseline is not None:
56
+ rows.append(("Perplexity (baseline)", f"{self.perplexity_baseline:.2f}"))
57
+ if self.perplexity_quantized is not None:
58
+ rows.append(("Perplexity (quantized)", f"{self.perplexity_quantized:.2f}"))
59
+ if self.perplexity_delta is not None:
60
+ rows.append(("Perplexity delta", f"{self.perplexity_delta * 100:+.2f}%"))
61
+ rows.append(("Status", self.status))
62
+ return rows
63
+
64
+
65
+ def evaluate_thresholds(
66
+ thresholds: VerificationThresholds,
67
+ *,
68
+ logit_cosine: float | None,
69
+ mean_kl: float | None,
70
+ perplexity_delta: float | None,
71
+ ) -> tuple[str, list[str]]:
72
+ """Pure decision function: metrics + thresholds -> (status, reasons).
73
+
74
+ Returns ``INCONCLUSIVE`` if no metric could be evaluated, ``FAIL`` if any
75
+ breaches its threshold, otherwise ``PASS``.
76
+ """
77
+ reasons: list[str] = []
78
+ evaluated = 0
79
+ failed = False
80
+
81
+ if logit_cosine is not None:
82
+ evaluated += 1
83
+ if logit_cosine < thresholds.min_logit_cosine:
84
+ failed = True
85
+ reasons.append(
86
+ f"logit cosine {logit_cosine:.4f} < {thresholds.min_logit_cosine}"
87
+ )
88
+ if mean_kl is not None:
89
+ evaluated += 1
90
+ if mean_kl > thresholds.max_mean_kl:
91
+ failed = True
92
+ reasons.append(f"mean KL {mean_kl:.4f} > {thresholds.max_mean_kl}")
93
+ if perplexity_delta is not None:
94
+ evaluated += 1
95
+ if perplexity_delta > thresholds.max_perplexity_increase:
96
+ failed = True
97
+ reasons.append(
98
+ f"perplexity increased {perplexity_delta * 100:.2f}% "
99
+ f"> {thresholds.max_perplexity_increase * 100:.0f}%"
100
+ )
101
+
102
+ if evaluated == 0:
103
+ return "INCONCLUSIVE", ["no metrics could be evaluated"]
104
+ if failed:
105
+ return "FAIL", reasons
106
+ return "PASS", ["all metrics within thresholds"]
107
+
108
+
109
+ class Verifier:
110
+ """Compare a quantized model against its full-precision baseline."""
111
+
112
+ @staticmethod
113
+ def verify(
114
+ base_ref: str,
115
+ quant_ref: str,
116
+ *,
117
+ prompts: list[str] | None = None,
118
+ thresholds: VerificationThresholds | None = None,
119
+ measure_perplexity: bool = True,
120
+ hardware: HardwareProfile | None = None,
121
+ progress: Callable[[str, float], None] | None = None,
122
+ ) -> VerificationReport:
123
+ try:
124
+ import torch
125
+ from transformers import AutoModelForCausalLM, AutoTokenizer
126
+ except ImportError as exc:
127
+ raise DependencyError.for_extra(
128
+ "transformers", "torch", purpose="verify a quantized model"
129
+ ) from exc
130
+
131
+ from zeroquantz.benchmark.quality import measure_perplexity
132
+ from zeroquantz.profiling.calibration import default_calibration
133
+ from zeroquantz.verification.logits import compare_logits
134
+
135
+ thresholds = thresholds or VerificationThresholds()
136
+ prompts = prompts or default_calibration(16).prompts
137
+
138
+ if progress:
139
+ progress("Loading baseline", 0.1)
140
+ tokenizer = AutoTokenizer.from_pretrained(base_ref)
141
+ base_model = AutoModelForCausalLM.from_pretrained(
142
+ base_ref, torch_dtype=torch.float16, device_map="auto"
143
+ ).eval()
144
+
145
+ if progress:
146
+ progress("Loading quantized model", 0.4)
147
+ quant_model = AutoModelForCausalLM.from_pretrained(
148
+ quant_ref, device_map="auto"
149
+ ).eval()
150
+
151
+ if progress:
152
+ progress("Comparing logits", 0.6)
153
+ comparison = compare_logits(base_model, quant_model, tokenizer, prompts)
154
+
155
+ ppl_base = ppl_quant = ppl_delta = None
156
+ if measure_perplexity:
157
+ if progress:
158
+ progress("Measuring perplexity", 0.8)
159
+ ppl_base = measure_perplexity(base_model, tokenizer, prompts)
160
+ ppl_quant = measure_perplexity(quant_model, tokenizer, prompts)
161
+ ppl_delta = metrics.relative_delta(ppl_base, ppl_quant)
162
+
163
+ status, reasons = evaluate_thresholds(
164
+ thresholds,
165
+ logit_cosine=comparison.logit_cosine,
166
+ mean_kl=comparison.mean_kl,
167
+ perplexity_delta=ppl_delta,
168
+ )
169
+
170
+ if progress:
171
+ progress("Verification complete", 1.0)
172
+ return VerificationReport(
173
+ base_model=base_ref,
174
+ quant_model=quant_ref,
175
+ samples=comparison.samples,
176
+ logit_cosine=comparison.logit_cosine,
177
+ mean_kl=comparison.mean_kl,
178
+ top1_agreement=comparison.top1_agreement,
179
+ perplexity_baseline=round(ppl_base, 4) if ppl_base is not None else None,
180
+ perplexity_quantized=round(ppl_quant, 4) if ppl_quant is not None else None,
181
+ perplexity_delta=round(ppl_delta, 6) if ppl_delta is not None else None,
182
+ status=status,
183
+ reasons=reasons,
184
+ thresholds=thresholds,
185
+ environment=capture_environment(hardware),
186
+ )
@@ -0,0 +1,44 @@
1
+ """Optional weight-level comparison between baseline and quantized modules."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from typing import Any
7
+
8
+
9
+ @dataclass
10
+ class WeightErrorSummary:
11
+ compared_tensors: int
12
+ mean_relative_error: float
13
+ max_relative_error: float
14
+
15
+
16
+ def compare_weights(base_model: Any, quant_model: Any) -> WeightErrorSummary | None:
17
+ """Mean/max relative error between matching float weight tensors.
18
+
19
+ Best-effort: quantized modules often store packed integer weights rather than
20
+ dequantized floats, in which case there is nothing to compare and this returns
21
+ ``None``.
22
+ """
23
+ try:
24
+ import torch
25
+ except ImportError:
26
+ return None
27
+
28
+ base_params = dict(base_model.named_parameters())
29
+ errors: list[float] = []
30
+ with torch.no_grad():
31
+ for name, qp in quant_model.named_parameters():
32
+ bp = base_params.get(name)
33
+ if bp is None or bp.shape != qp.shape or not qp.is_floating_point():
34
+ continue
35
+ denom = bp.float().abs().mean().clamp_min(1e-8)
36
+ rel = (qp.float() - bp.float()).abs().mean() / denom
37
+ errors.append(float(rel))
38
+ if not errors:
39
+ return None
40
+ return WeightErrorSummary(
41
+ compared_tensors=len(errors),
42
+ mean_relative_error=round(sum(errors) / len(errors), 6),
43
+ max_relative_error=round(max(errors), 6),
44
+ )
zeroquantz/version.py ADDED
@@ -0,0 +1,8 @@
1
+ """Single source of truth for the ZeroQuantz version.
2
+
3
+ Bump this one line to cut a release: the build backend (hatchling) reads it, the
4
+ package exposes it as ``zeroquantz.__version__``, and the release workflow triggers
5
+ on changes to this file. Nothing else needs editing.
6
+ """
7
+
8
+ __version__ = "0.1.0"
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: zeroquantz
3
+ Version: 0.1.0
4
+ Summary: Interactive model optimization and quantization from your terminal.
5
+ Project-URL: Homepage, https://github.com/IMvision12/ZeroQuantz
6
+ Project-URL: Repository, https://github.com/IMvision12/ZeroQuantz
7
+ Project-URL: Issues, https://github.com/IMvision12/ZeroQuantz/issues
8
+ Author: ZeroQuantz contributors
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: bitsandbytes,inference,llm,optimization,quantization,torchao,tui,vllm
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: huggingface-hub>=0.23
22
+ Requires-Dist: numpy>=1.24
23
+ Requires-Dist: platformdirs>=4.0
24
+ Requires-Dist: psutil>=5.9
25
+ Requires-Dist: pydantic>=2.6
26
+ Requires-Dist: rich>=13.7
27
+ Requires-Dist: safetensors>=0.4
28
+ Requires-Dist: textual>=0.60
29
+ Requires-Dist: typer>=0.12
30
+ Provides-Extra: all
31
+ Requires-Dist: accelerate>=0.30; extra == 'all'
32
+ Requires-Dist: bitsandbytes>=0.43; (platform_system != 'Darwin') and extra == 'all'
33
+ Requires-Dist: hf-transfer>=0.1.6; extra == 'all'
34
+ Requires-Dist: nvidia-ml-py>=12.0; extra == 'all'
35
+ Requires-Dist: torch>=2.2; extra == 'all'
36
+ Requires-Dist: torchao>=0.5; extra == 'all'
37
+ Requires-Dist: transformers>=4.40; extra == 'all'
38
+ Provides-Extra: dev
39
+ Requires-Dist: mypy>=1.10; extra == 'dev'
40
+ Requires-Dist: pre-commit>=3.7; extra == 'dev'
41
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
42
+ Requires-Dist: pytest>=8.0; extra == 'dev'
43
+ Requires-Dist: ruff>=0.6; extra == 'dev'
44
+ Provides-Extra: fast
45
+ Requires-Dist: hf-transfer>=0.1.6; extra == 'fast'
46
+ Provides-Extra: nvml
47
+ Requires-Dist: nvidia-ml-py>=12.0; extra == 'nvml'
48
+ Provides-Extra: quant
49
+ Requires-Dist: bitsandbytes>=0.43; (platform_system != 'Darwin') and extra == 'quant'
50
+ Requires-Dist: torchao>=0.5; extra == 'quant'
51
+ Provides-Extra: torch
52
+ Requires-Dist: accelerate>=0.30; extra == 'torch'
53
+ Requires-Dist: torch>=2.2; extra == 'torch'
54
+ Requires-Dist: transformers>=4.40; extra == 'torch'
55
+ Description-Content-Type: text/markdown
56
+
57
+ # ZeroQuantz
58
+
59
+ Interactive model optimization and quantization from your terminal.
60
+
61
+ > 🚧 **Early development.** This is an initial release to reserve the package name.
62
+ > The CLI, TUI, and full documentation are on the way.
63
+
64
+ ## Install
65
+
66
+ ```bash
67
+ pip install zeroquantz
68
+ ```
69
+
70
+ ## License
71
+
72
+ Apache-2.0
@@ -0,0 +1,105 @@
1
+ zeroquantz/__init__.py,sha256=RwBZxjFXLRTayyOiTMPiFo41g836yidwmyKza_g-NAI,587
2
+ zeroquantz/__main__.py,sha256=q5a3t64MqslVZVfS2ko3MsNIFEp1gtCgXMIWyKmXujc,151
3
+ zeroquantz/render.py,sha256=WYkrL9n_aw0HmxKyBS41dQ_0G2yoJYGbUS2X5Ndlwtw,12261
4
+ zeroquantz/version.py,sha256=K79ivB1JbEyonNpLaFnrrLpsvFJELgw22uPdc2Y7nOc,300
5
+ zeroquantz/agent/__init__.py,sha256=IkxSBXHr1GvkcuwckrgIfCyJoXwID4iqfCMlgJmlq_s,428
6
+ zeroquantz/agent/dispatcher.py,sha256=WaiSdRBZcjLBXaVtXt8iIOBao3z_-i-aQVIS9oqM3b8,23718
7
+ zeroquantz/agent/intents.py,sha256=Zjw025UpI2W_jIT4fYdYt1SmPFiSdXFTMTjgwPn8sUc,1170
8
+ zeroquantz/agent/parser.py,sha256=ZSG2EhqSGl4bxbskj5iXilEpvjDP4Z5ueVnmNIRg0UA,9748
9
+ zeroquantz/benchmark/__init__.py,sha256=65NI46YLkcIQ5DTPK4BVStOd1bG-oMxTkqk9B16muGU,235
10
+ zeroquantz/benchmark/latency.py,sha256=Fu5NE62tAb2ao4PwR3BN3Mp3B4vyAF20cUfSyv9u-Qw,1862
11
+ zeroquantz/benchmark/memory.py,sha256=KMnHs8I4Q_8e9gclBi39EVomhBgeMgZI8J_hR5-G5G0,1192
12
+ zeroquantz/benchmark/quality.py,sha256=gbI5C95lmVS3IR5cnQNXAnh0B-7McKMPRBHyE3aGbAE,1132
13
+ zeroquantz/benchmark/runner.py,sha256=fDdCV8qvCAeg4r46PqGmo0CE6MnqQx0z-XP3RQ_s_xY,5415
14
+ zeroquantz/cli/__init__.py,sha256=cDBcytv8l86ALs2d2jFyxtNBDMyIHoEjmJ-fhq9JGhY,155
15
+ zeroquantz/cli/app.py,sha256=WlC3cjHcuNnVfEU5juIoCbB1HNjouN8-bNcfarTJyj4,3281
16
+ zeroquantz/cli/commands.py,sha256=NQzGfNUUN0p8XefLvqI80K_yYiK4zTsBiKWXdRHsYco,21629
17
+ zeroquantz/cli/interactive.py,sha256=z-og4P3iS63efSKpTR6W_Y5oPtYKOA1PzDBQHEVoKBc,2072
18
+ zeroquantz/core/__init__.py,sha256=JKuMfbrtKsCSjB_Nk3_d0_8oQ3biHoxYxi6cYeaD4-s,180
19
+ zeroquantz/core/artifacts.py,sha256=yxSvTC0j5OAWOEaThRVg5PjBbyL9_TI01vytI2mxRBc,5527
20
+ zeroquantz/core/context.py,sha256=WuoZPfn47AZC48upAy_1NUybqxFVylluzaaZLRzi2LU,4217
21
+ zeroquantz/core/events.py,sha256=iN4_Pwh2wrn3t3uXLM2HbX7P3s_iJSgxYlSoSJ8CI4c,912
22
+ zeroquantz/core/exceptions.py,sha256=qtzj7RIgBsF1VrN7t-tfeVNDn9jN6-wssbsKRbeY0dc,3212
23
+ zeroquantz/core/session.py,sha256=bICTpanntZzwagy4tnC7h-O7syzUnSXbRAdlHyIIlwE,7069
24
+ zeroquantz/core/subenv.py,sha256=0MRh6hVYc_ocTLehe17eVRttocAA6y4eMG_Upn0URWk,7773
25
+ zeroquantz/deploy/__init__.py,sha256=feYzOV11rsnoUCaaHEiH_rjsv3ZNCCx4fgIOfPbCx1A,867
26
+ zeroquantz/deploy/assets.py,sha256=VpQwny2qTQ40rBnqetAPQhxN-l0ZJxebUm4jUA5DVIY,5880
27
+ zeroquantz/deploy/launcher.py,sha256=CPOTpk8ZaKpcMFcivdKDdflYwNv11cnpK6a7tCbyoJM,2918
28
+ zeroquantz/deploy/runtime_env.py,sha256=NSPdLw6M_9QJ2MCcpPTlsrvMBqi-sEd5RzL4-cvI89I,2418
29
+ zeroquantz/deploy/targets.py,sha256=iPbao06Zbf1FYdX_hpsueEyKF2oN1ke0UZDG4yDgYJo,6391
30
+ zeroquantz/export/__init__.py,sha256=cLnAIo9FIbbklX-TY4xQy3G8tNKs6nZfHR9rUFTuBk8,280
31
+ zeroquantz/export/exporter.py,sha256=lp9r57OjrxC6dXfV45_3vLCnyKZlOA1mUW0htXSMFp0,2326
32
+ zeroquantz/export/report.py,sha256=wuRILYFDe_8KNttjwANIsAOlDAe7maHzVzuaRhArco4,7149
33
+ zeroquantz/hardware/__init__.py,sha256=-IV-rJ6viO7actZy57Puow8_J1KlAczO1__Ctp_ilFk,426
34
+ zeroquantz/hardware/capabilities.py,sha256=Upx-HPLzgfvhQT_mIXJk_4eFCZDh3UUEpLx-stditfU,4967
35
+ zeroquantz/hardware/detector.py,sha256=ke3dxjGMNmDUTeBB4PgabW7ORr0Xl50sm60DKqobfuw,8051
36
+ zeroquantz/hardware/gpu.py,sha256=TbFKAqb4LPyde1cn9lqBSmFUOao1fmzWwdYHxJ4fo_Q,837
37
+ zeroquantz/models/__init__.py,sha256=Qu4Uz1SUp3qgVJJk2MAD5-E59cZMWDzOrlQRK5TxP4g,244
38
+ zeroquantz/models/architecture.py,sha256=BTU6uOYrNEHsePLth4hfNoLJvrsDeNDEJyfW3voFZCc,5437
39
+ zeroquantz/models/downloader.py,sha256=PCJpe4HMbxr6zWO6UPBux5BhaMe6Oa0cPB8QZhO0Vd0,5924
40
+ zeroquantz/models/hf_auth.py,sha256=0VhR8kvbRfg3txuOGf-PrULnuImgvuHxF-sceHOTbzQ,3361
41
+ zeroquantz/models/inspector.py,sha256=7_zuebDnOGUNz5ahTaeRA3DVXbIdfwTfOXtgpKlLb00,9535
42
+ zeroquantz/models/metadata.py,sha256=kUL5xLSN-o_BGeFohI-d36nzOaiok9KGbhyO0TUwg1I,4138
43
+ zeroquantz/models/search.py,sha256=lRVoMxLomURqg7pfbMA0w2TKoPAZZ1Lw-5gmD_VI4r0,2464
44
+ zeroquantz/optimization/__init__.py,sha256=5tPfAkKmSlXexP5AIi5rWrIAbCZHd7eHA99ArjItIhA,751
45
+ zeroquantz/optimization/candidate.py,sha256=ybSD1uPOq8_WqnRPFaaxI1MxhySWjvemXHHpS5TPl_4,10197
46
+ zeroquantz/optimization/constraints.py,sha256=MpOfu9fC9rt85mkacHDRUE32MMgFxnvHVp0plXoJ9nY,2711
47
+ zeroquantz/optimization/fit.py,sha256=2lgUdEEGvhLwfiCvu9fgemsuprJeS0WD_ss4Hpmq1Wk,7031
48
+ zeroquantz/optimization/pareto.py,sha256=CKAPCy-LmGvmlZ8O9xfUEEPvCo9OI0qAXl6sXS21ohY,2139
49
+ zeroquantz/optimization/planner.py,sha256=9FBITAXv8WugzhBN9fJFklPSQ7jfv7B7_Fx2izGBv7U,11056
50
+ zeroquantz/optimization/recommender.py,sha256=eyx8QIVRUdHiW-TKQfPNMTOOuDVaBKVNEigEwJ3tuDU,5354
51
+ zeroquantz/profiling/__init__.py,sha256=9PMdlQ3NaJGbw6VCtXn2OMsXYEfE9XdxaoKgEs-_Iuc,443
52
+ zeroquantz/profiling/calibration.py,sha256=5mvB-_un8ai5d1ZwECKU0j6zrpXHx8ymOqcS0DH3HTc,3312
53
+ zeroquantz/profiling/sensitivity.py,sha256=LHt5xv0ZRQ5BkDmcG8iJOkmQhS6qfxNxCrkS18WlkHc,8876
54
+ zeroquantz/quantization/__init__.py,sha256=qpYAITsUq-HsNq3dtbB-mAH2V4obBr5JfneAfb_sUD4,534
55
+ zeroquantz/quantization/base.py,sha256=JFY3fV3AN4vN7kZzKyVnTIayw8p8rKL0kmx_Ddl8txw,4552
56
+ zeroquantz/quantization/catalog.py,sha256=hmcSApy_gLu49KYKKZpcfxwptNzrNvwr3y9z4fPZ154,18032
57
+ zeroquantz/quantization/config.py,sha256=N4_t3f-Yd5nl7_nj60obP-LZ3M0mpeKm-8y8B0tLO_Y,3573
58
+ zeroquantz/quantization/gguf_pipeline.py,sha256=5sV-1elgXvqei5KcoonyJoxXHQ92hF46a-B8_C4mztQ,7989
59
+ zeroquantz/quantization/isolated.py,sha256=HzNrTlbzO2fQBYX6rzIElg8b1HsI--FYi8mpH1zNXC8,9496
60
+ zeroquantz/quantization/memory.py,sha256=ysW-mmSdUlgPmB7QPygjgGp7t8xdCZjofk6MS86sTkw,4555
61
+ zeroquantz/quantization/native.py,sha256=mDALKj6NvsAHZQNpGblneMVX8iDY3T4bN7w5v19G5f8,3144
62
+ zeroquantz/quantization/registry.py,sha256=43oz6Z0gRdne2yxdVW-ciHidW9XlmbxJ1DlZcN7DdDE,4092
63
+ zeroquantz/quantization/backends/__init__.py,sha256=MmByOzKPs4__bFsudmznl3YDGEqsa9QaShbn4pE-Ko8,274
64
+ zeroquantz/quantization/backends/bitsandbytes.py,sha256=7p7D3AXL-CSONPHdgYq3_SHzh4TkUrjTUaB9zLqSQdE,7559
65
+ zeroquantz/quantization/backends/torchao.py,sha256=tkUP0UDnD6CiB2VTvlwr0ZqmlKYoV3wwL2DLLl7HGhg,7180
66
+ zeroquantz/runtimes/__init__.py,sha256=HAmQgwZF95U54MUFTs9yyFGoHjowqiXxqQCFVqRMHIs,435
67
+ zeroquantz/runtimes/base.py,sha256=jJt5K9F_m0TjzdI00IPiMIA51o0twoX9PVW82Jcpx_8,2147
68
+ zeroquantz/runtimes/compatibility.py,sha256=TBi_HLi9JM8kYj1nV2cnCVeQPMliQU5ZubqsDduWJJs,2523
69
+ zeroquantz/runtimes/registry.py,sha256=D35XxkzwH-Jf9urahWaIu_qt2a0WqAFyaMi4gjhlx8Y,2441
70
+ zeroquantz/runtimes/transformers.py,sha256=iNSsUsxEEmRKBIgMkhda7G1pb7_CNizsQMwPDTU8fA0,1853
71
+ zeroquantz/runtimes/vllm.py,sha256=9Q433cDa8pCZ6pOcRZcnKHbHIRJxNH_IGAGvea-lAUE,2772
72
+ zeroquantz/tui/__init__.py,sha256=z2KZ3pT9-_oPQmkxCpZrqkBRDzeiCMJO7u2aTEuP8gg,417
73
+ zeroquantz/tui/app.py,sha256=ggzvOfHGvhV0i99X4od_jygouSStE8eArXMwW_jvr4g,2745
74
+ zeroquantz/tui/banner.py,sha256=MAU1_RkX3aNsL3EpPz7jEicrJHsalqvBX599IYszngo,2742
75
+ zeroquantz/tui/screens/__init__.py,sha256=b0kFd-MYHkDmLo3a3WiV5tPWlceLTLHufuWhMRmggg0,813
76
+ zeroquantz/tui/screens/confirm.py,sha256=W9RiQJIa_seeHK6XEU2fN7pfDr8rStXwJiFtDT-QPZA,1396
77
+ zeroquantz/tui/screens/execute.py,sha256=RLhnMFjOm_S5CrdcIfQxrB-jUqi_RmByZR00Wfg2tO8,8619
78
+ zeroquantz/tui/screens/model_select.py,sha256=3jh8w5ugZr2hEGwLnSCr55GAM_5C22gBUYHKZndA07c,8187
79
+ zeroquantz/tui/screens/plan.py,sha256=lWiXYdmKriltZ5F0hm86OitVjKlaZAMXaxTbuJPQRlY,7789
80
+ zeroquantz/tui/screens/quantize_select.py,sha256=v5RegyeSmZP-hHF20HUwIjxhr35Vt9iCv2G9SJGzogM,11790
81
+ zeroquantz/tui/screens/settings.py,sha256=4zjKv8gbslkOFwbZSPwzwRw3gOHQl0k4FKWUEVShCzM,8581
82
+ zeroquantz/tui/screens/token.py,sha256=-xCSiMIo6eUduEWBNE1YULNnvUkap7qGuHjaBvncNLU,3663
83
+ zeroquantz/tui/screens/welcome.py,sha256=dT6NYz9bucoKqvUZBcTELOesfdz8quxaurjWHT2ccEM,5146
84
+ zeroquantz/tui/screens/workspace.py,sha256=w8JJDr4PNcsoMBLfgNDK-7v03LcCXlLZrEKNxcVjiT0,6331
85
+ zeroquantz/tui/styles/app.tcss,sha256=3z24GlzUzdH4GeOj5OHTbiHeFTEqJcHnzyrpe_NSyPQ,5599
86
+ zeroquantz/tui/widgets/__init__.py,sha256=vaatR6N_5_Shcbx6XiE8GUIdKPhEqiL5fPfIaqHCQ8U,263
87
+ zeroquantz/tui/widgets/chip.py,sha256=SY4_1T_Hcbo-oDZ9nzsg8LO0jmtAHSPGx9iXFCHvdfw,1202
88
+ zeroquantz/tui/widgets/sidebar.py,sha256=Bg5BSSktxDyQROr6H35C2YBPfVd3Z_j9dNmTvBLLHnU,3372
89
+ zeroquantz/tui/widgets/status_bar.py,sha256=opicXgf5AOmskZ-IazLBvRnEgHVjal9QTKVND_lGXzM,1445
90
+ zeroquantz/utils/__init__.py,sha256=VXnJKjXdO0Zp8j1K9ZY58-PTqTC6DaARXGercIJDtJM,243
91
+ zeroquantz/utils/config.py,sha256=WRMjFp29uwcFW2damHYqzRP9qi8U4qg9Ss3bFloDWQo,1393
92
+ zeroquantz/utils/env.py,sha256=lN76rhnbCS93_SCF2WogRHqgMiYwutt_JotkyEGZo_E,2838
93
+ zeroquantz/utils/logging.py,sha256=DcOulkvhrQ_Gia3FVNvKAs6T9emDINgfsx2sDKryBqA,2179
94
+ zeroquantz/utils/metrics.py,sha256=x2ru59Od9coz2txep1s4uWFyUQrrgUoMCeKbL17vDpE,3013
95
+ zeroquantz/utils/paths.py,sha256=65WRVSTKoEg7fiKzbgkZwGaN2qTQWC8LdjiPsNxHmN0,1544
96
+ zeroquantz/utils/units.py,sha256=TO8LfZgwAd7O-1dQvLcoypC_Ra04HSVkRPSozcbIUzU,4474
97
+ zeroquantz/verification/__init__.py,sha256=yQZSJ0o1VImXkhwg5adUBOI3xjRwEOvyqXDNDioPngM,372
98
+ zeroquantz/verification/logits.py,sha256=kahLG2Z7IawRN3F4FwahMV7oGehj3I4Az1XcS_5_POI,1684
99
+ zeroquantz/verification/report.py,sha256=scV1_UX76YctLGFIuaCUmEi_P_9f6GsjjF-OXe6IXWQ,6935
100
+ zeroquantz/verification/weights.py,sha256=Rmj1ihP87U4cnNyjHIwiKqdjphmbNlic06rvjQzptuY,1421
101
+ zeroquantz-0.1.0.dist-info/METADATA,sha256=iNwhv04kP1T-EwYQOvXS5PgMrZHh08UOxEQI5o5w_Lg,2627
102
+ zeroquantz-0.1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
103
+ zeroquantz-0.1.0.dist-info/entry_points.txt,sha256=hQWSJTuogWPHd9s9H_zz63bJdL_UPMoSa_S9rWEvEvY,55
104
+ zeroquantz-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
105
+ zeroquantz-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ zeroquantz = zeroquantz.cli.app:main
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.