modelinfo-cli 1.4.0__tar.gz → 1.4.1__tar.gz

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 (27) hide show
  1. {modelinfo_cli-1.4.0/src/modelinfo_cli.egg-info → modelinfo_cli-1.4.1}/PKG-INFO +6 -6
  2. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/README.md +4 -4
  3. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/pyproject.toml +2 -2
  4. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/__init__.py +1 -1
  5. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/cli.py +2 -2
  6. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1/src/modelinfo_cli.egg-info}/PKG-INFO +6 -6
  7. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/tests/test_calculator.py +2 -2
  8. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/LICENSE +0 -0
  9. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/setup.cfg +0 -0
  10. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/__main__.py +0 -0
  11. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/architecture.py +0 -0
  12. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/calculator.py +0 -0
  13. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/hardware.py +0 -0
  14. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/__init__.py +0 -0
  15. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/base.py +0 -0
  16. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/gguf.py +0 -0
  17. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/huggingface.py +0 -0
  18. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/pytorch.py +0 -0
  19. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/parsers/safetensors.py +0 -0
  20. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo/ui.py +0 -0
  21. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo_cli.egg-info/SOURCES.txt +0 -0
  22. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo_cli.egg-info/dependency_links.txt +0 -0
  23. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo_cli.egg-info/entry_points.txt +0 -0
  24. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo_cli.egg-info/requires.txt +0 -0
  25. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/src/modelinfo_cli.egg-info/top_level.txt +0 -0
  26. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/tests/test_constraints.py +0 -0
  27. {modelinfo_cli-1.4.0 → modelinfo_cli-1.4.1}/tests/test_parsers.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modelinfo-cli
3
- Version: 1.4.0
4
- Summary: A sub-100ms, zero-dependency CLI to inspect ML models (.safetensors, .gguf) locally or via Hugging Face, calculate exact VRAM footprints, and determine hardware fit.
3
+ Version: 1.4.1
4
+ Summary: A CLI tool to inspect ML checkpoints (.safetensors, .gguf, .pt) and calculate inference VRAM, multi-GPU memory splits, and vLLM serving capacity.
5
5
  Author: ModelInfo Contributors
6
6
  License: MIT
7
7
  Requires-Python: >=3.10
@@ -26,14 +26,14 @@ Dynamic: license-file
26
26
 
27
27
  ModelInfo is a CLI tool that inspects machine learning model checkpoints (`.safetensors`, `.gguf`, `.pt`) and calculates hardware requirements completely offline.
28
28
 
29
- It reads binary headers directly using the Python standard library. By bypassing full tensor payload loading and strictly excluding heavy ecosystems like PyTorch or HuggingFace, the tool executes in under 100 milliseconds.
29
+ It reads binary headers directly using the Python standard library. It skips the full tensor payload entirely (no PyTorch, no HuggingFace) and parses in under 100ms.
30
30
 
31
31
  ## Features
32
32
 
33
33
  - **Zero-Dependency Parsing**: Reads `.safetensors` 8-byte JSON prefixes and `.gguf` binary key-value metadata directly via `struct` and `json` (falling back to `config.json` if needed).
34
34
  - **Remote Hugging Face Hub Inspection**: Pass a repo ID (e.g., `meta-llama/Llama-2-7b-hf`) and it uses concurrent byte-range requests to read the headers off the CDN in under 2 seconds. No need to download the checkpoint.
35
35
  - Parses `model.safetensors.index.json` to support sharded models without crashing on partial downloads.
36
- - **Dynamic VRAM & Subtractive vLLM Math**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a subtractive "Serving Capacity" engine that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
36
+ - **Dynamic VRAM & vLLM Capacity Planning**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a "Serving Capacity" simulation that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
37
37
  - **Hardware Fit Diagnostics**: Check if a model fits your cluster with `--gpu` (e.g. `--gpu RTX4090` or `--gpu auto`). It enforces Apple Silicon's 75% unified memory wire limit, and you can explicitly model multi-GPU NCCL communication penalties with `--topology` and `--strategy`.
38
38
  - **Side-by-Side Comparison**: Pass multiple models to trigger a comparison table (parameters, data types, context lengths, VRAM footprints).
39
39
  - Uses exact `ggml_type` mappings for GGUF formats to calculate byte-scaling coefficients, preventing VRAM under-reporting.
@@ -66,7 +66,7 @@ pip install -e ".[dev]"
66
66
 
67
67
  ## Testing
68
68
 
69
- The testing suite enforces cross-platform structural integrity and guards the zero-dependency latency constraint. Tests are isolated against custom binary mocks in `tests/fixtures/`.
69
+ Tests cover the binary parsers and verify the sub-100ms local parse constraint using binary mocks in `tests/fixtures/`.
70
70
 
71
71
  Run the test suite using pytest:
72
72
 
@@ -165,7 +165,7 @@ Qwen2.5-0.5B 494.0M BF16 8K 1.6 GB ✓
165
165
  | `--gpu` | `--gpu rtx4090` | Check if the model fits. Accepts GPU names (`rtx4090`, `b200`, `rx7900xtx`), explicit VRAM limits in GB (`--gpu 24`), or local hardware auto-discovery (`--gpu auto`). |
166
166
  | `--context` | `--context 32768` | Adjust the target KV cache length. Essential for calculating the dynamic memory footprint of long-context models. Defaults to `8192`. |
167
167
  | `--max-vram` | `--max-vram 80` | Adjusts the color-coded heat mapping thresholds (Green/Yellow/Red) in the terminal output to match a specific hardware ceiling. |
168
- | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a subtractive serving capacity estimation. Shows exactly how many tokens fit in the PagedAttention pool. |
168
+ | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a serving capacity simulation. Shows exactly how many tokens fit in the PagedAttention pool. |
169
169
  | `--gpu-util` | `--gpu-util 0.9` | Sets the vLLM `gpu_memory_utilization` ratio. Defaults to `0.9` (reserves 10% for PyTorch context). |
170
170
  | `--topology` | `--topology nvlink` | Set interconnect topology to calculate exact communication overhead penalties (`nvlink`, `pcie4`, `pcie3`). Defaults to `pcie4`. |
171
171
  | `--strategy` | `--strategy tp` | Selects the parallelization strategy for multi-GPU setups (`tp` for Tensor Parallelism, `pp` for Pipeline Parallelism). Defaults to `tp`. |
@@ -8,14 +8,14 @@
8
8
 
9
9
  ModelInfo is a CLI tool that inspects machine learning model checkpoints (`.safetensors`, `.gguf`, `.pt`) and calculates hardware requirements completely offline.
10
10
 
11
- It reads binary headers directly using the Python standard library. By bypassing full tensor payload loading and strictly excluding heavy ecosystems like PyTorch or HuggingFace, the tool executes in under 100 milliseconds.
11
+ It reads binary headers directly using the Python standard library. It skips the full tensor payload entirely (no PyTorch, no HuggingFace) and parses in under 100ms.
12
12
 
13
13
  ## Features
14
14
 
15
15
  - **Zero-Dependency Parsing**: Reads `.safetensors` 8-byte JSON prefixes and `.gguf` binary key-value metadata directly via `struct` and `json` (falling back to `config.json` if needed).
16
16
  - **Remote Hugging Face Hub Inspection**: Pass a repo ID (e.g., `meta-llama/Llama-2-7b-hf`) and it uses concurrent byte-range requests to read the headers off the CDN in under 2 seconds. No need to download the checkpoint.
17
17
  - Parses `model.safetensors.index.json` to support sharded models without crashing on partial downloads.
18
- - **Dynamic VRAM & Subtractive vLLM Math**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a subtractive "Serving Capacity" engine that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
18
+ - **Dynamic VRAM & vLLM Capacity Planning**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a "Serving Capacity" simulation that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
19
19
  - **Hardware Fit Diagnostics**: Check if a model fits your cluster with `--gpu` (e.g. `--gpu RTX4090` or `--gpu auto`). It enforces Apple Silicon's 75% unified memory wire limit, and you can explicitly model multi-GPU NCCL communication penalties with `--topology` and `--strategy`.
20
20
  - **Side-by-Side Comparison**: Pass multiple models to trigger a comparison table (parameters, data types, context lengths, VRAM footprints).
21
21
  - Uses exact `ggml_type` mappings for GGUF formats to calculate byte-scaling coefficients, preventing VRAM under-reporting.
@@ -48,7 +48,7 @@ pip install -e ".[dev]"
48
48
 
49
49
  ## Testing
50
50
 
51
- The testing suite enforces cross-platform structural integrity and guards the zero-dependency latency constraint. Tests are isolated against custom binary mocks in `tests/fixtures/`.
51
+ Tests cover the binary parsers and verify the sub-100ms local parse constraint using binary mocks in `tests/fixtures/`.
52
52
 
53
53
  Run the test suite using pytest:
54
54
 
@@ -147,7 +147,7 @@ Qwen2.5-0.5B 494.0M BF16 8K 1.6 GB ✓
147
147
  | `--gpu` | `--gpu rtx4090` | Check if the model fits. Accepts GPU names (`rtx4090`, `b200`, `rx7900xtx`), explicit VRAM limits in GB (`--gpu 24`), or local hardware auto-discovery (`--gpu auto`). |
148
148
  | `--context` | `--context 32768` | Adjust the target KV cache length. Essential for calculating the dynamic memory footprint of long-context models. Defaults to `8192`. |
149
149
  | `--max-vram` | `--max-vram 80` | Adjusts the color-coded heat mapping thresholds (Green/Yellow/Red) in the terminal output to match a specific hardware ceiling. |
150
- | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a subtractive serving capacity estimation. Shows exactly how many tokens fit in the PagedAttention pool. |
150
+ | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a serving capacity simulation. Shows exactly how many tokens fit in the PagedAttention pool. |
151
151
  | `--gpu-util` | `--gpu-util 0.9` | Sets the vLLM `gpu_memory_utilization` ratio. Defaults to `0.9` (reserves 10% for PyTorch context). |
152
152
  | `--topology` | `--topology nvlink` | Set interconnect topology to calculate exact communication overhead penalties (`nvlink`, `pcie4`, `pcie3`). Defaults to `pcie4`. |
153
153
  | `--strategy` | `--strategy tp` | Selects the parallelization strategy for multi-GPU setups (`tp` for Tensor Parallelism, `pp` for Pipeline Parallelism). Defaults to `tp`. |
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "modelinfo-cli"
7
- version = "1.4.0"
8
- description = "A sub-100ms, zero-dependency CLI to inspect ML models (.safetensors, .gguf) locally or via Hugging Face, calculate exact VRAM footprints, and determine hardware fit."
7
+ version = "1.4.1"
8
+ description = "A CLI tool to inspect ML checkpoints (.safetensors, .gguf, .pt) and calculate inference VRAM, multi-GPU memory splits, and vLLM serving capacity."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "MIT" }
@@ -2,4 +2,4 @@
2
2
  modelinfo - A high-performance CLI utility for inspecting ML model checkpoints.
3
3
  """
4
4
 
5
- __version__ = "1.4.0"
5
+ __version__ = "1.4.1"
@@ -64,7 +64,7 @@ def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace:
64
64
  parser.add_argument(
65
65
  "--vllm",
66
66
  action="store_true",
67
- help="Enable Subtractive Math Engine: Calculate max context tokens using vLLM PagedAttention allocation.",
67
+ help="Enable vLLM Capacity Simulation: Calculate max context tokens using PagedAttention allocation.",
68
68
  )
69
69
  parser.add_argument(
70
70
  "--gpu-util",
@@ -185,7 +185,7 @@ def main(argv: Sequence[str] | None = None) -> int:
185
185
 
186
186
  if len(args.file) > 1:
187
187
  if args.vllm:
188
- console.print("[red]Error: Side-by-side comparison does not currently support the subtractive --vllm engine. Compare models sequentially or remove --vllm.[/red]")
188
+ console.print("[red]Error: Side-by-side comparison does not currently support the --vllm capacity simulation. Compare models sequentially or remove --vllm.[/red]")
189
189
  return 1
190
190
 
191
191
  models = []
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modelinfo-cli
3
- Version: 1.4.0
4
- Summary: A sub-100ms, zero-dependency CLI to inspect ML models (.safetensors, .gguf) locally or via Hugging Face, calculate exact VRAM footprints, and determine hardware fit.
3
+ Version: 1.4.1
4
+ Summary: A CLI tool to inspect ML checkpoints (.safetensors, .gguf, .pt) and calculate inference VRAM, multi-GPU memory splits, and vLLM serving capacity.
5
5
  Author: ModelInfo Contributors
6
6
  License: MIT
7
7
  Requires-Python: >=3.10
@@ -26,14 +26,14 @@ Dynamic: license-file
26
26
 
27
27
  ModelInfo is a CLI tool that inspects machine learning model checkpoints (`.safetensors`, `.gguf`, `.pt`) and calculates hardware requirements completely offline.
28
28
 
29
- It reads binary headers directly using the Python standard library. By bypassing full tensor payload loading and strictly excluding heavy ecosystems like PyTorch or HuggingFace, the tool executes in under 100 milliseconds.
29
+ It reads binary headers directly using the Python standard library. It skips the full tensor payload entirely (no PyTorch, no HuggingFace) and parses in under 100ms.
30
30
 
31
31
  ## Features
32
32
 
33
33
  - **Zero-Dependency Parsing**: Reads `.safetensors` 8-byte JSON prefixes and `.gguf` binary key-value metadata directly via `struct` and `json` (falling back to `config.json` if needed).
34
34
  - **Remote Hugging Face Hub Inspection**: Pass a repo ID (e.g., `meta-llama/Llama-2-7b-hf`) and it uses concurrent byte-range requests to read the headers off the CDN in under 2 seconds. No need to download the checkpoint.
35
35
  - Parses `model.safetensors.index.json` to support sharded models without crashing on partial downloads.
36
- - **Dynamic VRAM & Subtractive vLLM Math**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a subtractive "Serving Capacity" engine that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
36
+ - **Dynamic VRAM & vLLM Capacity Planning**: Calculates exact VRAM limits based on the model's architecture and your target context length. If you use the `--vllm` flag, it switches to a "Serving Capacity" simulation that calculates exactly how many tokens fit in the PagedAttention pool based on your `--gpu-util` ratio.
37
37
  - **Hardware Fit Diagnostics**: Check if a model fits your cluster with `--gpu` (e.g. `--gpu RTX4090` or `--gpu auto`). It enforces Apple Silicon's 75% unified memory wire limit, and you can explicitly model multi-GPU NCCL communication penalties with `--topology` and `--strategy`.
38
38
  - **Side-by-Side Comparison**: Pass multiple models to trigger a comparison table (parameters, data types, context lengths, VRAM footprints).
39
39
  - Uses exact `ggml_type` mappings for GGUF formats to calculate byte-scaling coefficients, preventing VRAM under-reporting.
@@ -66,7 +66,7 @@ pip install -e ".[dev]"
66
66
 
67
67
  ## Testing
68
68
 
69
- The testing suite enforces cross-platform structural integrity and guards the zero-dependency latency constraint. Tests are isolated against custom binary mocks in `tests/fixtures/`.
69
+ Tests cover the binary parsers and verify the sub-100ms local parse constraint using binary mocks in `tests/fixtures/`.
70
70
 
71
71
  Run the test suite using pytest:
72
72
 
@@ -165,7 +165,7 @@ Qwen2.5-0.5B 494.0M BF16 8K 1.6 GB ✓
165
165
  | `--gpu` | `--gpu rtx4090` | Check if the model fits. Accepts GPU names (`rtx4090`, `b200`, `rx7900xtx`), explicit VRAM limits in GB (`--gpu 24`), or local hardware auto-discovery (`--gpu auto`). |
166
166
  | `--context` | `--context 32768` | Adjust the target KV cache length. Essential for calculating the dynamic memory footprint of long-context models. Defaults to `8192`. |
167
167
  | `--max-vram` | `--max-vram 80` | Adjusts the color-coded heat mapping thresholds (Green/Yellow/Red) in the terminal output to match a specific hardware ceiling. |
168
- | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a subtractive serving capacity estimation. Shows exactly how many tokens fit in the PagedAttention pool. |
168
+ | `--vllm` | `--vllm --gpu auto` | Switches from additive memory checking to a serving capacity simulation. Shows exactly how many tokens fit in the PagedAttention pool. |
169
169
  | `--gpu-util` | `--gpu-util 0.9` | Sets the vLLM `gpu_memory_utilization` ratio. Defaults to `0.9` (reserves 10% for PyTorch context). |
170
170
  | `--topology` | `--topology nvlink` | Set interconnect topology to calculate exact communication overhead penalties (`nvlink`, `pcie4`, `pcie3`). Defaults to `pcie4`. |
171
171
  | `--strategy` | `--strategy tp` | Selects the parallelization strategy for multi-GPU setups (`tp` for Tensor Parallelism, `pp` for Pipeline Parallelism). Defaults to `tp`. |
@@ -143,8 +143,8 @@ def test_strategy_pp():
143
143
  assert fp_pp["penalty_percentage"] == 0.0
144
144
  assert fp_pp["overhead_bytes"] == (4 * 600 * 1024 * 1024)
145
145
 
146
- def test_vllm_subtractive_math():
147
- """Verify the subtractive vLLM serving capacity engine calculates exact tokens."""
146
+ def test_vllm_capacity_simulation():
147
+ """Verify the vLLM serving capacity engine calculates exact tokens."""
148
148
  tensors = {
149
149
  "model.layers.0.attn.weight": {"shape": [1024, 1024], "dtype": "F16"} # Base: 2MB
150
150
  }
File without changes
File without changes