compactbench 0.1.0__py3-none-any.whl

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 (66) hide show
  1. compactbench/__init__.py +10 -0
  2. compactbench/__main__.py +6 -0
  3. compactbench/cli.py +343 -0
  4. compactbench/compactors/__init__.py +47 -0
  5. compactbench/compactors/_state_parser.py +118 -0
  6. compactbench/compactors/_utils.py +37 -0
  7. compactbench/compactors/base.py +38 -0
  8. compactbench/compactors/errors.py +11 -0
  9. compactbench/compactors/hierarchical_summary.py +113 -0
  10. compactbench/compactors/hybrid_ledger.py +115 -0
  11. compactbench/compactors/naive_summary.py +54 -0
  12. compactbench/compactors/structured_state.py +64 -0
  13. compactbench/config.py +36 -0
  14. compactbench/contracts/__init__.py +41 -0
  15. compactbench/contracts/artifact.py +49 -0
  16. compactbench/contracts/case.py +81 -0
  17. compactbench/contracts/result.py +79 -0
  18. compactbench/dsl/__init__.py +66 -0
  19. compactbench/dsl/errors.py +23 -0
  20. compactbench/dsl/generators.py +243 -0
  21. compactbench/dsl/models.py +107 -0
  22. compactbench/dsl/parser.py +55 -0
  23. compactbench/dsl/substitution.py +32 -0
  24. compactbench/dsl/validator.py +97 -0
  25. compactbench/engine/__init__.py +29 -0
  26. compactbench/engine/difficulty.py +54 -0
  27. compactbench/engine/distractors.py +69 -0
  28. compactbench/engine/errors.py +11 -0
  29. compactbench/engine/generation.py +96 -0
  30. compactbench/engine/seeds.py +31 -0
  31. compactbench/engine/transcript.py +84 -0
  32. compactbench/leaderboard/__init__.py +38 -0
  33. compactbench/leaderboard/errors.py +11 -0
  34. compactbench/leaderboard/projection.py +103 -0
  35. compactbench/leaderboard/qualification.py +90 -0
  36. compactbench/leaderboard/ranking.py +71 -0
  37. compactbench/providers/__init__.py +52 -0
  38. compactbench/providers/_retry.py +48 -0
  39. compactbench/providers/base.py +44 -0
  40. compactbench/providers/errors.py +15 -0
  41. compactbench/providers/google_ai_studio.py +112 -0
  42. compactbench/providers/groq.py +95 -0
  43. compactbench/providers/mock.py +53 -0
  44. compactbench/providers/ollama.py +100 -0
  45. compactbench/py.typed +0 -0
  46. compactbench/runner/__init__.py +53 -0
  47. compactbench/runner/_resolver.py +57 -0
  48. compactbench/runner/continuation.py +78 -0
  49. compactbench/runner/cycle.py +67 -0
  50. compactbench/runner/errors.py +15 -0
  51. compactbench/runner/evaluation.py +71 -0
  52. compactbench/runner/persistence.py +227 -0
  53. compactbench/runner/run.py +257 -0
  54. compactbench/scoring/__init__.py +48 -0
  55. compactbench/scoring/checks.py +92 -0
  56. compactbench/scoring/compression.py +66 -0
  57. compactbench/scoring/contradictions.py +70 -0
  58. compactbench/scoring/drift.py +30 -0
  59. compactbench/scoring/errors.py +7 -0
  60. compactbench/scoring/scorer.py +77 -0
  61. compactbench/utils/__init__.py +1 -0
  62. compactbench-0.1.0.dist-info/METADATA +161 -0
  63. compactbench-0.1.0.dist-info/RECORD +66 -0
  64. compactbench-0.1.0.dist-info/WHEEL +4 -0
  65. compactbench-0.1.0.dist-info/entry_points.txt +2 -0
  66. compactbench-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: compactbench
3
+ Version: 0.1.0
4
+ Summary: Open benchmark for AI conversation compaction methods
5
+ Project-URL: Homepage, https://compactbench.github.io/compactbench
6
+ Project-URL: Repository, https://github.com/compactbench/compactbench
7
+ Project-URL: Documentation, https://compactbench.github.io/compactbench
8
+ Project-URL: Issues, https://github.com/compactbench/compactbench/issues
9
+ Project-URL: Changelog, https://github.com/compactbench/compactbench/blob/main/CHANGELOG.md
10
+ Author: CompactBench contributors
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: ai,benchmark,compaction,context,drift,evaluation,llm,memory,summarization
14
+ Classifier: Development Status :: 2 - Pre-Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: httpx>=0.27
27
+ Requires-Dist: jsonschema>=4.22
28
+ Requires-Dist: pydantic-settings>=2.3
29
+ Requires-Dist: pydantic>=2.7
30
+ Requires-Dist: rich>=13.7
31
+ Requires-Dist: ruamel-yaml>=0.18
32
+ Requires-Dist: tiktoken>=0.7
33
+ Requires-Dist: typer>=0.12
34
+ Provides-Extra: dev
35
+ Requires-Dist: hypothesis>=6.100; extra == 'dev'
36
+ Requires-Dist: pre-commit>=3.7; extra == 'dev'
37
+ Requires-Dist: pyright>=1.1.370; extra == 'dev'
38
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
39
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
40
+ Requires-Dist: pytest>=8.2; extra == 'dev'
41
+ Requires-Dist: ruff>=0.5; extra == 'dev'
42
+ Provides-Extra: docs
43
+ Requires-Dist: mkdocs-include-markdown-plugin>=6.2; extra == 'docs'
44
+ Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
45
+ Provides-Extra: providers
46
+ Requires-Dist: google-genai>=0.3; extra == 'providers'
47
+ Requires-Dist: groq>=0.9; extra == 'providers'
48
+ Requires-Dist: ollama>=0.3; extra == 'providers'
49
+ Description-Content-Type: text/markdown
50
+
51
+ # CompactBench
52
+
53
+ > Open benchmark for AI conversation compaction methods.
54
+
55
+ [![PyPI version](https://img.shields.io/pypi/v/compactbench.svg)](https://pypi.org/project/compactbench/)
56
+ [![Python](https://img.shields.io/pypi/pyversions/compactbench.svg)](https://pypi.org/project/compactbench/)
57
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
58
+ [![CI](https://github.com/compactbench/compactbench/actions/workflows/ci.yml/badge.svg)](https://github.com/compactbench/compactbench/actions/workflows/ci.yml)
59
+
60
+ CompactBench measures whether language models still behave correctly after long conversation history is replaced with a compacted representation. It runs adversarial, deterministic, multi-cycle benchmarks and publishes ranked results on a public leaderboard.
61
+
62
+ - **Deterministic generation** — same template + seed + version always yields the same case
63
+ - **Hidden ranked set** — public practice cases for development, hidden templates for ranked scoring
64
+ - **Multi-cycle drift** — methods are evaluated across repeated compact → continue → compact loops
65
+ - **State-fidelity scoring** — correctness of retained decisions, constraints, and entities, not output style
66
+ - **Versioned everywhere** — benchmark suite, template, scorer, model, and method versions are recorded with every result
67
+
68
+ ## Install
69
+
70
+ ```bash
71
+ pip install compactbench
72
+ ```
73
+
74
+ Or with uv (recommended for development):
75
+
76
+ ```bash
77
+ uv pip install compactbench
78
+ ```
79
+
80
+ ## Quickstart
81
+
82
+ Run a built-in compactor against the starter suite using a local Ollama model:
83
+
84
+ ```bash
85
+ compactbench run \
86
+ --method built-in:hybrid-ledger \
87
+ --suite starter \
88
+ --provider ollama \
89
+ --model llama3.2
90
+ ```
91
+
92
+ Generate a single case deterministically for inspection:
93
+
94
+ ```bash
95
+ compactbench generate --template buried_constraint_v1 --seed 42
96
+ ```
97
+
98
+ Score an existing results file:
99
+
100
+ ```bash
101
+ compactbench score --results results.jsonl
102
+ ```
103
+
104
+ ## Writing your own compactor
105
+
106
+ Implement the `Compactor` interface and register it.
107
+
108
+ ```python
109
+ from compactbench.compactors import Compactor
110
+ from compactbench.contracts import CompactionArtifact, Transcript
111
+
112
+ class MyCompactor(Compactor):
113
+ name = "my-method"
114
+ version = "0.1.0"
115
+
116
+ def compact(self, transcript: Transcript, config: dict) -> CompactionArtifact:
117
+ ...
118
+ ```
119
+
120
+ Then run:
121
+
122
+ ```bash
123
+ compactbench run --method path/to/my_compactor.py:MyCompactor --suite elite_practice
124
+ ```
125
+
126
+ See [docs/writing-a-compactor.md](docs/writing-a-compactor.md) for full details.
127
+
128
+ ## Leaderboard
129
+
130
+ The public leaderboard is at **[https://compactbench.github.io/compactbench/leaderboard](https://compactbench.github.io/compactbench/leaderboard/)**.
131
+
132
+ Submissions are evaluated against **hidden** ranked benchmark cases by a maintainer-operated runner. To submit:
133
+
134
+ 1. Write and test your compactor locally against `elite_practice`.
135
+ 2. Open a PR to [`submissions/`](submissions/) with your method source and config.
136
+ 3. A maintainer runs it against the hidden set and merges if it qualifies.
137
+
138
+ See [docs/submitting.md](docs/submitting.md) for the full submission protocol.
139
+
140
+ ## Project status
141
+
142
+ **v0.1.0 launch-ready.** All ten workorders from the implementation roadmap have landed:
143
+
144
+ - Core: DSL parser, case generation, scoring engine, mock + real providers (Groq / Google AI Studio / Ollama)
145
+ - Methods: four built-in compactors (`naive-summary`, `structured-state`, `hierarchical-summary`, `hybrid-ledger`)
146
+ - Runtime: end-to-end `compactbench run` with drift cycles, JSONL event log, `--resume`
147
+ - Leaderboard: PR-based submission workflow on GitHub-hosted runners, static site fed by a qualification + ranking core
148
+ - Content: 15 public Elite practice templates + 15 hidden ranked templates across three launch families
149
+ - Release: PyPI trusted-publishing workflow wired up; tag `v0.1.0` to ship
150
+
151
+ See [CHANGELOG.md](CHANGELOG.md) for the full breakdown. Post-launch work (hidden-set content expansion, additional template families, shadow evaluation automation, custom domain) is tracked via GitHub issues.
152
+
153
+ ## Contributing
154
+
155
+ Bug reports, template proposals, and new compactors are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
156
+
157
+ Please also read our [Code of Conduct](CODE_OF_CONDUCT.md).
158
+
159
+ ## License
160
+
161
+ Apache License 2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1,66 @@
1
+ compactbench/__init__.py,sha256=yy96evLm4t4W1B0tE6RyCp2LiHemSZ7C_k0p9HRJLBc,331
2
+ compactbench/__main__.py,sha256=sTc_m9ZBAu0Ka-cqYoGjMqErPk4Qjt0u2QlWoiFr48U,122
3
+ compactbench/cli.py,sha256=sMA78No4vp9hEH-q2sUurenN8C-jRuM4ItV_KEq5uow,11932
4
+ compactbench/config.py,sha256=HZ-UgldG1QI9BRLUdei9KY2tjAjNiJ1Mo54Uj9uwa0s,991
5
+ compactbench/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ compactbench/compactors/__init__.py,sha256=1G0l2zLaZCDeWZquJMSKvUwoiA8st3lpSZklYUj5ipE,1651
7
+ compactbench/compactors/_state_parser.py,sha256=uySxbWVVgHfrjRokoHGYtXsg_m_L6AanCsEDCcu8ZyM,4214
8
+ compactbench/compactors/_utils.py,sha256=LsGqf3DiQy9Zx59oZ03faC3aZoZLn4ZmPtoK_YkmCLU,1172
9
+ compactbench/compactors/base.py,sha256=E-S1_6d8QYP3YtHZUPsh6RaSTJiVHJUgztAegsF2fKg,1159
10
+ compactbench/compactors/errors.py,sha256=8ro5IJ_Co1K8eT1vcYQSaHyztcheJ0kEpWZKFJNARgk,268
11
+ compactbench/compactors/hierarchical_summary.py,sha256=RXWhGvqN-fI_Xl7JTKQvbZ0Ai97wUCge6cRF--ffTnw,4183
12
+ compactbench/compactors/hybrid_ledger.py,sha256=Pa2htHpv0LFzH_XiPgeVp4UJsHS-ci5j-Hz57ZcImCM,4498
13
+ compactbench/compactors/naive_summary.py,sha256=dTKcefVbemKgcsRUetH57dcsKyaKng70hjt-LF4gwcM,1946
14
+ compactbench/compactors/structured_state.py,sha256=4WAXPs0qxBqlDVV4bWd06765jll32RksZiTsRlJ1eIU,2525
15
+ compactbench/contracts/__init__.py,sha256=ztBSXFuC8rwpj8izJ9Fzh3zWChocSx_dUJ3k-FjUoeY,808
16
+ compactbench/contracts/artifact.py,sha256=Ptkazeaf75vcoVj84K-Irsorft7cF8cFLvErysCcLzs,1968
17
+ compactbench/contracts/case.py,sha256=SuTHecqTQXgeBZ32HE-McMAyWirlulUctkn8871n9Cg,2249
18
+ compactbench/contracts/result.py,sha256=k1d9XAElvgGUaFSSsvBt1vL8PPZ9g1BDkdRYehEchZI,2170
19
+ compactbench/dsl/__init__.py,sha256=VbQSE4f86tmfsr0J-gpkERuU9kRcS4vC5eMfXadyWNc,1593
20
+ compactbench/dsl/errors.py,sha256=4ItX89ApGNzw-rZa-sWR5K1mgn90hs796HyHylO7Kvc,645
21
+ compactbench/dsl/generators.py,sha256=Oyuaoqw2uN06y60xWUdOepkYJoNrt8pnpZnBrucEhXU,6522
22
+ compactbench/dsl/models.py,sha256=J2LoUxc7fPQDOdj5rKnpRbQA2erIwkQsUH60dHRopFs,3725
23
+ compactbench/dsl/parser.py,sha256=hnTZBE43lcOjvkqbinqEcoQy2TdW7OmDRiWutfJBVoY,2181
24
+ compactbench/dsl/substitution.py,sha256=fsPetd_exueZQo17Rh2Eh_5GThtc5mOjtonI_AC2P54,993
25
+ compactbench/dsl/validator.py,sha256=skzGBSGrBNdSoVaJdXw1u-DaMdD1zOWATkqtQQP6gdw,3687
26
+ compactbench/engine/__init__.py,sha256=RTXXegC2Ld7h4ar--LL5-ZR-16Db__jRqyeu6GIxuk8,848
27
+ compactbench/engine/difficulty.py,sha256=QuJtsmB6-b2L-X4bZvQIbGbzC2w55VJeMFyGTXcM3CM,2217
28
+ compactbench/engine/distractors.py,sha256=hJW2iaMvg4lTy9E6wd6ZI_ImiO_-pT8Nq_rhskWNME0,2822
29
+ compactbench/engine/errors.py,sha256=ztwn1f3N6Ea8h6J0fcr9xfBo2-6or3nU49PmAEQn99g,296
30
+ compactbench/engine/generation.py,sha256=HPJQ7_PFD7bAz4NAQ7oemFxHeeYpfJZcN5dEBF01K5A,3347
31
+ compactbench/engine/seeds.py,sha256=Etl9lUOJUEUs0gLi8HA2USap8HDuoG8sVqMdY-U3lDo,1077
32
+ compactbench/engine/transcript.py,sha256=E1n_sa97sGDPHdVPd1l4aHbjiwLHYOYD-KDiBApKRDs,2775
33
+ compactbench/leaderboard/__init__.py,sha256=2Pt_iEjklbsWhTC2KrAaRifOKQvA7w_9MbG0mBaQrFY,928
34
+ compactbench/leaderboard/errors.py,sha256=ocTZgjQ4lw24cGmgsL7GeUOKxpg9omzvT0LeOgxNA6g,301
35
+ compactbench/leaderboard/projection.py,sha256=LrNe6lhQY_fd_37Co6m3AQTwgaCBLc8ITF7HFmHPe4Y,3346
36
+ compactbench/leaderboard/qualification.py,sha256=AsKsgChnS_12Ck-tUCPI-9WTJ40i2NcvGKEQ9dhsf3A,3174
37
+ compactbench/leaderboard/ranking.py,sha256=5Am6nI07jhKFCz24kiIKtdRP9wIxUCBg0T7LN4oV9as,1999
38
+ compactbench/providers/__init__.py,sha256=NxHWrpsjxLIyu_ZwozykVAjGE2DnbJBfVYmUT_hrDys,1453
39
+ compactbench/providers/_retry.py,sha256=YWcAsCtTPx42q79AQeS3yFf88doXCYDd5X3DUmG_doo,1593
40
+ compactbench/providers/base.py,sha256=8Fd7-Wh1GZhWM88-6POQ7u6u5D3rckDU7LmJ5bkbbNY,1179
41
+ compactbench/providers/errors.py,sha256=tMlk2iO1fGg3ITx1imnFx9TXz5LyujgFBMY6k9DulmM,361
42
+ compactbench/providers/google_ai_studio.py,sha256=YJpaAvZuO-SOnGtlCX6FA8HJJNU8tySv_yd60IvixT8,4072
43
+ compactbench/providers/groq.py,sha256=Lu_GaXVU0sFiK4Ykie0p-ypGXWcrITdJQ3v1UnVUyzw,3201
44
+ compactbench/providers/mock.py,sha256=_j5JB4-H6My-mFeKZF6VYcjg_Z6_z73kqn1Va03UUaY,1741
45
+ compactbench/providers/ollama.py,sha256=AHgHZ1k-EdSVuCQpPUoiF0BLZEgGNLm6xljR3yjknNg,3335
46
+ compactbench/runner/__init__.py,sha256=-JMZx4Px5maeC-mbfO6_jBhC7D_pzTX3tXLE3okFxPw,1482
47
+ compactbench/runner/_resolver.py,sha256=-OfZm6sln2dQiie536heQtEPq3kA27SIe_-bh2P8CPQ,2208
48
+ compactbench/runner/continuation.py,sha256=1DeUuSWrpPTo5sWj_wC_XP12hmAVBs53UEJghrGRfTw,2961
49
+ compactbench/runner/cycle.py,sha256=5_bcm-FwqBdxllokzG2tneLcxSBrdbJaMwQxhlg_hos,2147
50
+ compactbench/runner/errors.py,sha256=geajRtaHZcFaJPg2M5M6IjTpg7WHXsO3GuihuvUb72U,378
51
+ compactbench/runner/evaluation.py,sha256=cxkbciv3ARFz81724xzalYoOHC7PSTDC4_1cySS1MsQ,2753
52
+ compactbench/runner/persistence.py,sha256=PZEAyG8Dt0NSnMzzombuZ9oez6Ssd_BmI5xWdSRfQsY,7619
53
+ compactbench/runner/run.py,sha256=uO57MTigZ8qYiFvnto5NMshS8RujMxBrB9Mhdg3Uaco,9221
54
+ compactbench/scoring/__init__.py,sha256=xWVUGhlFUWMIGGBD9jEhJw7wIPPud9QrGNll-jQGUVU,1160
55
+ compactbench/scoring/checks.py,sha256=6cat2j--d81haSW_bnUZ_Qyq2BGz3zEKAeU4V4Ct0wk,3409
56
+ compactbench/scoring/compression.py,sha256=CUuyKigmPQZvNYcQzGpw2FIry6OYywVAcZUJxS5rDl4,2093
57
+ compactbench/scoring/contradictions.py,sha256=UJ4et4R9bGnacW9icmhOj36ZrBLBieC0e8cbO_73Epk,2321
58
+ compactbench/scoring/drift.py,sha256=QIojDpIzQslqv3-PWGYSqTAzqMk_wuSeMB3ROSaljLE,1046
59
+ compactbench/scoring/errors.py,sha256=q8TAmpA2sd-iCoFkNSfgLIyuEgkTElB7tCW9oBpzjpc,178
60
+ compactbench/scoring/scorer.py,sha256=raZtOaEqCcFz_HXEdLdlKjlWX2pshLlCRITXyqTq7OM,2600
61
+ compactbench/utils/__init__.py,sha256=pzFTnstU9bxh94HLoXoWdKkntFLgBdH5tzmXBpF5VBY,63
62
+ compactbench-0.1.0.dist-info/METADATA,sha256=uEm4yxpW1Gh3QQEiZIL4p1sR4Zw4UaEJBELRHPTAs9E,6438
63
+ compactbench-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
64
+ compactbench-0.1.0.dist-info/entry_points.txt,sha256=Cvps65fFddWZs27nlz_uOKnrznvihEOUu5i1incR07E,54
65
+ compactbench-0.1.0.dist-info/licenses/LICENSE,sha256=9Rsyr51uyAHwgJJRfBV_mDtcUzzJ6ZefD8oCyuRN1YM,11323
66
+ compactbench-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ compactbench = compactbench.cli:app
@@ -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 Additional Liability. 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 additional liability.
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 CompactBench contributors
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.