eval-framework 0.2.7__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 (170) hide show
  1. eval_framework/__init__.py +7 -0
  2. eval_framework/base_config.py +36 -0
  3. eval_framework/context/__init__.py +0 -0
  4. eval_framework/context/determined.py +177 -0
  5. eval_framework/context/eval.py +121 -0
  6. eval_framework/context/local.py +78 -0
  7. eval_framework/evaluation_generator.py +234 -0
  8. eval_framework/exceptions.py +2 -0
  9. eval_framework/external/ifeval_impl/README.md +5 -0
  10. eval_framework/external/ifeval_impl/instructions.py +1523 -0
  11. eval_framework/external/ifeval_impl/instructions_registry.py +161 -0
  12. eval_framework/external/ifeval_impl/instructions_util.py +1689 -0
  13. eval_framework/external/ifeval_impl/utils.py +135 -0
  14. eval_framework/llm/__init__.py +0 -0
  15. eval_framework/llm/aleph_alpha.py +432 -0
  16. eval_framework/llm/base.py +180 -0
  17. eval_framework/llm/huggingface.py +418 -0
  18. eval_framework/llm/mistral.py +88 -0
  19. eval_framework/llm/models.py +28 -0
  20. eval_framework/llm/openai.py +400 -0
  21. eval_framework/llm/vllm.py +554 -0
  22. eval_framework/logger.py +3 -0
  23. eval_framework/main.py +166 -0
  24. eval_framework/metrics/__init__.py +0 -0
  25. eval_framework/metrics/base.py +40 -0
  26. eval_framework/metrics/completion/__init__.py +1 -0
  27. eval_framework/metrics/completion/accuracy_completion.py +16 -0
  28. eval_framework/metrics/completion/aidanbench.py +28 -0
  29. eval_framework/metrics/completion/bleu.py +76 -0
  30. eval_framework/metrics/completion/chrf.py +62 -0
  31. eval_framework/metrics/completion/code_assertion.py +44 -0
  32. eval_framework/metrics/completion/code_execution_pass_at_one.py +126 -0
  33. eval_framework/metrics/completion/comet.py +56 -0
  34. eval_framework/metrics/completion/concordance_index.py +38 -0
  35. eval_framework/metrics/completion/csv_format.py +102 -0
  36. eval_framework/metrics/completion/cwe_accuracy.py +49 -0
  37. eval_framework/metrics/completion/exponential_similarity.py +65 -0
  38. eval_framework/metrics/completion/f1.py +42 -0
  39. eval_framework/metrics/completion/format_checker.py +56 -0
  40. eval_framework/metrics/completion/grid_difference.py +77 -0
  41. eval_framework/metrics/completion/ifeval.py +73 -0
  42. eval_framework/metrics/completion/json_format.py +179 -0
  43. eval_framework/metrics/completion/language_checker.py +74 -0
  44. eval_framework/metrics/completion/length_control.py +83 -0
  45. eval_framework/metrics/completion/math_reasoning_completion.py +307 -0
  46. eval_framework/metrics/completion/niah_accuracy.py +163 -0
  47. eval_framework/metrics/completion/placeholder_checker.py +27 -0
  48. eval_framework/metrics/completion/repetition.py +88 -0
  49. eval_framework/metrics/completion/rouge_1.py +35 -0
  50. eval_framework/metrics/completion/rouge_2.py +45 -0
  51. eval_framework/metrics/completion/rouge_geometric_mean.py +36 -0
  52. eval_framework/metrics/completion/rouge_l.py +52 -0
  53. eval_framework/metrics/completion/struct_eval_metrics.py +248 -0
  54. eval_framework/metrics/completion/ter.py +67 -0
  55. eval_framework/metrics/completion/text_counter.py +182 -0
  56. eval_framework/metrics/efficiency/__init__.py +0 -0
  57. eval_framework/metrics/efficiency/bytes_per_sequence_position.py +48 -0
  58. eval_framework/metrics/llm/__init__.py +0 -0
  59. eval_framework/metrics/llm/base.py +34 -0
  60. eval_framework/metrics/llm/graders/chatbot_style_grader.py +92 -0
  61. eval_framework/metrics/llm/graders/coherence_grader.py +115 -0
  62. eval_framework/metrics/llm/graders/comparison_grader.py +198 -0
  63. eval_framework/metrics/llm/graders/conciseness_grader.py +93 -0
  64. eval_framework/metrics/llm/graders/contains_names_grader.py +71 -0
  65. eval_framework/metrics/llm/graders/format_correctness_grader.py +109 -0
  66. eval_framework/metrics/llm/graders/instruction_grader.py +177 -0
  67. eval_framework/metrics/llm/graders/language.py +56 -0
  68. eval_framework/metrics/llm/graders/long_context_grader.py +72 -0
  69. eval_framework/metrics/llm/graders/models.py +74 -0
  70. eval_framework/metrics/llm/graders/refusal_grader.py +57 -0
  71. eval_framework/metrics/llm/graders/sql_quality_grader.py +145 -0
  72. eval_framework/metrics/llm/graders/summary_world_knowledge_grader.py +103 -0
  73. eval_framework/metrics/llm/llm_judge_chatbot_style.py +36 -0
  74. eval_framework/metrics/llm/llm_judge_coherence.py +44 -0
  75. eval_framework/metrics/llm/llm_judge_completion_accuracy.py +39 -0
  76. eval_framework/metrics/llm/llm_judge_conciseness.py +37 -0
  77. eval_framework/metrics/llm/llm_judge_contains_names.py +36 -0
  78. eval_framework/metrics/llm/llm_judge_format_correctness.py +43 -0
  79. eval_framework/metrics/llm/llm_judge_instruction.py +58 -0
  80. eval_framework/metrics/llm/llm_judge_mtbench_pair.py +306 -0
  81. eval_framework/metrics/llm/llm_judge_mtbench_single.py +210 -0
  82. eval_framework/metrics/llm/llm_judge_refusal.py +35 -0
  83. eval_framework/metrics/llm/llm_judge_sql.py +394 -0
  84. eval_framework/metrics/llm/llm_judge_world_knowledge.py +37 -0
  85. eval_framework/metrics/llm/utils.py +20 -0
  86. eval_framework/metrics/loglikelihood/__init__.py +0 -0
  87. eval_framework/metrics/loglikelihood/accuracy_loglikelihood.py +51 -0
  88. eval_framework/metrics/loglikelihood/base.py +50 -0
  89. eval_framework/metrics/loglikelihood/confidence_weighted_accuracy.py +25 -0
  90. eval_framework/metrics/loglikelihood/dcs.py +43 -0
  91. eval_framework/metrics/loglikelihood/probability_mass.py +53 -0
  92. eval_framework/metrics/loglikelihood/ternary.py +42 -0
  93. eval_framework/py.typed +0 -0
  94. eval_framework/response_generator.py +351 -0
  95. eval_framework/result_processors/__init__.py +0 -0
  96. eval_framework/result_processors/base.py +88 -0
  97. eval_framework/result_processors/hf_uploader.py +75 -0
  98. eval_framework/result_processors/result_processor.py +129 -0
  99. eval_framework/result_processors/wandb_uploader.py +137 -0
  100. eval_framework/run.py +369 -0
  101. eval_framework/run_direct.py +42 -0
  102. eval_framework/shared/types.py +227 -0
  103. eval_framework/tasks/__init__.py +6 -0
  104. eval_framework/tasks/base.py +392 -0
  105. eval_framework/tasks/benchmarks/__init__.py +0 -0
  106. eval_framework/tasks/benchmarks/aidanbench.py +211 -0
  107. eval_framework/tasks/benchmarks/arc.py +70 -0
  108. eval_framework/tasks/benchmarks/arc_de.py +46 -0
  109. eval_framework/tasks/benchmarks/arc_fi.py +46 -0
  110. eval_framework/tasks/benchmarks/belebele.py +60 -0
  111. eval_framework/tasks/benchmarks/bigcodebench.py +155 -0
  112. eval_framework/tasks/benchmarks/casehold.py +47 -0
  113. eval_framework/tasks/benchmarks/chembench.py +85 -0
  114. eval_framework/tasks/benchmarks/copa.py +64 -0
  115. eval_framework/tasks/benchmarks/duc.py +91 -0
  116. eval_framework/tasks/benchmarks/flores200.py +133 -0
  117. eval_framework/tasks/benchmarks/flores_plus.py +84 -0
  118. eval_framework/tasks/benchmarks/gpqa.py +201 -0
  119. eval_framework/tasks/benchmarks/gsm8k.py +150 -0
  120. eval_framework/tasks/benchmarks/hellaswag.py +69 -0
  121. eval_framework/tasks/benchmarks/hellaswag_de.py +52 -0
  122. eval_framework/tasks/benchmarks/humaneval.py +97 -0
  123. eval_framework/tasks/benchmarks/ifeval.py +78 -0
  124. eval_framework/tasks/benchmarks/include.py +119 -0
  125. eval_framework/tasks/benchmarks/infinitebench.py +302 -0
  126. eval_framework/tasks/benchmarks/math_reasoning.py +580 -0
  127. eval_framework/tasks/benchmarks/mbpp.py +192 -0
  128. eval_framework/tasks/benchmarks/mmlu.py +215 -0
  129. eval_framework/tasks/benchmarks/mmlu_de.py +109 -0
  130. eval_framework/tasks/benchmarks/mmlu_pro.py +164 -0
  131. eval_framework/tasks/benchmarks/mmmlu.py +529 -0
  132. eval_framework/tasks/benchmarks/openbookqa.py +85 -0
  133. eval_framework/tasks/benchmarks/opengptx_eu20.py +363 -0
  134. eval_framework/tasks/benchmarks/pawsx.py +65 -0
  135. eval_framework/tasks/benchmarks/piqa.py +64 -0
  136. eval_framework/tasks/benchmarks/quality.py +56 -0
  137. eval_framework/tasks/benchmarks/sciq.py +110 -0
  138. eval_framework/tasks/benchmarks/sphyr.py +79 -0
  139. eval_framework/tasks/benchmarks/squad.py +211 -0
  140. eval_framework/tasks/benchmarks/struct_eval.py +116 -0
  141. eval_framework/tasks/benchmarks/tablebench.py +117 -0
  142. eval_framework/tasks/benchmarks/triviaqa.py +42 -0
  143. eval_framework/tasks/benchmarks/truthfulqa.py +119 -0
  144. eval_framework/tasks/benchmarks/winogender.py +64 -0
  145. eval_framework/tasks/benchmarks/winogrande.py +69 -0
  146. eval_framework/tasks/benchmarks/winox.py +57 -0
  147. eval_framework/tasks/benchmarks/wmt.py +160 -0
  148. eval_framework/tasks/benchmarks/zero_scrolls.py +197 -0
  149. eval_framework/tasks/eval_config.py +136 -0
  150. eval_framework/tasks/perturbation.py +83 -0
  151. eval_framework/tasks/registry.py +186 -0
  152. eval_framework/tasks/task_loader.py +81 -0
  153. eval_framework/tasks/task_names.py +324 -0
  154. eval_framework/tasks/utils.py +584 -0
  155. eval_framework/utils/constants.py +9 -0
  156. eval_framework/utils/file_ops.py +245 -0
  157. eval_framework/utils/generate_task_docs.py +244 -0
  158. eval_framework/utils/helpers.py +32 -0
  159. eval_framework/utils/logging.py +62 -0
  160. eval_framework/utils/packaging.py +52 -0
  161. eval_framework/utils/tqdm_handler.py +14 -0
  162. eval_framework-0.2.7.dist-info/METADATA +548 -0
  163. eval_framework-0.2.7.dist-info/RECORD +170 -0
  164. eval_framework-0.2.7.dist-info/WHEEL +4 -0
  165. eval_framework-0.2.7.dist-info/entry_points.txt +3 -0
  166. template_formatting/README.md +83 -0
  167. template_formatting/__init__.py +0 -0
  168. template_formatting/formatter.py +537 -0
  169. template_formatting/mistral_formatter.py +159 -0
  170. template_formatting/py.typed +0 -0
@@ -0,0 +1,548 @@
1
+ Metadata-Version: 2.3
2
+ Name: eval-framework
3
+ Version: 0.2.7
4
+ Summary: Evalulation Framework
5
+ Author: Aleph Alpha Research
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright 2025 Aleph Alpha Research GmbH
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
207
+ Classifier: Operating System :: OS Independent
208
+ Classifier: License :: OSI Approved :: Apache Software License
209
+ Classifier: Programming Language :: Python
210
+ Classifier: Programming Language :: Python :: 3.12
211
+ Classifier: Programming Language :: Python :: 3 :: Only
212
+ Classifier: Topic :: Software Development :: Libraries
213
+ Classifier: Typing :: Typed
214
+ Requires-Dist: pyyaml>=6.0.1,<7
215
+ Requires-Dist: xmltodict>=0.13.0,<0.16
216
+ Requires-Dist: pydantic>=2.7,<3
217
+ Requires-Dist: datasets>=2.19.1,<4
218
+ Requires-Dist: sacrebleu>=2.4.3,<3
219
+ Requires-Dist: pycountry>=24.6.1,<25
220
+ Requires-Dist: nltk>=3.9.1,<4
221
+ Requires-Dist: python-dotenv>=1.0.1,<2
222
+ Requires-Dist: lingua-language-detector>=2.0.2,<3
223
+ Requires-Dist: google-crc32c>=1.5.0,<2
224
+ Requires-Dist: kubernetes>=31.0.0,<32
225
+ Requires-Dist: langdetect>=1.0.9,<2
226
+ Requires-Dist: spacy>=3.8.3,<4
227
+ Requires-Dist: jsonschema>=4.23.0,<5
228
+ Requires-Dist: mysql-connector-python>=9.0.0,<10
229
+ Requires-Dist: psycopg2-binary>=2.9.9,<3
230
+ Requires-Dist: sympy>=1.13.1,<2
231
+ Requires-Dist: llm-sandbox[docker]>=0.1.8,<0.2
232
+ Requires-Dist: jsonlines>=4,<5
233
+ Requires-Dist: lxml>=6,<7
234
+ Requires-Dist: python-iso639>=2025.2.18
235
+ Requires-Dist: wandb>=0.23.0,<1
236
+ Requires-Dist: boto3>=1.40.54,<2
237
+ Requires-Dist: numpy>=1.26.4
238
+ Requires-Dist: accelerate ; extra == 'accelerate'
239
+ Requires-Dist: eval-framework[determined,api,openai,transformers,accelerate,vllm,comet,optional,mistral] ; extra == 'all'
240
+ Requires-Dist: aleph-alpha-client>=10,<11 ; extra == 'api'
241
+ Requires-Dist: unbabel-comet>=2.2.6,<3 ; extra == 'comet'
242
+ Requires-Dist: determined>=0.38,<0.39 ; extra == 'determined'
243
+ Requires-Dist: tensorboard==2.19.0 ; extra == 'determined'
244
+ Requires-Dist: mistral-common>=1.7,<2 ; extra == 'mistral'
245
+ Requires-Dist: huggingface-hub>=0.33.2,<0.34 ; extra == 'mistral'
246
+ Requires-Dist: eval-framework[vllm] ; extra == 'mistral'
247
+ Requires-Dist: openai>=1.62,<2.8 ; extra == 'openai'
248
+ Requires-Dist: tiktoken>=0.9,<0.10 ; extra == 'openai'
249
+ Requires-Dist: transformers>=4.45.2,<5 ; extra == 'openai'
250
+ Requires-Dist: transformers>=4.45.2,<5 ; extra == 'optional'
251
+ Requires-Dist: jinja2>=3.1.6,<4 ; extra == 'optional'
252
+ Requires-Dist: transformers>=4.45.2,<5 ; extra == 'transformers'
253
+ Requires-Dist: torch>=2.5,<3 ; extra == 'transformers'
254
+ Requires-Dist: accelerate>=0.30.0,<1 ; extra == 'transformers'
255
+ Requires-Dist: vllm>=0.8.5,<0.9 ; extra == 'vllm'
256
+ Requires-Dist: torch>=2.5,<3 ; extra == 'vllm'
257
+ Requires-Python: >=3.12, <3.13
258
+ Project-URL: repository, https://github.com/Aleph-Alpha-Research/eval-framework
259
+ Provides-Extra: accelerate
260
+ Provides-Extra: all
261
+ Provides-Extra: api
262
+ Provides-Extra: comet
263
+ Provides-Extra: determined
264
+ Provides-Extra: mistral
265
+ Provides-Extra: openai
266
+ Provides-Extra: optional
267
+ Provides-Extra: transformers
268
+ Provides-Extra: vllm
269
+ Description-Content-Type: text/markdown
270
+
271
+ <!-- Badges -->
272
+ <div align="center">
273
+
274
+ # Aleph Alpha Eval-Framework
275
+
276
+ **Comprehensive LLM evaluation at scale** - A production-ready framework for evaluating large language models across 90+ benchmarks.
277
+
278
+ [![Build Status](https://github.com/Aleph-Alpha-Research/eval-framework/actions/workflows/tests.yml/badge.svg)](https://github.com/Aleph-Alpha-Research/eval-framework/actions)
279
+ [![Version](https://img.shields.io/github/v/release/Aleph-Alpha-Research/eval-framework)](https://github.com/Aleph-Alpha-Research/eval-framework/releases)
280
+ [![PyPI](https://img.shields.io/pypi/v/eval-framework.svg)](https://pypi.org/project/eval-framework/)
281
+ [![License](https://img.shields.io/github/license/Aleph-Alpha-Research/eval-framework.svg)](LICENSE)
282
+
283
+ [![Docs](https://img.shields.io/badge/docs-online-blue)](https://aleph-alpha-research.github.io/eval-framework/)
284
+ [![Stars](https://img.shields.io/github/stars/Aleph-Alpha-Research/eval-framework)](https://github.com/Aleph-Alpha-Research/eval-framework/stargazers)
285
+
286
+ ![eval-framework](docs/eval-framework.png "https://raw.githubusercontent.com/Aleph-Alpha-Research/eval-framework/refs/heads/main/docs/eval-framework.png")
287
+
288
+ </div>
289
+
290
+ ## Why Choose This Framework?
291
+
292
+ - **Scalability**: Built for distributed evaluation. Currently providing an integration with Determined AI.
293
+ - **Extensibility**: Easily add custom models, benchmarks, and metrics with object-oriented base classes.
294
+ - **Comprehensive**: Comes pre-loaded with over 90 tasks covering a broad and diverse range, from reasoning and coding to safety and long-context. Also comes with a comprehensive set of metrics, including LLM-as-a-judge evaluations.
295
+
296
+ ## Other features
297
+
298
+ - Flexible Model Integration: Supports models loaded via HuggingFace Transformers or custom implementations using the BaseLLM class.
299
+ - Custom Benchmarks: Easily add new benchmarks with minimal code using the BaseTask class.
300
+ - Custom Metrics: Easily define new metrics using the BaseMetric class.
301
+ - Perturbation Testing: Robustness analysis with configurable perturbation types and probabilities.
302
+ - Rich Outputs: Generates JSON results, plots, and detailed analysis reports.
303
+ - Statistical Analysis: Includes confidence intervals and significance testing for reliable comparisons.
304
+ - Docker Support: Pre-configured Dockerfiles for local and distributed setups.
305
+
306
+ For full documentation, visit our [Docs Page](https://aleph-alpha-research.github.io/eval-framework/).
307
+
308
+ ## Quick Start
309
+
310
+ The codebase is tested and compatible with Python 3.12 and PyTorch 2.5.
311
+ You will also need the appropriate CUDA dependencies and version installed on your system for GPU support. Detailed installation instructions can be found [here](https://aleph-alpha-research.github.io/eval-framework/installation.html).
312
+
313
+ The easiest way to get started is by installing the library via `pip` and use it as an external dependency.
314
+ ```
315
+ pip install eval_framework
316
+ ```
317
+
318
+ There are optional extras available to unlock specific features of the library:
319
+ - `api` for inference using the aleph-alpha client.
320
+ - `comet` for the COMET metric.
321
+ - `determined` for running jobs via determined.
322
+ - `mistral` for inference on Mistral models.
323
+ - `transformers` for inference using the transformers library.
324
+ - `vllm` for inference via VLLM.
325
+
326
+ As a short hand, the `all` extra installs all of the above.
327
+
328
+ We use `uv` to better resolve dependencies when downloading the extras. You can install uv with:
329
+ ```bash
330
+ curl -LsSf https://astral.sh/uv/install.sh | sh
331
+ ```
332
+ or by follwing the `uv` [installation docs.](https://docs.astral.sh/uv/getting-started/installation/)
333
+
334
+ Now, you can safely install the project with all optional extras:
335
+ ```bash
336
+ uv sync --all-extras
337
+ ```
338
+ or with pip
339
+ ```bash
340
+ uv pip install eval_framework[all]
341
+ ```
342
+
343
+ Tip: ensure python is properly installed with uv:
344
+ ```
345
+ uv python install 3.12 --reinstall
346
+ ```
347
+
348
+ We provide custom groups to control optional extras.
349
+ - `flash_attn`: Install `flash_attn` with correct handling of build isolation
350
+
351
+ Thus, the following will setup the project with `flash_attn`
352
+ ```bash
353
+ uv sync --all-extras --group flash_attn
354
+ ```
355
+
356
+ To evaluate a single benchmark locally, you can use the following command:
357
+
358
+ ```bash
359
+ eval_framework \
360
+ --models src/eval_framework/llm/models.py \
361
+ --llm-name Smollm135MInstruct \
362
+ --task-name "MMLU" \
363
+ --task-subjects "abstract_algebra" \
364
+ --output-dir ./eval_results \
365
+ --num-fewshot 5 \
366
+ --num-samples 10
367
+ ```
368
+
369
+ For more detailed CLI usage instructions, see the [CLI Usage Guide](https://aleph-alpha-research.github.io/eval-framework/cli_usage.html).
370
+
371
+ ## Benchmark Coverage & Task Categories
372
+
373
+ ### Core Capabilities
374
+
375
+ Subset of core capabilities benchmarks coverd by `eval-framework`:
376
+
377
+ | **Reasoning** | **Knowledge** | **Math** | **Coding** | **Structured outputs** | **Long Context** |
378
+ |---------------|---------------|----------|------------|------------------------|------------------|
379
+ | COPA | ARC | AIME | BigCodeBench | IFEval | InfiniteBench |
380
+ | Hellaswag | MMLU | GSM8K | HumanEval | StructEval | QUALITY |
381
+ | Winogrande | Openbook QA| MATH-500 | MBPP | | ZeroSCROLLS |
382
+
383
+
384
+ ### Languages & Domains
385
+
386
+ Subset of language-specific and domain-specific benchmarks coverd by `eval-framework`:
387
+
388
+ | **Multilingual** | **Specialized** | **Safety & Bias** | **Efficiency Metrics** |
389
+ |------------------|-----------------|-------------------|----------------|
390
+ | WMT Translation | MMLU | TruthfulQA | Compression ratios |
391
+ | FLORES-200 | Legal (CaseHold) | Winogender | Runtime |
392
+ | Multilingual MMLU | Scientific (SciQ) | | |
393
+ | German/Finnish tasks | | | |
394
+
395
+ ### Completion
396
+
397
+ Tasks focused on logical reasoning, text distillation, instruction following, and output control. Examples include:
398
+ - **AIME 2024:** Logical Reasoning (Math)
399
+ - **DUC Abstractive:** Text Distillation (Extraction)
400
+ - **Custom Data: Complaint Summarization:** Text Distillation (Summarization)
401
+
402
+ ### Loglikelihoods
403
+
404
+ Tasks emphasizing classification, reasoning, and open QA. Examples include:
405
+ - **Abstract Reasoning Challenge (ARC):** Classification
406
+ - **Casehold:** Open QA
407
+
408
+ ### Long-Context
409
+
410
+ Tasks designed for long-context scenarios, including QA, summarization, and aggregation. Examples include:
411
+ - **InfiniteBench_CodeDebug:** Programming
412
+ - **ZeroSCROLLS GovReport:** QA (Government)
413
+
414
+ ### Metrics
415
+
416
+ Evaluation metrics include:
417
+ - **Completion Metrics:** Accuracy, Bleu, F1, Rouge
418
+ - **Loglikelihood Metrics:** Accuracy Loglikelihood, Probability Mass
419
+ - **LLM Metrics:** Chatbot Style Judge, Instruction Judge
420
+ - **Efficiency Metrics:** Bytes per Sequence Position
421
+
422
+ For the full list of tasks and metrics, see [Detailed Task Table](https://aleph-alpha-research.github.io/eval-framework/benchmarks_and_metrics.html).
423
+
424
+ ## Getting Started
425
+
426
+ ### Understanding the Evaluation Framework
427
+
428
+ Eval-Framework provides a unified interface for evaluating language models across diverse benchmarks. The framework follows this interaction model:
429
+
430
+ 1. **Define Your Model** - Specify which model to evaluate (HuggingFace, API, or custom)
431
+ 2. **Choose Your Task** - Select from 150+ available benchmarks or create custom ones
432
+ 3. **Configure Evaluation** - Set parameters like few-shot examples, sample count, and output format
433
+ 4. **Run Evaluation** - Execute locally via CLI/script or distribute via Determined AI
434
+ 5. **Analyze Results** - Review detailed JSON outputs, metrics, and generated reports
435
+
436
+ ### Core Components
437
+
438
+ - **Models**: Defined via [`BaseLLM`](https://aleph-alpha-research.github.io/eval-framework/evaluate_huggingface_model.html) interface (HuggingFace, OpenAI, custom APIs)
439
+ - **Tasks**: Inherit from [`BaseTask`](https://aleph-alpha-research.github.io/eval-framework/add_new_benchmark_guide.html) (completion, loglikelihood, or LLM-judge based)
440
+ - **Metrics**: Automatic scoring via [`BaseMetric`](https://aleph-alpha-research.github.io/eval-framework/benchmarks_and_metrics.html) classes
441
+ - **Formatters**: Handle prompt construction and model-specific formatting
442
+ - **Results**: Structured outputs with sample-level details and aggregated statistics
443
+
444
+ ### Your First Evaluation
445
+
446
+ 1. **Install the framework** (see Quick Start above)
447
+ ```
448
+ pip install eval_framework[transformers]
449
+ ```
450
+
451
+ 2. **Create and run your first evaluation using HuggingFace model**:
452
+
453
+ ```python
454
+ from functools import partial
455
+ from pathlib import Path
456
+
457
+ from eval_framework.llm.huggingface import HFLLM
458
+ from eval_framework.main import main
459
+ from eval_framework.tasks.eval_config import EvalConfig
460
+ from template_formatting.formatter import HFFormatter
461
+
462
+ # Define your model
463
+ class MyHuggingFaceModel(HFLLM):
464
+ LLM_NAME = "microsoft/DialoGPT-medium"
465
+ DEFAULT_FORMATTER = partial(HFFormatter, "microsoft/DialoGPT-medium")
466
+
467
+ if __name__ == "__main__":
468
+ # Initialize your model
469
+ llm = MyHuggingFaceModel()
470
+
471
+ # Running evaluation on MMLU abstract algebra task using 5 few-shot examples and 10 samples
472
+ config = EvalConfig(
473
+ output_dir=Path("./eval_results"),
474
+ num_fewshot=5,
475
+ num_samples=10,
476
+ task_name="MMLU",
477
+ task_subjects=["abstract_algebra", "astronomy"],
478
+ llm_class=MyHuggingFaceModel,
479
+ )
480
+
481
+ # Run evaluation and get results
482
+ results = main(llm=llm, config=config)
483
+ ```
484
+
485
+ 3. **Review results** - Check `./eval_results/` for detailed outputs and use our [results guide](https://aleph-alpha-research.github.io/eval-framework/understanding_results_guide.html) to interpret them
486
+
487
+ ### Next Steps
488
+
489
+ - **Use CLI interface**: See [CLI usage guide](https://aleph-alpha-research.github.io/eval-framework/cli_usage.html) for command-line evaluation options
490
+ - **Evaluate HuggingFace models**: Follow our [HuggingFace evaluation guide](https://aleph-alpha-research.github.io/eval-framework/evaluate_huggingface_model.html)
491
+ - **Understand model arguments**: Read out [Model Arguments guide](https://aleph-alpha-research.github.io/eval-framework/model_arguments.html)
492
+ - **Create custom benchmarks**: Follow our [benchmark creation guide](https://aleph-alpha-research.github.io/eval-framework/add_new_benchmark_guide.html)
493
+ - **Scale your evaluations**: Use [Determined AI integration](https://aleph-alpha-research.github.io/eval-framework/using_determined.html) for distributed evaluation
494
+ - **Understand your results**: Read our [results interpretation guide](https://aleph-alpha-research.github.io/eval-framework/understanding_results_guide.html)
495
+ - **Log results in WandB**: See how [we integrate WandB](https://aleph-alpha-research.github.io/eval-framework/wandb_integration.html) for metric and lineage tracking
496
+
497
+ ## Documentation
498
+
499
+ ### Getting Started
500
+
501
+ - **[CLI Usage Guide](https://aleph-alpha-research.github.io/eval-framework/cli_usage.html)** - Detailed instructions for using the command-line interface
502
+ - **[Evaluating HuggingFace Models](https://aleph-alpha-research.github.io/eval-framework/evaluate_huggingface_model.html)** - Complete guide for evaluating HuggingFace models
503
+ - **[Understanding Results](https://aleph-alpha-research.github.io/eval-framework/understanding_results_guide.html)** - How to read and interpret evaluation results
504
+
505
+ ### Advanced Usage
506
+
507
+ - **[Understanding Model Arguments](https://aleph-alpha-research.github.io/eval-framework/model_arguments.html)** - Thorough guide on each constructor argument for salient model classes
508
+ - **[Adding New Benchmarks](https://aleph-alpha-research.github.io/eval-framework/add_new_benchmark_guide.html)** - Complete guide with practical examples for adding new benchmarks
509
+ - **[Benchmarks and Metrics](https://aleph-alpha-research.github.io/eval-framework/benchmarks_and_metrics.html)** - Comprehensive overview of all available benchmarks and evaluation metrics
510
+ - **[Overview of Dataloading](https://aleph-alpha-research.github.io/eval-framework/overview_dataloading.html)** - Explanation of dataloading and task/sample/message structure
511
+
512
+ ### Scaling & Production
513
+
514
+ - **[Using Determined](https://aleph-alpha-research.github.io/eval-framework/using_determined.html)** - Guide for distributed evaluation using Determined AI
515
+ - **[Controlling Upload Results](https://aleph-alpha-research.github.io/eval-framework/controlling_upload_results.html)** - How to manage and control the upload of evaluation results
516
+
517
+ ### Contributing
518
+
519
+ - **[Contributing Guide](https://aleph-alpha-research.github.io/eval-framework/CONTRIBUTING.html)** - Guide for contributing to this project
520
+ - **[Testing](https://aleph-alpha-research.github.io/eval-framework/testing.html)** - Guide for running tests comparable to the CI pipelines
521
+
522
+ ### Citation
523
+
524
+ If you use `eval-framework` in your research, please cite:
525
+
526
+ ```bibtex
527
+ @software{eval_framework,
528
+ title={Aleph Alpha Eval Framework},
529
+ year={2025},
530
+ url={https://github.com/Aleph-Alpha-Research/eval-framework}
531
+ }
532
+ ```
533
+
534
+ ### License
535
+
536
+ This project is licensed under the [Apache License 2.0](LICENSE).
537
+
538
+ <br><br>
539
+ ---
540
+
541
+ This project has received funding from the European Union’s Digital Europe Programme under grant agreement No. 101195233 (OpenEuroLLM).
542
+
543
+ The contents of this publication are the sole responsibility of the OpenEuroLLM consortium and do not necessarily reflect the opinion of the European Union.
544
+
545
+ <p align="center">
546
+ <img src="docs/OELLM_1.png" alt="https://raw.githubusercontent.com/Aleph-Alpha-Research/eval-framework/main/docs/OELLM_1.png" width="100" style="margin-right: 50px;"/>
547
+ <img src="docs/OELLM_2.png" alt="https://raw.githubusercontent.com/Aleph-Alpha-Research/eval-framework/main/docs/OELLM_2.png" width="350"/>
548
+ </p>