llm-speed 0.0.2__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 (59) hide show
  1. llm_speed-0.0.2/LICENSE +201 -0
  2. llm_speed-0.0.2/MANIFEST.in +35 -0
  3. llm_speed-0.0.2/PKG-INFO +201 -0
  4. llm_speed-0.0.2/README.md +148 -0
  5. llm_speed-0.0.2/cli/__init__.py +10 -0
  6. llm_speed-0.0.2/cli/__main__.py +332 -0
  7. llm_speed-0.0.2/cli/auto_install.py +242 -0
  8. llm_speed-0.0.2/cli/commands/__init__.py +0 -0
  9. llm_speed-0.0.2/cli/commands/bench.py +411 -0
  10. llm_speed-0.0.2/cli/commands/compare.py +95 -0
  11. llm_speed-0.0.2/cli/commands/detect.py +68 -0
  12. llm_speed-0.0.2/cli/commands/list_models.py +69 -0
  13. llm_speed-0.0.2/cli/commands/login.py +38 -0
  14. llm_speed-0.0.2/cli/commands/self_update.py +58 -0
  15. llm_speed-0.0.2/cli/config.py +34 -0
  16. llm_speed-0.0.2/cli/consent.py +152 -0
  17. llm_speed-0.0.2/cli/drivers/__init__.py +33 -0
  18. llm_speed-0.0.2/cli/drivers/exllamav2.py +402 -0
  19. llm_speed-0.0.2/cli/drivers/hosted_api.py +662 -0
  20. llm_speed-0.0.2/cli/drivers/llama_cpp.py +619 -0
  21. llm_speed-0.0.2/cli/drivers/mlx.py +448 -0
  22. llm_speed-0.0.2/cli/drivers/ollama.py +401 -0
  23. llm_speed-0.0.2/cli/drivers/vllm.py +488 -0
  24. llm_speed-0.0.2/cli/fingerprint.py +741 -0
  25. llm_speed-0.0.2/cli/mcp/__init__.py +0 -0
  26. llm_speed-0.0.2/cli/mcp/api.py +100 -0
  27. llm_speed-0.0.2/cli/mcp/cells.py +174 -0
  28. llm_speed-0.0.2/cli/mcp/server.py +474 -0
  29. llm_speed-0.0.2/cli/mcp/slugs.py +114 -0
  30. llm_speed-0.0.2/cli/output.py +101 -0
  31. llm_speed-0.0.2/cli/registry.py +52 -0
  32. llm_speed-0.0.2/cli/signing.py +414 -0
  33. llm_speed-0.0.2/cli/timing.py +59 -0
  34. llm_speed-0.0.2/cli/types.py +193 -0
  35. llm_speed-0.0.2/cli/ui/__init__.py +15 -0
  36. llm_speed-0.0.2/cli/ui/auto.py +72 -0
  37. llm_speed-0.0.2/cli/ui/progress.py +131 -0
  38. llm_speed-0.0.2/cli/ui/share.py +317 -0
  39. llm_speed-0.0.2/cli/ui/theme.py +85 -0
  40. llm_speed-0.0.2/cli/ui/welcome.py +214 -0
  41. llm_speed-0.0.2/cli/upload.py +311 -0
  42. llm_speed-0.0.2/cli/verify.py +635 -0
  43. llm_speed-0.0.2/cli/workloads/__init__.py +30 -0
  44. llm_speed-0.0.2/cli/workloads/agent_trace.py +298 -0
  45. llm_speed-0.0.2/cli/workloads/chat_long.py +164 -0
  46. llm_speed-0.0.2/cli/workloads/chat_short.py +152 -0
  47. llm_speed-0.0.2/cli/workloads/concurrent_decode.py +227 -0
  48. llm_speed-0.0.2/cli/workloads/long_context_decay.py +241 -0
  49. llm_speed-0.0.2/cli/workloads/prompts/__init__.py +5 -0
  50. llm_speed-0.0.2/cli/workloads/prompts/agent_trace_trace.py +476 -0
  51. llm_speed-0.0.2/cli/workloads/prompts/fixtures.py +212 -0
  52. llm_speed-0.0.2/llm_speed.egg-info/PKG-INFO +201 -0
  53. llm_speed-0.0.2/llm_speed.egg-info/SOURCES.txt +57 -0
  54. llm_speed-0.0.2/llm_speed.egg-info/dependency_links.txt +1 -0
  55. llm_speed-0.0.2/llm_speed.egg-info/entry_points.txt +2 -0
  56. llm_speed-0.0.2/llm_speed.egg-info/requires.txt +25 -0
  57. llm_speed-0.0.2/llm_speed.egg-info/top_level.txt +1 -0
  58. llm_speed-0.0.2/pyproject.toml +95 -0
  59. llm_speed-0.0.2/setup.cfg +4 -0
@@ -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 describing the origin of the Work and
141
+ 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 Support. 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 support.
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 2026 the llm-speed authors
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.
@@ -0,0 +1,35 @@
1
+ # Sdist scope is INCLUSIVE-ONLY: ship exactly the CLI source + the three
2
+ # top-level metadata files, nothing else.
3
+ #
4
+ # Without this manifest, setuptools' SCM-aware default sweeps in every
5
+ # git-tracked file at the repo root — including `tests/`, `docs/`,
6
+ # `bots/`, `tools/`, `web/`, `worker/`, etc. The 2026-05-12 doxx sweep
7
+ # caught `tests/test_identity_scrub.py` shipping in the v0.0.1 sdist
8
+ # with its full denylist (real name + work-domain markers) as plaintext
9
+ # literals. This file caps the sdist's reach so that can't recur.
10
+ #
11
+ # To add a new top-level item to the published artifact, add it here
12
+ # explicitly. The CI guard (tests/test_identity_scrub.py) does NOT
13
+ # protect packages built outside this scope.
14
+
15
+ include README.md
16
+ include LICENSE
17
+ include pyproject.toml
18
+ recursive-include cli *.py
19
+ prune tests
20
+ prune docs
21
+ prune bots
22
+ prune tools
23
+ prune web
24
+ prune worker
25
+ prune api
26
+ prune seed
27
+ prune Formula
28
+ prune npm
29
+ prune parking
30
+ prune scripts
31
+ prune .github
32
+ prune .claude
33
+ global-exclude __pycache__
34
+ global-exclude *.py[cod]
35
+ global-exclude .DS_Store
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: llm-speed
3
+ Version: 0.0.2
4
+ Summary: Benchmark any LLM on any hardware. CLI for the llm-speed.com flywheel.
5
+ Author-email: meadow-kun <2424351+meadow-kun@users.noreply.github.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://llm-speed.com
8
+ Project-URL: Source, https://github.com/meadow-kun/llm-speed
9
+ Project-URL: Documentation, https://llm-speed.com/methodology
10
+ Project-URL: Issues, https://github.com/meadow-kun/llm-speed/issues
11
+ Keywords: llm,benchmark,inference,tokens-per-second,ollama,llama.cpp,vllm,mlx
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Environment :: GPU
15
+ Classifier: Environment :: GPU :: NVIDIA CUDA
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Operating System :: MacOS
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Programming Language :: Python
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
29
+ Classifier: Topic :: System :: Benchmark
30
+ Requires-Python: >=3.10
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: httpx<0.30,>=0.27
34
+ Requires-Dist: psutil>=5.9
35
+ Requires-Dist: rich>=13.7
36
+ Requires-Dist: cryptography>=44.0.1
37
+ Requires-Dist: joserfc>=1.0
38
+ Provides-Extra: seed
39
+ Requires-Dist: praw<8,>=7.7; extra == "seed"
40
+ Provides-Extra: mlx
41
+ Requires-Dist: mlx-lm>=0.18; extra == "mlx"
42
+ Provides-Extra: vllm
43
+ Requires-Dist: vllm>=0.6; extra == "vllm"
44
+ Provides-Extra: exllamav2
45
+ Requires-Dist: exllamav2>=0.2; extra == "exllamav2"
46
+ Provides-Extra: mcp
47
+ Requires-Dist: mcp>=1.10; extra == "mcp"
48
+ Requires-Dist: cachetools>=5; extra == "mcp"
49
+ Provides-Extra: test
50
+ Requires-Dist: pytest>=8; extra == "test"
51
+ Requires-Dist: pytest-cov>=5; extra == "test"
52
+ Dynamic: license-file
53
+
54
+ # llm-speed-web
55
+
56
+ Source for **llm-speed.com** — the canonical, crowdsourced source of truth for
57
+ how fast LLMs actually run, across hosted APIs, consumer GPUs, and prosumer rigs.
58
+
59
+ ## Install
60
+
61
+ ### One-liners
62
+
63
+ - pipx (recommended for local-LLM users): `pipx install llm-speed`
64
+ - uv: `uv tool install llm-speed`
65
+ - Homebrew: `brew install llm-speed/tap/llm-speed` *(coming soon)*
66
+ - Docker: `docker run --rm -it llmspeed/llm-speed bench` *(coming soon)*
67
+ - npm: `npm install -g llm-speed` *(coming soon)*
68
+ - Standalone binary: download from [Releases](https://github.com/meadow-kun/llm-speed/releases) *(coming soon)*
69
+
70
+ ### Optional backends
71
+
72
+ - MLX (Apple Silicon): `pip install 'llm-speed[mlx]'`
73
+ - vLLM (NVIDIA): `pip install 'llm-speed[vllm]'`
74
+ - ExLlamaV2 (NVIDIA): `pip install 'llm-speed[exllamav2]'`
75
+ - llama.cpp + ollama are detected as binaries on PATH; no extras needed.
76
+
77
+ See `docs/RELEASE.md` for the publishing runbook (release steps + rollback).
78
+
79
+ ## Status
80
+
81
+ Phase 0 (seeding). The CLI and website come next; see `docs/` for the brief and plan.
82
+
83
+ ## Layout
84
+
85
+ ```
86
+ docs/ Strategic & design documents
87
+ BRIEF.md Project brief — why, who, monetization, phases
88
+ CLI.md llm-speed CLI requirements + portability strategy
89
+ DATA_SOURCES.md Folklore source inventory + scrape policy
90
+ MARKETING.md CLI launch & flywheel marketing strategy
91
+
92
+ db/
93
+ schema.sql SQLite seed schema (mirrors the eventual Postgres prod schema)
94
+ seed.sqlite Created on first run
95
+
96
+ seed/ The seeding pipeline (Python)
97
+ models.py Plain dataclasses (RawDocument, Claim)
98
+ db.py Connection + insert helpers
99
+ extractors.py Regex-based (model × hardware × backend × tok/s) extractor
100
+ reddit/client.py Reddit (PRAW) — r/LocalLLaMA + neighbors, full sweep
101
+ scrapers/hn.py Hacker News (Algolia API)
102
+ scrapers/openrouter.py OpenRouter API
103
+ scrapers/localscore.py LocalScore HTML + Next.js data
104
+ scrapers/artificial_analysis.py AA public pages (cross-reference)
105
+ scrapers/github.py GitHub issues/PRs in inference backends
106
+ scrapers/blogs.py Curated blog list
107
+ run.py Top-level orchestrator
108
+ ```
109
+
110
+ ## Quick start
111
+
112
+ ```sh
113
+ # 1. Install
114
+ python -m venv .venv && source .venv/bin/activate
115
+ pip install -e . # uses pyproject.toml
116
+
117
+ # 2. Set credentials (only what you have available; missing ones get skipped)
118
+ export REDDIT_CLIENT_ID=...
119
+ export REDDIT_CLIENT_SECRET=...
120
+ export REDDIT_USER_AGENT="llm-speed-seeder/0.1 (+https://llm-speed.com)"
121
+ # Reddit's API rules want a description + contact info. The project URL is
122
+ # the right contact for a project-operated bot — DO NOT put `by u/<handle>`
123
+ # here, since Reddit logs the user-agent on every request and that ties
124
+ # every scrape back to a personal handle.
125
+ export GITHUB_TOKEN=... # optional but strongly recommended
126
+
127
+ # 3. Smoke test
128
+ python -m seed.run --quick --only hn artificial_analysis blogs
129
+
130
+ # 4. Full sweep
131
+ python -m seed.run
132
+
133
+ # 5. Inspect what landed
134
+ python -m seed.run --stats
135
+ sqlite3 db/seed.sqlite \
136
+ 'SELECT model_family, hardware_name, backend, AVG(decode_tps), COUNT(*)
137
+ FROM claims
138
+ WHERE confidence > 0.5
139
+ GROUP BY 1,2,3 ORDER BY 5 DESC LIMIT 30;'
140
+ ```
141
+
142
+ ## Per-seeder usage
143
+
144
+ Each module is also runnable on its own:
145
+
146
+ ```sh
147
+ python -m seed.reddit.client --quick # auth smoke test
148
+ python -m seed.scrapers.hn --query "Qwen3 Coder tok/s"
149
+ python -m seed.scrapers.openrouter --no-endpoints
150
+ python -m seed.scrapers.localscore --max-tests 50
151
+ python -m seed.scrapers.github --repo ggerganov/llama.cpp
152
+ python -m seed.scrapers.blogs --urls-file my_urls.txt
153
+ python -m seed.scrapers.artificial_analysis
154
+ ```
155
+
156
+ ## Local CI (no GitHub Actions)
157
+
158
+ This project does its CI on the developer's machine — the lint / test /
159
+ smoke / API-roundtrip / build pipeline that used to run on every push
160
+ to GitHub Actions now lives at `scripts/check.sh`.
161
+
162
+ ```bash
163
+ # Full check (~30s — lint, test, smoke, API roundtrip, build)
164
+ ./scripts/check.sh
165
+
166
+ # Inner-loop fast pass (~10s — lint + test only)
167
+ ./scripts/check.sh --quick
168
+
169
+ # Skip individual phases:
170
+ SKIP_BUILD=1 ./scripts/check.sh
171
+ SKIP_LINT=1 SKIP_BUILD=1 ./scripts/check.sh
172
+ ```
173
+
174
+ To run it automatically on every `git push` (skippable per-push with
175
+ `--no-verify`), opt in to the bundled hook once per clone:
176
+
177
+ ```bash
178
+ git config core.hooksPath .githooks
179
+ ```
180
+
181
+ The pre-push hook runs `--quick` by default; `CHECK_FULL=1 git push`
182
+ runs the full check.
183
+
184
+ The previous `.github/workflows/ci.yml` was deleted; only manual /
185
+ release-event workflows remain (`release.yml`, `daily-metrics.yml`,
186
+ `scheduled-seed.yml`, `reddit-poster.yml`). None of them fire on push.
187
+
188
+ ## Design notes
189
+
190
+ - **Idempotent.** Re-running a seeder is safe; documents are uniqued by `(source, source_id)`.
191
+ - **Provenance preserved.** Every claim links back to its source URL + author + scrape time. Folklore stays distinguishable from CLI-verified canonical results.
192
+ - **Confidence-scored.** Regex extraction caps at ~0.85; structured-API extraction reaches ~0.9; nothing in the seed phase counts as canonical (that's the CLI's job).
193
+ - **Polite.** All scrapers honor source-appropriate rate limits and identify themselves in `User-Agent`.
194
+ - **No LLM calls in this phase.** Heuristic extraction only. An LLM second-pass for ambiguous cases is a Phase 1 add-on (see `docs/CLI.md`).
195
+
196
+ ## Next milestone
197
+
198
+ `docs/CLI.md` — design for the `llm-speed` benchmark CLI. The seeded folklore is
199
+ inventory; the CLI is the actual data-quality moat. Ship CLI in 2–4 weeks; if
200
+ adoption fails the kill criterion (see `docs/MARKETING.md`), stop before building
201
+ the website.
@@ -0,0 +1,148 @@
1
+ # llm-speed-web
2
+
3
+ Source for **llm-speed.com** — the canonical, crowdsourced source of truth for
4
+ how fast LLMs actually run, across hosted APIs, consumer GPUs, and prosumer rigs.
5
+
6
+ ## Install
7
+
8
+ ### One-liners
9
+
10
+ - pipx (recommended for local-LLM users): `pipx install llm-speed`
11
+ - uv: `uv tool install llm-speed`
12
+ - Homebrew: `brew install llm-speed/tap/llm-speed` *(coming soon)*
13
+ - Docker: `docker run --rm -it llmspeed/llm-speed bench` *(coming soon)*
14
+ - npm: `npm install -g llm-speed` *(coming soon)*
15
+ - Standalone binary: download from [Releases](https://github.com/meadow-kun/llm-speed/releases) *(coming soon)*
16
+
17
+ ### Optional backends
18
+
19
+ - MLX (Apple Silicon): `pip install 'llm-speed[mlx]'`
20
+ - vLLM (NVIDIA): `pip install 'llm-speed[vllm]'`
21
+ - ExLlamaV2 (NVIDIA): `pip install 'llm-speed[exllamav2]'`
22
+ - llama.cpp + ollama are detected as binaries on PATH; no extras needed.
23
+
24
+ See `docs/RELEASE.md` for the publishing runbook (release steps + rollback).
25
+
26
+ ## Status
27
+
28
+ Phase 0 (seeding). The CLI and website come next; see `docs/` for the brief and plan.
29
+
30
+ ## Layout
31
+
32
+ ```
33
+ docs/ Strategic & design documents
34
+ BRIEF.md Project brief — why, who, monetization, phases
35
+ CLI.md llm-speed CLI requirements + portability strategy
36
+ DATA_SOURCES.md Folklore source inventory + scrape policy
37
+ MARKETING.md CLI launch & flywheel marketing strategy
38
+
39
+ db/
40
+ schema.sql SQLite seed schema (mirrors the eventual Postgres prod schema)
41
+ seed.sqlite Created on first run
42
+
43
+ seed/ The seeding pipeline (Python)
44
+ models.py Plain dataclasses (RawDocument, Claim)
45
+ db.py Connection + insert helpers
46
+ extractors.py Regex-based (model × hardware × backend × tok/s) extractor
47
+ reddit/client.py Reddit (PRAW) — r/LocalLLaMA + neighbors, full sweep
48
+ scrapers/hn.py Hacker News (Algolia API)
49
+ scrapers/openrouter.py OpenRouter API
50
+ scrapers/localscore.py LocalScore HTML + Next.js data
51
+ scrapers/artificial_analysis.py AA public pages (cross-reference)
52
+ scrapers/github.py GitHub issues/PRs in inference backends
53
+ scrapers/blogs.py Curated blog list
54
+ run.py Top-level orchestrator
55
+ ```
56
+
57
+ ## Quick start
58
+
59
+ ```sh
60
+ # 1. Install
61
+ python -m venv .venv && source .venv/bin/activate
62
+ pip install -e . # uses pyproject.toml
63
+
64
+ # 2. Set credentials (only what you have available; missing ones get skipped)
65
+ export REDDIT_CLIENT_ID=...
66
+ export REDDIT_CLIENT_SECRET=...
67
+ export REDDIT_USER_AGENT="llm-speed-seeder/0.1 (+https://llm-speed.com)"
68
+ # Reddit's API rules want a description + contact info. The project URL is
69
+ # the right contact for a project-operated bot — DO NOT put `by u/<handle>`
70
+ # here, since Reddit logs the user-agent on every request and that ties
71
+ # every scrape back to a personal handle.
72
+ export GITHUB_TOKEN=... # optional but strongly recommended
73
+
74
+ # 3. Smoke test
75
+ python -m seed.run --quick --only hn artificial_analysis blogs
76
+
77
+ # 4. Full sweep
78
+ python -m seed.run
79
+
80
+ # 5. Inspect what landed
81
+ python -m seed.run --stats
82
+ sqlite3 db/seed.sqlite \
83
+ 'SELECT model_family, hardware_name, backend, AVG(decode_tps), COUNT(*)
84
+ FROM claims
85
+ WHERE confidence > 0.5
86
+ GROUP BY 1,2,3 ORDER BY 5 DESC LIMIT 30;'
87
+ ```
88
+
89
+ ## Per-seeder usage
90
+
91
+ Each module is also runnable on its own:
92
+
93
+ ```sh
94
+ python -m seed.reddit.client --quick # auth smoke test
95
+ python -m seed.scrapers.hn --query "Qwen3 Coder tok/s"
96
+ python -m seed.scrapers.openrouter --no-endpoints
97
+ python -m seed.scrapers.localscore --max-tests 50
98
+ python -m seed.scrapers.github --repo ggerganov/llama.cpp
99
+ python -m seed.scrapers.blogs --urls-file my_urls.txt
100
+ python -m seed.scrapers.artificial_analysis
101
+ ```
102
+
103
+ ## Local CI (no GitHub Actions)
104
+
105
+ This project does its CI on the developer's machine — the lint / test /
106
+ smoke / API-roundtrip / build pipeline that used to run on every push
107
+ to GitHub Actions now lives at `scripts/check.sh`.
108
+
109
+ ```bash
110
+ # Full check (~30s — lint, test, smoke, API roundtrip, build)
111
+ ./scripts/check.sh
112
+
113
+ # Inner-loop fast pass (~10s — lint + test only)
114
+ ./scripts/check.sh --quick
115
+
116
+ # Skip individual phases:
117
+ SKIP_BUILD=1 ./scripts/check.sh
118
+ SKIP_LINT=1 SKIP_BUILD=1 ./scripts/check.sh
119
+ ```
120
+
121
+ To run it automatically on every `git push` (skippable per-push with
122
+ `--no-verify`), opt in to the bundled hook once per clone:
123
+
124
+ ```bash
125
+ git config core.hooksPath .githooks
126
+ ```
127
+
128
+ The pre-push hook runs `--quick` by default; `CHECK_FULL=1 git push`
129
+ runs the full check.
130
+
131
+ The previous `.github/workflows/ci.yml` was deleted; only manual /
132
+ release-event workflows remain (`release.yml`, `daily-metrics.yml`,
133
+ `scheduled-seed.yml`, `reddit-poster.yml`). None of them fire on push.
134
+
135
+ ## Design notes
136
+
137
+ - **Idempotent.** Re-running a seeder is safe; documents are uniqued by `(source, source_id)`.
138
+ - **Provenance preserved.** Every claim links back to its source URL + author + scrape time. Folklore stays distinguishable from CLI-verified canonical results.
139
+ - **Confidence-scored.** Regex extraction caps at ~0.85; structured-API extraction reaches ~0.9; nothing in the seed phase counts as canonical (that's the CLI's job).
140
+ - **Polite.** All scrapers honor source-appropriate rate limits and identify themselves in `User-Agent`.
141
+ - **No LLM calls in this phase.** Heuristic extraction only. An LLM second-pass for ambiguous cases is a Phase 1 add-on (see `docs/CLI.md`).
142
+
143
+ ## Next milestone
144
+
145
+ `docs/CLI.md` — design for the `llm-speed` benchmark CLI. The seeded folklore is
146
+ inventory; the CLI is the actual data-quality moat. Ship CLI in 2–4 weeks; if
147
+ adoption fails the kill criterion (see `docs/MARKETING.md`), stop before building
148
+ the website.
@@ -0,0 +1,10 @@
1
+ """llm-speed CLI package.
2
+
3
+ Public surface (importable, agent-implemented): types in `cli.types`,
4
+ registries in `cli.registry`, fingerprint in `cli.fingerprint`,
5
+ backend drivers under `cli.drivers`, workloads under `cli.workloads`,
6
+ top-level commands under `cli.commands`.
7
+ """
8
+
9
+ __version__ = "0.0.1-dev"
10
+ SUITE_VERSION = "suite-v1"