amagi-inference-calc 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.
- amagi_inference_calc-0.1.0/LICENSE +22 -0
- amagi_inference_calc-0.1.0/PKG-INFO +150 -0
- amagi_inference_calc-0.1.0/README.md +130 -0
- amagi_inference_calc-0.1.0/pyproject.toml +40 -0
- amagi_inference_calc-0.1.0/setup.cfg +4 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/__init__.py +3 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/cli.py +431 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/__init__.py +22 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/calibration.json +18 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/gpus.json +307 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/measurements.json +302 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/models.json +485 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/data/office_presets.json +17 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/gguf.py +351 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/memtest.py +65 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/models.py +285 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/price.py +38 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/quant.py +75 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/speed.py +411 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc/upstream.py +100 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/PKG-INFO +150 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/SOURCES.txt +32 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/dependency_links.txt +1 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/entry_points.txt +2 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/requires.txt +3 -0
- amagi_inference_calc-0.1.0/src/amagi_inference_calc.egg-info/top_level.txt +1 -0
- amagi_inference_calc-0.1.0/tests/test_cli.py +130 -0
- amagi_inference_calc-0.1.0/tests/test_gguf.py +62 -0
- amagi_inference_calc-0.1.0/tests/test_memtest_price.py +36 -0
- amagi_inference_calc-0.1.0/tests/test_models.py +109 -0
- amagi_inference_calc-0.1.0/tests/test_quant.py +29 -0
- amagi_inference_calc-0.1.0/tests/test_speed.py +137 -0
- amagi_inference_calc-0.1.0/tests/test_upstream_parity.py +70 -0
- amagi_inference_calc-0.1.0/tests/test_web_speed_parity.py +99 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alex Ziskind
|
|
4
|
+
Copyright (c) 2026 Amagisolutionsgroup, Inc. (AmagiLabs)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amagi-inference-calc
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: How much GPU does a local LLM need, and how fast will it run? VRAM, tokens/second and used-GPU cost per token/second for small-office setups, from a bandwidth model calibrated on real runs.
|
|
5
|
+
Author-email: "AmagiLabs (Amagisolutionsgroup, Inc.)" <dev@amagisolutionsgroup.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/amagilabs/amagi-inference-calc
|
|
8
|
+
Keywords: llm,gpu,vram,calculator,tokens-per-second,llama.cpp,gguf,localllama,cli
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
|
+
Classifier: Topic :: System :: Hardware
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# amagi-inference-calc
|
|
22
|
+
|
|
23
|
+
Find out which GPU a small office needs to run a local LLM, how fast it will answer each person, and what that speed costs on the used market. It works out memory from the model's real layout and speed from memory bandwidth, using constants fitted on real llama.cpp runs. It comes as a command line tool and a web page.
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pipx install amagi-inference-calc
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Python 3.9 or newer. No dependencies.
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### One model, one card, a few people
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
$ amagi-inference-calc estimate qwen3-14b --gpu rtx-3090 --users 2 --context 8192 --prompt 2000
|
|
41
|
+
Qwen3 14B (Q4_K_M) on GeForce RTX 3090 24GB
|
|
42
|
+
load 2 user(s) at once, 8,192-token context each
|
|
43
|
+
memory 11.4 GiB needed of 24.0 GiB -> fits
|
|
44
|
+
weights 8.4 + KV cache 2.5 + runtime 0.5
|
|
45
|
+
speed 77.0 tok/s for one user; 72.3 tok/s each with 2 at once (145 total)
|
|
46
|
+
prompt 2,354 tok/s reading; first token after 0.8 s (2,000-token prompt), 1.7 s if all 2 send at once
|
|
47
|
+
bandwidth 758 GB/s effective (calibrated on this GPU)
|
|
48
|
+
price $1,399 (used, 2026-10-25) -> $9.67 per tok/s
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`--users` is how many people send a request at the same moment, not your head count. Each one gets their own KV cache, so memory grows with it and speed per person drops a little.
|
|
52
|
+
|
|
53
|
+
### The cheapest setup for an office
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
$ amagi-inference-calc office team-10 --model qwen3-14b
|
|
57
|
+
10-person office: 3 user(s) at once, 16,384-token context, ~3,000-token prompts
|
|
58
|
+
Cheapest setups giving each user at least 15 tok/s (used prices, 2026-10-25):
|
|
59
|
+
|
|
60
|
+
model setup memory tok/s each total price $ per tok/s
|
|
61
|
+
qwen3-14b tesla-p40 * 16.4/24 GiB 26.5 80 $345 $4.34
|
|
62
|
+
qwen3-14b 2x rtx-3060-12gb 16.9/24 GiB 27.4 82 $660 $8.02
|
|
63
|
+
qwen3-14b 2x rtx-3080 16.9/20 GiB 54.4 163 $778 $4.77
|
|
64
|
+
|
|
65
|
+
Speeds are estimates from a model calibrated on one RTX 3090 (see `calibrate`).
|
|
66
|
+
* this card has a caveat: run `estimate` on it to read the note.
|
|
67
|
+
NVIDIA only; add --all-vendors to include AMD, Intel and Apple.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The presets are `solo`, `team-5`, `team-10`, `team-25`, `doc-review` (long documents, 32K context) and `coding`. Leave out `--model` to compare a set of common models from 8B to 70B. The `*` on the P40 is there because it is a 2016 datacenter card: no tensor cores, slow prompt reading, and it needs its own cooling.
|
|
71
|
+
|
|
72
|
+
### How far off is it?
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
$ amagi-inference-calc calibrate --role backtest
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
That prints every held-out run next to what the model predicted. On the calibration card, single-user speed came within about 8% on models the fit never saw, and multi-user speed for MoE models within about 10%. Prompt reading for MoE models is rougher (errors from -28% to +64%), so treat first-token times for those as a ballpark. Every other card is scaled from the 3090 by bandwidth, so expect wider errors on those. The full table and every formula are in [docs/CALCULATIONS.md](docs/CALCULATIONS.md).
|
|
79
|
+
|
|
80
|
+
### Use your own card's numbers
|
|
81
|
+
|
|
82
|
+
If you have a benchmark from [amagi-tokbench](https://github.com/amagilabs/amagi-tokbench), fit your card's decode bandwidth from it:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
$ amagi-inference-calc calibrate --tokbench examples/tokbench-rtx3090-qwen2.5-7b.json
|
|
86
|
+
3 single-user run(s) of qwen2.5-7b (Q4_K_M): effective decode bandwidth 764 GB/s
|
|
87
|
+
use it with: amagi-inference-calc estimate MODEL --gpu YOUR-GPU --decode-bw 764
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or read a [memtest_vulkan](https://github.com/GpuZelenograd/memtest_vulkan) log for the card's raw memory bandwidth:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
$ amagi-inference-calc bandwidth examples/memtest_vulkan_rtx3090.log
|
|
94
|
+
NVIDIA GeForce RTX 3090 (24 GB): 739.3 GB/s median over 29 passes (range 738-742.4)
|
|
95
|
+
use it with: amagi-inference-calc estimate MODEL --gpu YOUR-GPU --bw 739.3
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Both files in `examples/` are from real runs on an RTX 3090.
|
|
99
|
+
|
|
100
|
+
### More commands
|
|
101
|
+
|
|
102
|
+
- `gpus` lists every card with VRAM, spec and decode bandwidth, and used price.
|
|
103
|
+
- `models` lists the built-in models. `estimate` also takes a `.gguf` file or a Hugging Face `config.json`.
|
|
104
|
+
- `gguf FILE` reads a GGUF header: parameters, quant, layers and KV bytes per token.
|
|
105
|
+
- `vram` is the original calculator's rule of thumb, ported unchanged.
|
|
106
|
+
- `--price rtx-3090=1100` or `--prices FILE.csv` replaces the bundled used prices. They are lowest asking prices from 2026-10-25 and they go stale fast.
|
|
107
|
+
- `--json` on any command prints machine-readable output.
|
|
108
|
+
|
|
109
|
+
## The web page
|
|
110
|
+
|
|
111
|
+
The same model runs in the browser, with office presets, a cheapest-setups table and the original memory calculator on its own tab. It makes no network requests.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
cd web
|
|
115
|
+
npm ci
|
|
116
|
+
npm run dev # or: npm run build, then serve web/dist
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Try it at [amagilabs.github.io/amagi-inference-calc](https://amagilabs.github.io/amagi-inference-calc/). `.github/workflows/pages.yml` rebuilds that page on every push to `main`.
|
|
120
|
+
|
|
121
|
+
## Use it from Claude Code
|
|
122
|
+
|
|
123
|
+
This repo ships a skill at `.claude/skills/amagi-inference-calc/SKILL.md`. Copy that folder into your own `.claude/skills/` and Claude Code can size a box for a team, compare used cards, and explain the numbers.
|
|
124
|
+
|
|
125
|
+
## Limits
|
|
126
|
+
|
|
127
|
+
- One calibration card (RTX 3090) and one runtime (llama.cpp CUDA). vLLM, ExLlama, MLX and ROCm will land somewhere else.
|
|
128
|
+
- More than 8 people at once is past the measured range.
|
|
129
|
+
- Multi-card setups assume llama.cpp's default layer split, where memory adds up and speed does not. Tensor parallel is not modelled.
|
|
130
|
+
- Prompt speed is only estimated on the 3090. Pass `--tflops` if you know your card's effective rate.
|
|
131
|
+
- "Fits" means the estimate is at or under the card's VRAM. A setup showing 12.0/12 GiB has no headroom for a desktop or a second app on the same card.
|
|
132
|
+
|
|
133
|
+
## Credit
|
|
134
|
+
|
|
135
|
+
Based on [llm-inference-calculator](https://github.com/alexziskind1/llm-inference-calculator) by Alex Ziskind (MIT). The memory-only tab and the `vram` command are his formulas, and a test checks the Python port against his TypeScript on 1,152 cases. This fork adds the speed model, used-GPU prices, office presets and the calculation docs, and fixes the tooltip clipping reported upstream. The original README is kept at [web/UPSTREAM_README.md](web/UPSTREAM_README.md).
|
|
136
|
+
|
|
137
|
+
## If this saved you time
|
|
138
|
+
|
|
139
|
+
A star helps other people find it.
|
|
140
|
+
|
|
141
|
+
## More from AmagiLabs
|
|
142
|
+
|
|
143
|
+
- [amagilabs](https://github.com/amagilabs): other small open source tools from the same lab.
|
|
144
|
+
- [amagi-tokbench](https://github.com/amagilabs/amagi-tokbench): measure how fast your local LLM runs, with a shareable results card.
|
|
145
|
+
- [amagi-throughput-lab](https://github.com/amagilabs/amagi-throughput-lab): find the llama-server settings that serve the most people from one GPU.
|
|
146
|
+
- [amagi-model-shelf](https://github.com/amagilabs/amagi-model-shelf): find model files downloaded twice by different tools and get the disk space back.
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT, see [LICENSE](LICENSE). Copyright (c) 2025 Alex Ziskind. Copyright (c) 2026 Amagisolutionsgroup, Inc. (AmagiLabs).
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# amagi-inference-calc
|
|
2
|
+
|
|
3
|
+
Find out which GPU a small office needs to run a local LLM, how fast it will answer each person, and what that speed costs on the used market. It works out memory from the model's real layout and speed from memory bandwidth, using constants fitted on real llama.cpp runs. It comes as a command line tool and a web page.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pipx install amagi-inference-calc
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Python 3.9 or newer. No dependencies.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### One model, one card, a few people
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
$ amagi-inference-calc estimate qwen3-14b --gpu rtx-3090 --users 2 --context 8192 --prompt 2000
|
|
21
|
+
Qwen3 14B (Q4_K_M) on GeForce RTX 3090 24GB
|
|
22
|
+
load 2 user(s) at once, 8,192-token context each
|
|
23
|
+
memory 11.4 GiB needed of 24.0 GiB -> fits
|
|
24
|
+
weights 8.4 + KV cache 2.5 + runtime 0.5
|
|
25
|
+
speed 77.0 tok/s for one user; 72.3 tok/s each with 2 at once (145 total)
|
|
26
|
+
prompt 2,354 tok/s reading; first token after 0.8 s (2,000-token prompt), 1.7 s if all 2 send at once
|
|
27
|
+
bandwidth 758 GB/s effective (calibrated on this GPU)
|
|
28
|
+
price $1,399 (used, 2026-10-25) -> $9.67 per tok/s
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`--users` is how many people send a request at the same moment, not your head count. Each one gets their own KV cache, so memory grows with it and speed per person drops a little.
|
|
32
|
+
|
|
33
|
+
### The cheapest setup for an office
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
$ amagi-inference-calc office team-10 --model qwen3-14b
|
|
37
|
+
10-person office: 3 user(s) at once, 16,384-token context, ~3,000-token prompts
|
|
38
|
+
Cheapest setups giving each user at least 15 tok/s (used prices, 2026-10-25):
|
|
39
|
+
|
|
40
|
+
model setup memory tok/s each total price $ per tok/s
|
|
41
|
+
qwen3-14b tesla-p40 * 16.4/24 GiB 26.5 80 $345 $4.34
|
|
42
|
+
qwen3-14b 2x rtx-3060-12gb 16.9/24 GiB 27.4 82 $660 $8.02
|
|
43
|
+
qwen3-14b 2x rtx-3080 16.9/20 GiB 54.4 163 $778 $4.77
|
|
44
|
+
|
|
45
|
+
Speeds are estimates from a model calibrated on one RTX 3090 (see `calibrate`).
|
|
46
|
+
* this card has a caveat: run `estimate` on it to read the note.
|
|
47
|
+
NVIDIA only; add --all-vendors to include AMD, Intel and Apple.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The presets are `solo`, `team-5`, `team-10`, `team-25`, `doc-review` (long documents, 32K context) and `coding`. Leave out `--model` to compare a set of common models from 8B to 70B. The `*` on the P40 is there because it is a 2016 datacenter card: no tensor cores, slow prompt reading, and it needs its own cooling.
|
|
51
|
+
|
|
52
|
+
### How far off is it?
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
$ amagi-inference-calc calibrate --role backtest
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
That prints every held-out run next to what the model predicted. On the calibration card, single-user speed came within about 8% on models the fit never saw, and multi-user speed for MoE models within about 10%. Prompt reading for MoE models is rougher (errors from -28% to +64%), so treat first-token times for those as a ballpark. Every other card is scaled from the 3090 by bandwidth, so expect wider errors on those. The full table and every formula are in [docs/CALCULATIONS.md](docs/CALCULATIONS.md).
|
|
59
|
+
|
|
60
|
+
### Use your own card's numbers
|
|
61
|
+
|
|
62
|
+
If you have a benchmark from [amagi-tokbench](https://github.com/amagilabs/amagi-tokbench), fit your card's decode bandwidth from it:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
$ amagi-inference-calc calibrate --tokbench examples/tokbench-rtx3090-qwen2.5-7b.json
|
|
66
|
+
3 single-user run(s) of qwen2.5-7b (Q4_K_M): effective decode bandwidth 764 GB/s
|
|
67
|
+
use it with: amagi-inference-calc estimate MODEL --gpu YOUR-GPU --decode-bw 764
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or read a [memtest_vulkan](https://github.com/GpuZelenograd/memtest_vulkan) log for the card's raw memory bandwidth:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
$ amagi-inference-calc bandwidth examples/memtest_vulkan_rtx3090.log
|
|
74
|
+
NVIDIA GeForce RTX 3090 (24 GB): 739.3 GB/s median over 29 passes (range 738-742.4)
|
|
75
|
+
use it with: amagi-inference-calc estimate MODEL --gpu YOUR-GPU --bw 739.3
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Both files in `examples/` are from real runs on an RTX 3090.
|
|
79
|
+
|
|
80
|
+
### More commands
|
|
81
|
+
|
|
82
|
+
- `gpus` lists every card with VRAM, spec and decode bandwidth, and used price.
|
|
83
|
+
- `models` lists the built-in models. `estimate` also takes a `.gguf` file or a Hugging Face `config.json`.
|
|
84
|
+
- `gguf FILE` reads a GGUF header: parameters, quant, layers and KV bytes per token.
|
|
85
|
+
- `vram` is the original calculator's rule of thumb, ported unchanged.
|
|
86
|
+
- `--price rtx-3090=1100` or `--prices FILE.csv` replaces the bundled used prices. They are lowest asking prices from 2026-10-25 and they go stale fast.
|
|
87
|
+
- `--json` on any command prints machine-readable output.
|
|
88
|
+
|
|
89
|
+
## The web page
|
|
90
|
+
|
|
91
|
+
The same model runs in the browser, with office presets, a cheapest-setups table and the original memory calculator on its own tab. It makes no network requests.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
cd web
|
|
95
|
+
npm ci
|
|
96
|
+
npm run dev # or: npm run build, then serve web/dist
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Try it at [amagilabs.github.io/amagi-inference-calc](https://amagilabs.github.io/amagi-inference-calc/). `.github/workflows/pages.yml` rebuilds that page on every push to `main`.
|
|
100
|
+
|
|
101
|
+
## Use it from Claude Code
|
|
102
|
+
|
|
103
|
+
This repo ships a skill at `.claude/skills/amagi-inference-calc/SKILL.md`. Copy that folder into your own `.claude/skills/` and Claude Code can size a box for a team, compare used cards, and explain the numbers.
|
|
104
|
+
|
|
105
|
+
## Limits
|
|
106
|
+
|
|
107
|
+
- One calibration card (RTX 3090) and one runtime (llama.cpp CUDA). vLLM, ExLlama, MLX and ROCm will land somewhere else.
|
|
108
|
+
- More than 8 people at once is past the measured range.
|
|
109
|
+
- Multi-card setups assume llama.cpp's default layer split, where memory adds up and speed does not. Tensor parallel is not modelled.
|
|
110
|
+
- Prompt speed is only estimated on the 3090. Pass `--tflops` if you know your card's effective rate.
|
|
111
|
+
- "Fits" means the estimate is at or under the card's VRAM. A setup showing 12.0/12 GiB has no headroom for a desktop or a second app on the same card.
|
|
112
|
+
|
|
113
|
+
## Credit
|
|
114
|
+
|
|
115
|
+
Based on [llm-inference-calculator](https://github.com/alexziskind1/llm-inference-calculator) by Alex Ziskind (MIT). The memory-only tab and the `vram` command are his formulas, and a test checks the Python port against his TypeScript on 1,152 cases. This fork adds the speed model, used-GPU prices, office presets and the calculation docs, and fixes the tooltip clipping reported upstream. The original README is kept at [web/UPSTREAM_README.md](web/UPSTREAM_README.md).
|
|
116
|
+
|
|
117
|
+
## If this saved you time
|
|
118
|
+
|
|
119
|
+
A star helps other people find it.
|
|
120
|
+
|
|
121
|
+
## More from AmagiLabs
|
|
122
|
+
|
|
123
|
+
- [amagilabs](https://github.com/amagilabs): other small open source tools from the same lab.
|
|
124
|
+
- [amagi-tokbench](https://github.com/amagilabs/amagi-tokbench): measure how fast your local LLM runs, with a shareable results card.
|
|
125
|
+
- [amagi-throughput-lab](https://github.com/amagilabs/amagi-throughput-lab): find the llama-server settings that serve the most people from one GPU.
|
|
126
|
+
- [amagi-model-shelf](https://github.com/amagilabs/amagi-model-shelf): find model files downloaded twice by different tools and get the disk space back.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT, see [LICENSE](LICENSE). Copyright (c) 2025 Alex Ziskind. Copyright (c) 2026 Amagisolutionsgroup, Inc. (AmagiLabs).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "amagi-inference-calc"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "How much GPU does a local LLM need, and how fast will it run? VRAM, tokens/second and used-GPU cost per token/second for small-office setups, from a bandwidth model calibrated on real runs."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
authors = [{ name = "AmagiLabs (Amagisolutionsgroup, Inc.)", email = "dev@amagisolutionsgroup.com" }]
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
dependencies = []
|
|
15
|
+
keywords = ["llm", "gpu", "vram", "calculator", "tokens-per-second", "llama.cpp", "gguf", "localllama", "cli"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Environment :: Console",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
21
|
+
"Topic :: System :: Hardware",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/amagilabs/amagi-inference-calc"
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
amagi-inference-calc = "amagi_inference_calc.cli:main"
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = ["pytest>=7.0"]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.packages.find]
|
|
34
|
+
where = ["src"]
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.package-data]
|
|
37
|
+
amagi_inference_calc = ["data/*.json"]
|
|
38
|
+
|
|
39
|
+
[tool.pytest.ini_options]
|
|
40
|
+
testpaths = ["tests"]
|