firstlight 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 (41) hide show
  1. firstlight-0.1.0/LICENSE +202 -0
  2. firstlight-0.1.0/LICENSE-data +7 -0
  3. firstlight-0.1.0/PKG-INFO +62 -0
  4. firstlight-0.1.0/README.md +138 -0
  5. firstlight-0.1.0/firstlight/__init__.py +24 -0
  6. firstlight-0.1.0/firstlight/__main__.py +870 -0
  7. firstlight-0.1.0/firstlight/aihub.py +456 -0
  8. firstlight-0.1.0/firstlight/bench.py +127 -0
  9. firstlight-0.1.0/firstlight/check.py +224 -0
  10. firstlight-0.1.0/firstlight/contract.py +187 -0
  11. firstlight-0.1.0/firstlight/data/build_census.json +4326 -0
  12. firstlight-0.1.0/firstlight/data/gpu_builds.json +3933 -0
  13. firstlight-0.1.0/firstlight/data/host_simulation.json +110 -0
  14. firstlight-0.1.0/firstlight/data/paper_graphs.json +9 -0
  15. firstlight-0.1.0/firstlight/data/phone_first_set.json +5702 -0
  16. firstlight-0.1.0/firstlight/data/phone_held_out.json +1487 -0
  17. firstlight-0.1.0/firstlight/data/pricing.json +2743 -0
  18. firstlight-0.1.0/firstlight/host.py +314 -0
  19. firstlight-0.1.0/firstlight/model.py +198 -0
  20. firstlight-0.1.0/firstlight/price.py +160 -0
  21. firstlight-0.1.0/firstlight/replay.py +104 -0
  22. firstlight-0.1.0/firstlight/trt.py +668 -0
  23. firstlight-0.1.0/firstlight.egg-info/PKG-INFO +62 -0
  24. firstlight-0.1.0/firstlight.egg-info/SOURCES.txt +39 -0
  25. firstlight-0.1.0/firstlight.egg-info/dependency_links.txt +1 -0
  26. firstlight-0.1.0/firstlight.egg-info/entry_points.txt +2 -0
  27. firstlight-0.1.0/firstlight.egg-info/requires.txt +26 -0
  28. firstlight-0.1.0/firstlight.egg-info/top_level.txt +1 -0
  29. firstlight-0.1.0/pyproject.toml +76 -0
  30. firstlight-0.1.0/setup.cfg +4 -0
  31. firstlight-0.1.0/tests/test_aihub.py +556 -0
  32. firstlight-0.1.0/tests/test_bench.py +142 -0
  33. firstlight-0.1.0/tests/test_check.py +211 -0
  34. firstlight-0.1.0/tests/test_cli.py +865 -0
  35. firstlight-0.1.0/tests/test_contract.py +184 -0
  36. firstlight-0.1.0/tests/test_docs.py +107 -0
  37. firstlight-0.1.0/tests/test_host.py +240 -0
  38. firstlight-0.1.0/tests/test_model.py +273 -0
  39. firstlight-0.1.0/tests/test_price.py +76 -0
  40. firstlight-0.1.0/tests/test_replay.py +54 -0
  41. firstlight-0.1.0/tests/test_trt.py +456 -0
@@ -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 2026 Steven Kolawole, Pearse Jim, Opegbemi M. Busoye and Virginia Smith
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.
@@ -0,0 +1,7 @@
1
+ The benchmark records in firstlight/data/ (the build census and the research records it is built from),
2
+ and any separate release of them, are licensed under the Creative Commons Attribution 4.0 International
3
+ License (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/legalcode
4
+
5
+ Credit the work as described in the "Citation" section of README.md.
6
+
7
+ The code of FirstLight is licensed under the Apache License 2.0 (LICENSE).
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: firstlight
3
+ Version: 0.1.0
4
+ Summary: Check a compiled looped model in two iterations.
5
+ License-Expression: Apache-2.0 AND CC-BY-4.0
6
+ Project-URL: Documentation, https://stevenkolawole.github.io/firstlight/
7
+ Project-URL: Source, https://github.com/stevenkolawole/firstlight
8
+ Project-URL: Paper, https://arxiv.org/abs/2611.39471
9
+ Project-URL: Dataset, https://huggingface.co/datasets/stevenkolawole/firstlight-raw
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: LICENSE-data
14
+ Requires-Dist: numpy
15
+ Requires-Dist: onnx
16
+ Requires-Dist: onnxruntime
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest; extra == "test"
19
+ Requires-Dist: pyyaml; extra == "test"
20
+ Provides-Extra: aihub
21
+ Requires-Dist: qai-hub>=0.59; extra == "aihub"
22
+ Provides-Extra: examples
23
+ Requires-Dist: huggingface_hub; extra == "examples"
24
+ Provides-Extra: export
25
+ Requires-Dist: torch; extra == "export"
26
+ Provides-Extra: tensorrt
27
+ Requires-Dist: tensorrt>=10; extra == "tensorrt"
28
+ Requires-Dist: cuda-python<13,>=12.6; extra == "tensorrt"
29
+ Requires-Dist: nvidia-ml-py; extra == "tensorrt"
30
+ Provides-Extra: docs
31
+ Requires-Dist: sphinx>=7; extra == "docs"
32
+ Requires-Dist: myst-parser>=3; extra == "docs"
33
+ Requires-Dist: furo; extra == "docs"
34
+ Dynamic: license-file
35
+
36
+ <p align="center"><img src="https://raw.githubusercontent.com/stevenkolawole/firstlight/v0.1.0/docs/_static/logo-light.svg" alt="FirstLight" width="380"></p>
37
+
38
+ **Catch a silently broken build of a looped model in two iterations, with no labels.**
39
+
40
+ A looped model (TRM, HRM, DeepThinking) reuses one block of weights and carries a hidden state from
41
+ one iteration to the next. A compiled build can run without an error and still answer wrongly: in
42
+ [our study](https://arxiv.org/abs/2611.39471), 94 of 280 builds fell below half of their reference
43
+ accuracy. FirstLight runs 2 iterations of a build on the device and compares its hidden state with
44
+ the fp32 model's by cosine.
45
+
46
+ <p align="center"><img src="https://raw.githubusercontent.com/stevenkolawole/firstlight/v0.1.0/docs/figures/check_trajectory.png" alt="Cosine of a build's hidden state with the fp32 model's, by iteration" width="520"></p>
47
+
48
+ On held-out phone and A100 builds, the check caught 63 of 63 broken builds and flagged 0 of 52
49
+ correct ones. Output agreement missed 13 of the broken builds.
50
+
51
+ ```
52
+ pip install firstlight
53
+ firstlight replay # print that comparison from the shipped records
54
+ firstlight check SPEC --states STATES.npz # check your own build
55
+ ```
56
+
57
+ | | |
58
+ |---|---|
59
+ | [Documentation](https://stevenkolawole.github.io/firstlight/) | The device guide, the reference and the benchmark. |
60
+ | [Source and quickstart](https://github.com/stevenkolawole/firstlight) | Examples that run on a CPU. |
61
+ | [Paper](https://arxiv.org/abs/2611.39471) | Intelligence per Iteration: Auditing the Inference Cost of Looped Models on Edge Devices. |
62
+ | [Hidden states](https://huggingface.co/datasets/stevenkolawole/firstlight-raw) | The states behind the benchmark, CC BY 4.0. |
@@ -0,0 +1,138 @@
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/logo-dark.svg">
5
+ <img src="docs/_static/logo-light.svg" alt="FirstLight" width="380">
6
+ </picture>
7
+
8
+ **Catch a silently broken build of a looped model in two iterations, with no labels.**
9
+
10
+ [![paper](https://img.shields.io/badge/arXiv-2611.39471-b31b1b)](https://arxiv.org/abs/2611.39471)
11
+ [![data](https://img.shields.io/badge/data-Hugging%20Face-ffcc4d)](https://huggingface.co/datasets/stevenkolawole/firstlight-raw)
12
+ [![docs](https://img.shields.io/badge/docs-online-2B7A8C)](https://stevenkolawole.github.io/firstlight/)
13
+ [![PyPI](https://img.shields.io/pypi/v/firstlight)](https://pypi.org/project/firstlight/)
14
+ [![python](https://img.shields.io/badge/python-3.10%2B-12877F)](pyproject.toml)
15
+ [![license](https://img.shields.io/badge/license-Apache%202.0-1F4E79)](LICENSE)
16
+
17
+ [Quickstart](#quickstart) · [Your own build](#check-your-own-build) · [Docs](https://stevenkolawole.github.io/firstlight/) · [Benchmark](docs/dataset.md) · [Paper](https://arxiv.org/abs/2611.39471)
18
+
19
+ </div>
20
+
21
+ ## Why
22
+
23
+ A looped model reuses the same block of weights and carries a hidden state from one iteration
24
+ to the next. A compiled build can run without errors and still give wrong answers. In
25
+ [our study](https://arxiv.org/abs/2611.39471), 94 of 280 builds fell below half their reference
26
+ accuracy. Finding such a build by scoring its answers needs labels and the full loop, up to 300
27
+ iterations. With a calibrated threshold, FirstLight checks a new build in two iterations without
28
+ labels.
29
+
30
+ ## Quickstart
31
+
32
+ Check two bundled INT8 builds of the DeepThinking maze solver on your CPU. Use Python 3.10 or
33
+ later. The commands pass an explicit cutoff from the paper's TensorRT experiment. A host run
34
+ under ONNX Runtime needs a supplied or calibrated threshold.
35
+
36
+ ```bash
37
+ git clone https://github.com/stevenkolawole/firstlight.git
38
+ cd firstlight
39
+ python -m venv .venv
40
+ .venv/bin/python -m pip install .
41
+ ```
42
+
43
+ Check the build from ONNX Runtime's quantizer.
44
+
45
+ ```bash
46
+ .venv/bin/firstlight check examples/deepthinking_maze/spec.json \
47
+ examples/deepthinking_maze/builds/w8a8_ort.onnx -t 0.8557
48
+ ```
49
+
50
+ The build passes. Its hidden state is close to the full-precision reference.
51
+
52
+ ```text
53
+ pass cosine 0.9984 threshold 0.8557 margin +0.1427 (iteration 2, 10 inputs)
54
+ ```
55
+
56
+ Check the second build with the same cutoff.
57
+
58
+ ```bash
59
+ .venv/bin/firstlight check examples/deepthinking_maze/spec.json \
60
+ examples/deepthinking_maze/builds/w8a8_sym.onnx -t 0.8557
61
+ ```
62
+
63
+ The build fails the check (exit code 1). Its similarity to the reference falls below the cutoff.
64
+
65
+ ```text
66
+ fail cosine 0.0558 threshold 0.8557 margin -0.7999 (iteration 2, 10 inputs) fails on: cosine
67
+ ```
68
+
69
+ ## How it works
70
+
71
+ <p align="center">
72
+ <img src="docs/figures/check_trajectory.png" alt="Cosine of a build's hidden state with the fp32 model's, by iteration" width="520">
73
+ </p>
74
+
75
+ FirstLight runs two iterations of a build on the device and scores how closely its hidden
76
+ state matches the full-precision model's. The second-iteration cosine score separated
77
+ broken and correct builds within each of the paper's held-out sets.
78
+
79
+ | Signal after iteration 2 | Broken phone builds missed, of 47 | Broken A100 builds missed, of 16 |
80
+ |---|:---:|:---:|
81
+ | **Hidden state (FirstLight)** | **0** | **0** |
82
+ | Output agreement | 5 | 8 |
83
+
84
+ No correct build was flagged (0 of 52). `firstlight replay` prints this comparison from the shipped
85
+ records.
86
+
87
+ > [!NOTE]
88
+ > The check also catches compiler regressions. A Sudoku-MLP build that is correct under QAIRT 2.45
89
+ > solves 0 of 100 puzzles under QAIRT 2.51, and the check fails it
90
+ > ([record](records/qairt_251_threshold.md)).
91
+
92
+ ## Check your own build
93
+
94
+ 1. **Describe the model.** A `spec.json` next to an ONNX graph of one iteration;
95
+ [`firstlight.export`](docs/reference.md#export-from-pytorch) writes both from PyTorch.
96
+ 2. **Run the build on the device,** a phone through Qualcomm AI Hub or a local NVIDIA GPU with
97
+ TensorRT ([device guide](docs/device.md)):
98
+
99
+ ```bash
100
+ firstlight device SPEC BUILD -o STATES.npz --device "Samsung Galaxy S25"
101
+ ```
102
+
103
+ 3. **Check the recorded states.**
104
+
105
+ ```bash
106
+ firstlight check SPEC --states STATES.npz
107
+ ```
108
+
109
+ FirstLight ships [default thresholds](docs/reference.md#default-thresholds) for QNN (QAIRT 2.45 and
110
+ 2.51) and TensorRT 10.13.3.9, set on the paper's models. For another toolchain version, or to fit
111
+ the threshold to your model, [calibrate](docs/reference.md#calibrate) on known-good builds first.
112
+
113
+ ## More
114
+
115
+ | | |
116
+ |---|---|
117
+ | [Device guide](docs/device.md) | Run a build on a phone or a GPU, with a Galaxy S25 build that output agreement passes. |
118
+ | [Reference](docs/reference.md) | Model spec, export, thresholds, file formats and exit codes. |
119
+ | [Benchmark](docs/dataset.md) | Labels and scores of all 280 builds; score your own detector; download the hidden states. |
120
+ | [GitHub Action](docs/reference.md#github-action) | Fail a workflow when a build fails the check. |
121
+ | [Energy](docs/energy.md), [pricing](docs/pricing.md), [repair](docs/repair.md) | Energy per iteration, cost per correct answer, and recovery of a broken build. |
122
+ | [Contributing](CONTRIBUTING.md) | Add a threshold for your toolchain version, or rows to the benchmark. |
123
+
124
+ ## Citation
125
+
126
+ ```bibtex
127
+ @misc{kolawole2026intelligence,
128
+ title = {Intelligence per Iteration: Auditing the Inference Cost of Looped Models on Edge Devices},
129
+ author = {Kolawole, Steven and Jim, Pearse and Busoye, Opegbemi M. and Smith, Virginia},
130
+ year = {2026},
131
+ eprint = {2611.39471},
132
+ archivePrefix = {arXiv},
133
+ url = {https://arxiv.org/abs/2611.39471}
134
+ }
135
+ ```
136
+
137
+ FirstLight code is [Apache 2.0](LICENSE). Benchmark records are [CC BY 4.0](LICENSE-data).
138
+ The bundled [DeepThinking example](examples/deepthinking_maze/SOURCES.txt) uses MIT-licensed weights.
@@ -0,0 +1,24 @@
1
+ """Check whether a compiled looped model computes the right answer on a device."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .check import DEFAULTS, DefaultThreshold, Verdict, calibrate, check, cosine, default_threshold
6
+ from .contract import export
7
+ from .host import Reference, Repair, host_run, repair
8
+ from .model import Spec
9
+
10
+ __all__ = [
11
+ "DEFAULTS",
12
+ "DefaultThreshold",
13
+ "Reference",
14
+ "Repair",
15
+ "Spec",
16
+ "Verdict",
17
+ "calibrate",
18
+ "check",
19
+ "cosine",
20
+ "default_threshold",
21
+ "export",
22
+ "host_run",
23
+ "repair",
24
+ ]