inferlint 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.
Files changed (70) hide show
  1. inferlint-0.1.0/.gitattributes +3 -0
  2. inferlint-0.1.0/.github/workflows/ci.yml +22 -0
  3. inferlint-0.1.0/.gitignore +13 -0
  4. inferlint-0.1.0/LICENSE +202 -0
  5. inferlint-0.1.0/NOTICE +4 -0
  6. inferlint-0.1.0/PKG-INFO +312 -0
  7. inferlint-0.1.0/README.md +283 -0
  8. inferlint-0.1.0/docs/example-report.html +257 -0
  9. inferlint-0.1.0/docs/orchestration.md +59 -0
  10. inferlint-0.1.0/docs/report-dark.png +0 -0
  11. inferlint-0.1.0/docs/report.png +0 -0
  12. inferlint-0.1.0/docs/tripwires.md +224 -0
  13. inferlint-0.1.0/pyproject.toml +69 -0
  14. inferlint-0.1.0/src/inferlint/__init__.py +7 -0
  15. inferlint-0.1.0/src/inferlint/assets/report.css +181 -0
  16. inferlint-0.1.0/src/inferlint/assets/report.js +75 -0
  17. inferlint-0.1.0/src/inferlint/blocks.py +83 -0
  18. inferlint-0.1.0/src/inferlint/bootlog.py +278 -0
  19. inferlint-0.1.0/src/inferlint/catalog.py +156 -0
  20. inferlint-0.1.0/src/inferlint/checks.py +430 -0
  21. inferlint-0.1.0/src/inferlint/cli.py +406 -0
  22. inferlint-0.1.0/src/inferlint/failures.py +117 -0
  23. inferlint-0.1.0/src/inferlint/gpu.py +128 -0
  24. inferlint-0.1.0/src/inferlint/probe.py +110 -0
  25. inferlint-0.1.0/src/inferlint/prom.py +138 -0
  26. inferlint-0.1.0/src/inferlint/py.typed +0 -0
  27. inferlint-0.1.0/src/inferlint/report.py +1128 -0
  28. inferlint-0.1.0/src/inferlint/result.py +53 -0
  29. inferlint-0.1.0/src/inferlint/series.py +166 -0
  30. inferlint-0.1.0/src/inferlint/svgchart.py +329 -0
  31. inferlint-0.1.0/src/inferlint/teardown.py +254 -0
  32. inferlint-0.1.0/src/inferlint/telemetry.py +193 -0
  33. inferlint-0.1.0/tests/conftest.py +16 -0
  34. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_cudagraphs.log +155 -0
  35. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_eager.log +223 -0
  36. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_fail_accelerator.log +188 -0
  37. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_fp8_triton.log +189 -0
  38. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_pool_level_hi.log +139 -0
  39. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_pool_level_lo.log +128 -0
  40. inferlint-0.1.0/tests/fixtures/vllm-0.28/boot_spec_backend_override.log +557 -0
  41. inferlint-0.1.0/tests/fixtures/vllm-0.28/live/after.snapshot.json +8 -0
  42. inferlint-0.1.0/tests/fixtures/vllm-0.28/live/before.snapshot.json +8 -0
  43. inferlint-0.1.0/tests/fixtures/vllm-0.28/live/boot.log +134 -0
  44. inferlint-0.1.0/tests/fixtures/vllm-0.28/live/raw_metrics.prom +602 -0
  45. inferlint-0.1.0/tests/fixtures/vllm-0.28/live/run.series.jsonl +366 -0
  46. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/preempted_after.prom +367 -0
  47. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/preempted_after.snapshot.json +8 -0
  48. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/preempted_before.prom +367 -0
  49. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/preempted_before.snapshot.json +8 -0
  50. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/restart_after.prom +369 -0
  51. inferlint-0.1.0/tests/fixtures/vllm-0.28/metrics/restart_before.prom +367 -0
  52. inferlint-0.1.0/tests/fixtures/vllm-0.28/run_preempted_silently.log +159 -0
  53. inferlint-0.1.0/tests/fixtures/vllm-0.28/series/blocks.series.jsonl +85 -0
  54. inferlint-0.1.0/tests/fixtures/vllm-0.28/series/blocks_snapshot.prom +362 -0
  55. inferlint-0.1.0/tests/fixtures/vllm-0.28/series/ladder.series.jsonl +1338 -0
  56. inferlint-0.1.0/tests/fixtures/vllm-0.28/series/ladder_snapshot.prom +367 -0
  57. inferlint-0.1.0/tests/test_blocks.py +62 -0
  58. inferlint-0.1.0/tests/test_bootlog.py +120 -0
  59. inferlint-0.1.0/tests/test_checks.py +182 -0
  60. inferlint-0.1.0/tests/test_cli.py +81 -0
  61. inferlint-0.1.0/tests/test_failures.py +86 -0
  62. inferlint-0.1.0/tests/test_gpu.py +141 -0
  63. inferlint-0.1.0/tests/test_live.py +81 -0
  64. inferlint-0.1.0/tests/test_mutations.py +223 -0
  65. inferlint-0.1.0/tests/test_probe.py +109 -0
  66. inferlint-0.1.0/tests/test_prom.py +73 -0
  67. inferlint-0.1.0/tests/test_report.py +277 -0
  68. inferlint-0.1.0/tests/test_svgchart.py +144 -0
  69. inferlint-0.1.0/tests/test_teardown.py +165 -0
  70. inferlint-0.1.0/tests/test_telemetry.py +86 -0
@@ -0,0 +1,3 @@
1
+ # Store text with LF line endings so fixtures and scripts are identical on every OS.
2
+ * text=auto eol=lf
3
+ *.png binary
@@ -0,0 +1,22 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python: ["3.10", "3.11", "3.12"]
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: ${{ matrix.python }}
18
+ - run: pip install -e ".[dev]"
19
+ - run: ruff check src tests
20
+ - run: ruff format --check src tests
21
+ - run: pyright
22
+ - run: pytest -q
@@ -0,0 +1,13 @@
1
+ # internal planning and tooling never ships
2
+ *.internal.md
3
+ _internal/
4
+
5
+ __pycache__/
6
+ *.pyc
7
+ .venv/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+ results/scratch/
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
inferlint-0.1.0/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ inferlint
2
+ Copyright 2026 RadianVector
3
+
4
+ This product includes software developed by RadianVector (https://radianvector.com).
@@ -0,0 +1,312 @@
1
+ Metadata-Version: 2.5
2
+ Name: inferlint
3
+ Version: 0.1.0
4
+ Summary: Things your inference server doesn't tell you, turned into checks.
5
+ Project-URL: Homepage, https://github.com/radianvector/inferlint
6
+ Project-URL: Source, https://github.com/radianvector/inferlint
7
+ Project-URL: Issues, https://github.com/radianvector/inferlint/issues
8
+ Project-URL: Documentation, https://github.com/radianvector/inferlint/blob/main/docs/tripwires.md
9
+ Author-email: RadianVector <hello@radianvector.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: benchmark,gpu,inference,llm,prometheus,vllm
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Benchmark
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.10
24
+ Provides-Extra: dev
25
+ Requires-Dist: pyright>=1.1.390; extra == 'dev'
26
+ Requires-Dist: pytest>=8; extra == 'dev'
27
+ Requires-Dist: ruff>=0.9; extra == 'dev'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # inferlint
31
+
32
+ **Things your inference server doesn't tell you, turned into checks.**
33
+
34
+ Serving benchmarks fail quietly. vLLM preempts requests and logs nothing. A config boots
35
+ cleanly and dies on its first request. The KV pool you measured yesterday is not the one
36
+ you got today. A cleanup script stops the API server and leaves the engine holding the
37
+ GPU. None of these raise an error, and all of them change the numbers.
38
+
39
+ `inferlint` turns each one into a check. You run it around a benchmark test: it reads
40
+ the server's start-up log and counters, and tells you which of the test's numbers can be
41
+ trusted. It does not start the server or send the load, so it works with the tools you
42
+ already use.
43
+
44
+ ## One run, measured
45
+
46
+ vLLM 0.28 on an RTX 4090, a 27B hybrid attention/Mamba model with 4-bit weights and
47
+ CUDA graphs on. 32 concurrent requests, 1,000 output tokens each:
48
+
49
+ ```console
50
+ $ inferlint preemption before.json after.json
51
+ [ T1] FAIL 22 preemptions during the run
52
+ $ grep -ci preempt boot.log
53
+ 0
54
+ $ inferlint series run.series.jsonl --snapshot after.json --requested 32
55
+ [T14] PASS gauge denominator is 42 = num_gpu_blocks (43) - 1 null block
56
+ [ T9] WARN ceiling moved between 7 and 10 as requests grew (one request held 9.5% to 14.3% of the cache); concurrency was not a constant of this run
57
+ [ T8] FAIL requested 32 concurrent, server never ran more than 10
58
+ ```
59
+
60
+ - The client held 32 requests in flight. The server never ran more than 10 at once.
61
+ - A fresh request held 4 KV blocks, so 10 fit. As outputs crossed the 784-token block
62
+ boundary, running requests held up to 6 blocks each on average, and the number that
63
+ fit fell as low as 7. Each fall evicted running requests, 22 times in all, and the
64
+ server log says nothing about it.
65
+ - The server exports 43 KV blocks, but the usage gauge counts in 42nds. One block is
66
+ reserved and never holds a request.
67
+
68
+ Then the API server was killed with SIGKILL, as a crash or the OOM killer would:
69
+
70
+ ```console
71
+ $ pkill -9 -f "vllm[ ]serve"; sleep 20
72
+ $ ps -eo pid,ppid,rss,args | grep -E "[V]LLM::|[v]llm serve"
73
+ 1030 423 2733144 VLLM::EngineCore
74
+ $ inferlint gpu-inspect # the GPU's model and memory lines are left out here
75
+ [ T2] FAIL card not clear; refusing to boot. ... 21768 MiB used, 1 server processes alive
76
+ $ inferlint teardown
77
+ target pid=1030 VLLM::EngineCore
78
+ (pkill -f 'vllm serve' would miss 1 and wrongly hit 0)
79
+ [ T2] PASS 2 consecutive clear readings
80
+ ```
81
+
82
+ The engine outlived its parent and kept 21.3 GiB of the card. The usual cleanup pattern
83
+ cannot see it, and the next boot would have loaded a second copy into what was left.
84
+ The raw files from this run are in
85
+ [`tests/fixtures/vllm-0.28/live/`](https://github.com/radianvector/inferlint/tree/main/tests/fixtures/vllm-0.28/live),
86
+ and `tests/test_live.py` pins every number above.
87
+
88
+ ## What it checks
89
+
90
+ | id | trap | command |
91
+ |---|---|---|
92
+ | T1 | preemption is silent: a counter moves, no log line is written | `inferlint preemption BEFORE AFTER` |
93
+ | T2 | `pkill -f "vllm serve"` misses the renamed `VLLM::EngineCore` | `inferlint teardown`, `inferlint gpu-inspect` |
94
+ | T3 | `pkill -f` in a shell one-liner kills the shell | `inferlint teardown` |
95
+ | T4 | the KV pool is drawn per boot, in discrete levels | `inferlint check-log BOOT...` |
96
+ | T5 | hybrid models force a large attention block (the allocation unit) | `inferlint check-log` |
97
+ | T6 | the requested attention backend is not applied to the speculative drafter | `inferlint check-log` |
98
+ | T7 | a config boots, then dies on its first request | `inferlint probe URL` |
99
+ | T8 | requested concurrency is not achieved concurrency | `inferlint series --requested N` |
100
+ | T9 | the concurrency ceiling is `floor(1 / share)`, and it falls as requests grow | `inferlint series` |
101
+ | T10 | integer-second timers are worth several percent | `inferlint rate BEFORE AFTER` |
102
+ | T11 | KV memory differs between boots of one config | `inferlint check-log BOOT...` |
103
+ | T12 | boot failures recorded without a reason | `inferlint check-log` |
104
+ | T13 | a killed campaign's waiter adopts the next server | [docs/orchestration.md](https://github.com/radianvector/inferlint/blob/main/docs/orchestration.md) |
105
+ | T14 | the KV usage gauge's denominator is `num_gpu_blocks - 1` | `inferlint series --snapshot` |
106
+
107
+ Each is described in [docs/tripwires.md](https://github.com/radianvector/inferlint/blob/main/docs/tripwires.md)
108
+ with its symptom, why it changes results, and a command that reproduces it from files in
109
+ this repository.
110
+
111
+ ## Install
112
+
113
+ ```console
114
+ pipx install inferlint
115
+ inferlint --help
116
+ ```
117
+
118
+ [pipx](https://pipx.pypa.io) gives `inferlint` an environment of its own and puts the
119
+ command on your PATH, so it works in any terminal and from any folder, with nothing to
120
+ activate. `uv tool install inferlint` does the same. To use it as a library, install it
121
+ into your project's environment with `pip install inferlint` (see
122
+ [Use it from Python](#use-it-from-python)).
123
+
124
+ Python 3.10+, no dependencies. `teardown`, and the free-GPU check in `gpu-inspect`, find
125
+ the server's processes through `/proc`, so they need Linux (or WSL), where vLLM runs.
126
+ Everything else runs anywhere.
127
+
128
+ ## Use
129
+
130
+ A test with inferlint takes as long as your benchmark. It checks one test at a time; it
131
+ is not a monitor for a server that runs for days (Prometheus and Grafana do that job).
132
+
133
+ Use two terminals on the GPU machine, in the same folder: **A** runs the server, **B**
134
+ runs everything else.
135
+
136
+ ```bash
137
+ # 1. Before the server starts (B)
138
+ inferlint gpu-inspect # which GPU, its memory; fails if an old server still holds it
139
+
140
+ # 2. Start the server (A): your usual command, saving its start-up output
141
+ vllm serve MODEL 2>&1 | tee boot.log # wait for "Application startup complete"
142
+
143
+ # then check it (B)
144
+ inferlint check-log boot.log # block size, attention backend, start-up failures
145
+ inferlint probe http://127.0.0.1:8000 # sends 9 small requests: does it answer?
146
+
147
+ # 3. The test (B)
148
+ inferlint snapshot http://127.0.0.1:8000 -o before.json
149
+ inferlint watch http://127.0.0.1:8000 -o run.series.jsonl --interval 0.25 &
150
+ vllm bench serve --model MODEL --max-concurrency 32 ... # your benchmark sends the load
151
+ inferlint snapshot http://127.0.0.1:8000 -o after.json
152
+ kill %1 # stops the recording
153
+
154
+ # 4. The verdict: one HTML page (any time later, on any computer)
155
+ inferlint report -o run.html --requested 32 --boot-log boot.log \
156
+ --before before.json --after after.json --series run.series.jsonl
157
+
158
+ # 5. Stop the server (B)
159
+ inferlint teardown # stops every vLLM process, waits until the GPU is free
160
+ ```
161
+
162
+ - **Your benchmark** sends the requests and reports speed and latency. inferlint reads
163
+ the server's side and says which of those numbers hold.
164
+ - **`--requested`** is the concurrency your benchmark asked for (`--max-concurrency` in
165
+ `vllm bench serve`). Requests, tokens and preemptions come from the server's counters.
166
+ - **Each command does one job and exits**, except `watch`. They only read, except
167
+ `probe` (9 small requests) and `teardown`, which stops the server: don't run it
168
+ against a server that is serving users.
169
+ - **The same verdicts in the terminal:** `inferlint preemption before.json after.json`
170
+ (T1), `inferlint rate before.json after.json` (T10),
171
+ `inferlint series run.series.jsonl --snapshot after.json --requested 32` (T8, T9, T14).
172
+ - **T4 and T11 compare start-ups:** keep the log of each start with the same settings and
173
+ pass them all (`--boot-log boot1.log --boot-log boot2.log`).
174
+ - **In scripts,** `inferlint gpu-inspect || exit 1` and
175
+ `inferlint probe http://127.0.0.1:8000 || exit 1` stop a run before it produces bad
176
+ numbers. [docs/orchestration.md](https://github.com/radianvector/inferlint/blob/main/docs/orchestration.md)
177
+ covers scripts that run many tests.
178
+
179
+ Exit status is 0 when every check passes (warnings allowed), 1 when one fails, and 2
180
+ when one cannot decide because a series or a log line was missing. A missing series
181
+ is never read as zero. `--json` gives machine-readable results; `--strict` fails on
182
+ warnings.
183
+
184
+ ### The report
185
+
186
+ `inferlint report` turns a run's files into one HTML page. It opens with a plain-English
187
+ account of what happened (how long the test ran, requests finished and failed, tokens
188
+ generated, time spent queued, which tripwires were checked and which need other
189
+ files), then the verdicts, charts of what the server did over time, the boot facts, and
190
+ a guide to every tripwire. Two collapsible glossaries explain the terms (token, KV
191
+ pool, block, preemption) and what Pass, Warning, Fail and Can't tell mean: a Fail is a
192
+ finding about the measurement, not a crash, except for T7 and T12.
193
+
194
+ The page fetches nothing, so it opens offline and can be attached to a ticket as it is.
195
+ It has a light/dark switch, every chart has a data table, and hovering (or the arrow
196
+ keys) reads values at any moment.
197
+
198
+ <picture>
199
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/radianvector/inferlint/main/docs/report-dark.png">
200
+ <img alt="The report for the live run: what happened, the headline numbers, and 2 failures and 2 warnings" src="https://raw.githubusercontent.com/radianvector/inferlint/main/docs/report.png">
201
+ </picture>
202
+
203
+ **See a full example.**
204
+ [`docs/example-report.html`](https://github.com/radianvector/inferlint/blob/main/docs/example-report.html)
205
+ is the complete report for the run above: the charts, the findings and both glossaries.
206
+ GitHub shows HTML files as source code, so open the file, choose **Download raw file**,
207
+ and open it in any browser. It works offline.
208
+
209
+ **Try it without a GPU.** The example is built from the recorded run in this repository.
210
+ Download the repository for its files, and make the report yourself:
211
+
212
+ ```bash
213
+ git clone https://github.com/radianvector/inferlint
214
+ cd inferlint
215
+ inferlint report -o example-report.html --title "vLLM 0.28 on an RTX 4090" --requested 32 \
216
+ --boot-log tests/fixtures/vllm-0.28/live/boot.log \
217
+ --before tests/fixtures/vllm-0.28/live/before.snapshot.json \
218
+ --after tests/fixtures/vllm-0.28/live/after.snapshot.json \
219
+ --series tests/fixtures/vllm-0.28/live/run.series.jsonl
220
+ ```
221
+
222
+ `inferlint explain T9` prints the same plain-English explanation in the terminal.
223
+
224
+ ## Use it from Python
225
+
226
+ Install it into your project's environment with `pip install inferlint`. Every check
227
+ returns a `CheckResult` with a `status` (pass, warn, fail or unknown), a `message`, and
228
+ the `evidence` behind it.
229
+
230
+ ```python
231
+ import subprocess
232
+
233
+ from inferlint import bootlog, checks, telemetry
234
+
235
+ url = "http://127.0.0.1:8000"
236
+ before = telemetry.scrape(url)
237
+ subprocess.run(["vllm", "bench", "serve", "--model", "MODEL"], check=True) # your benchmark
238
+ after = telemetry.scrape(url)
239
+
240
+ result = checks.check_no_preemption(before, after)
241
+ print(result.status.value, result.message) # fail 22 preemptions during the run
242
+ result.raise_for_status() # raises TripwireFailed on a Fail or a Can't tell
243
+
244
+ facts = bootlog.parse_file("boot.log")
245
+ print(facts.attention_block_size, facts.kv_pool_tokens) # 784 26093
246
+ record = {"boot": facts.result_block()} # pool, block size, backend: keep with your results
247
+ ```
248
+
249
+ `raise_for_status()` lets warnings through; `raise_for_status(allow_warn=False)` stops on
250
+ them too.
251
+
252
+ | module | what it gives you |
253
+ |---|---|
254
+ | `bootlog` | the facts in a start-up log (`parse_file`) |
255
+ | `telemetry` | the server's counters (`scrape`, `load`) |
256
+ | `series` | recordings made during a run (`watch`, `read`) |
257
+ | `checks` | the checks, each returning a `CheckResult` |
258
+ | `probe` | the first-request check (T7) |
259
+ | `gpu` | which GPU, its family and memory (`read_gpus`) |
260
+ | `teardown` | stopping the server and waiting for a free GPU (Linux) |
261
+ | `report` | the HTML report (`build`, `render`) |
262
+
263
+ ## How it is tested
264
+
265
+ - **Real evidence.** Fixtures are vLLM 0.28 boot logs and `/metrics` output from an
266
+ RTX 4090, with paths removed. Each check is tested against the case it exists for.
267
+ - **Every check is watched failing.** `tests/test_mutations.py` changes one number or
268
+ line in real evidence and requires the verdict to flip.
269
+ - **Instruments against ground truth.** The probe runs against a mock server with known
270
+ failure modes. Block-count inference (T14) is checked against the count the server
271
+ exports. The teardown's process matching runs on a synthetic `/proc` that includes the
272
+ shell one-liner and a bystander. GPU facts are parsed from real `nvidia-smi` output.
273
+ - **Unknown formats are reported, not defaulted.** When a known log line changes format
274
+ in a new vLLM release, `boot-facts` lists it as unparsed instead of returning a value.
275
+
276
+ ## Develop
277
+
278
+ To change the code, work from a clone in a virtual environment of its own, with the
279
+ package installed in editable mode (edits take effect without reinstalling) and the test
280
+ tools added:
281
+
282
+ ```bash
283
+ git clone https://github.com/radianvector/inferlint
284
+ cd inferlint
285
+ python -m venv .venv
286
+ source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
287
+ pip install -e ".[dev]"
288
+ pytest -q # no GPU needed
289
+ ruff check src tests && ruff format --check src tests && pyright
290
+ ```
291
+
292
+ The last two lines are what CI runs on Python 3.10, 3.11 and 3.12.
293
+
294
+ ## Status
295
+
296
+ Alpha. Every tripwire is tested against recorded vLLM 0.28 evidence. T1, T2, T5, T8, T9,
297
+ T10 and T14 have also been re-measured by this code on a live vLLM 0.28 server. Next: one
298
+ command that runs the whole sequence above, re-verification on the current vLLM release,
299
+ and support for the llama.cpp `/metrics` subset.
300
+
301
+ ## About
302
+
303
+ `inferlint` is made by [RadianVector](https://radianvector.com). RadianVector develops
304
+ tools and research for evaluating and improving AI systems.
305
+
306
+ ## License
307
+
308
+ Copyright 2026 RadianVector.
309
+
310
+ This project, including the recorded evidence in `tests/fixtures/`, is licensed under the
311
+ Apache License, Version 2.0. See [LICENSE](https://github.com/radianvector/inferlint/blob/main/LICENSE)
312
+ for details.