ai-model-explorer 0.1.0__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.
@@ -0,0 +1,8 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ corpus.jsonl
5
+ .DS_Store
6
+ dist/
7
+ build/
8
+ *.egg-info/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sattaya Singkul (https://joessattes.github.io/Sattaya-AI-Website/)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: ai-model-explorer
3
+ Version: 0.1.0
4
+ Summary: See any Hugging Face model's architecture from its safetensors header, without downloading weights.
5
+ Project-URL: Homepage, https://joessattes.github.io/ai-model-explorer/en/
6
+ Project-URL: Source, https://github.com/JoesSattes/ai-model-explorer
7
+ Project-URL: Paper, https://www.researchgate.net/publication/417293353_Reading_the_Architecture_off_the_Weights_Manifest-Only_Recovery_of_Neural_Network_Anatomy
8
+ Author-email: Sattaya Singkul <joeysattaya@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: edge ai,huggingface,llm,mixture of experts,model architecture,quantization,safetensors,transformers,visualization
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Scientific/Engineering :: Visualization
19
+ Requires-Python: >=3.9
20
+ Requires-Dist: quickjs>=1.19
21
+ Description-Content-Type: text/markdown
22
+
23
+ # AI Model Explorer
24
+
25
+ See any Hugging Face model's architecture from its safetensors header, without downloading the weights.
26
+
27
+ ```bash
28
+ pip install ai-model-explorer
29
+ ```
30
+
31
+ ## Command line
32
+
33
+ ```bash
34
+ ai-model-explorer inspect Qwen/Qwen3-8B
35
+ ```
36
+ ```
37
+ Qwen/Qwen3-8B
38
+ family decoder · 8.19B parameters · 16.4 GB of weights
39
+ read 46.1 KB from 5 file(s), 399 tensors
40
+ width 4096 · layers 36 · heads 32 · kv heads 8 · head dim 128 · ffn 12288 · vocab 151936
41
+ components:
42
+ (root) (backbone) · d=4096
43
+ model.layers: 36 blocks · Transformer
44
+ config.json: agrees with the weights
45
+ ```
46
+
47
+ - `ai-model-explorer inspect REPO --json` prints the full result: components, layer stacks, block types, edges between components, hyperparameters, quantization and the config check. Add `--tensors` to get the role of every tensor.
48
+ - `ai-model-explorer inspect ./model.safetensors` or a folder works offline.
49
+ - `ai-model-explorer open [REPO]` starts the web app on your machine and opens it in the browser (`--lang th` for Thai).
50
+ - Gated or private repos: set `HF_TOKEN` or pass `--token`. A mirror can be set with `HF_ENDPOINT`.
51
+
52
+ ## Python
53
+
54
+ ```python
55
+ from ai_model_explorer import inspect, summary
56
+
57
+ a = inspect("deepseek-ai/DeepSeek-V3")
58
+ print(a["totals"]["params"], a["hyperparameters"]["experts"]) # 684489845504 256
59
+ print(summary(a))
60
+ ```
61
+
62
+ Only the header bytes of each weight file are requested (a median of 79 KB per repo in our benchmark of 191 popular checkpoints), plus `config.json`. The analysis is the same JavaScript code that runs the website, executed in an embedded QuickJS engine, so results match the web app exactly. No Node.js, PyTorch or transformers needed. Typical models take well under a second; the very largest manifests (DeepSeek-V3, 92k tensors) take about ten seconds.
63
+
64
+ ## How accurate is it?
65
+ On 510 architectures from the transformers library, 96.8% of tensors get the right role (95.0% with every name replaced by a random token), and parameter totals are exact for all 510, including FP8, NVFP4 and GPTQ storage. Details are in the paper.
66
+
67
+ ## Links
68
+ - Web app: https://joessattes.github.io/ai-model-explorer/en/
69
+ - Source: https://github.com/JoesSattes/ai-model-explorer
70
+ - Paper: Sattaya Singkul, *Reading the Architecture off the Weights: Manifest-Only Recovery of Neural Network Anatomy*, 2026. https://www.researchgate.net/publication/417293353_Reading_the_Architecture_off_the_Weights_Manifest-Only_Recovery_of_Neural_Network_Anatomy
71
+
72
+ MIT License © 2026 Sattaya Singkul