Text Classification
Transformers
ONNX
Safetensors
English
roberta
editlens
ai-detection
quantization
local-inference
text-embeddings-inference
Instructions to use CoderBak/editlens_roberta_modelkit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CoderBak/editlens_roberta_modelkit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CoderBak/editlens_roberta_modelkit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CoderBak/editlens_roberta_modelkit") model = AutoModelForSequenceClassification.from_pretrained("CoderBak/editlens_roberta_modelkit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Publish attributed EditLens model kit: FP32 default, FP16, experimental INT8
Browse filesDerived from pangram/editlens_roberta-large at f93e1ace74528cfb48f337ab2fe946fb71a728cb. Preserve CC BY-NC-SA 4.0, authorship, original checkpoint/tokenizer and model card. Include reproducible conversions, SHA-256 manifest, and numerical reports; disclose INT8 parity failure.
- .gitattributes +1 -33
- .gitignore +7 -0
- CITATION.bib +9 -0
- LICENSE +438 -0
- NOTICE +48 -0
- README.md +166 -0
- SHA256SUMS +32 -0
- config.json +41 -0
- examples/onnx_inference.py +55 -0
- manifest.json +279 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- onnx/model.onnx +3 -0
- onnx/model_fp16.onnx +3 -0
- onnx/model_int8.onnx +3 -0
- requirements-build.txt +13 -0
- requirements-runtime.txt +5 -0
- scripts/build.py +139 -0
- scripts/package.py +93 -0
- scripts/validate.py +85 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
- upstream/README.md +53 -0
- upstream/metadata.json +88 -0
- validation/fixtures.json +86 -0
- validation/fp16.json +168 -0
- validation/fp32.json +168 -0
- validation/int8.json +168 -0
- validation/reference.json +97 -0
- validation/reference.npz +3 -0
- validation/tokenizer.json +6 -0
- vocab.json +0 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,3 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.venv/
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.pyc
|
| 4 |
+
.DS_Store
|
| 5 |
+
.cache/
|
| 6 |
+
.env
|
| 7 |
+
*.log
|
CITATION.bib
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@misc{thai2025editlensquantifyingextentai,
|
| 2 |
+
title={EditLens: Quantifying the Extent of AI Editing in Text},
|
| 3 |
+
author={Katherine Thai and Bradley Emi and Elyas Masrour and Mohit Iyyer},
|
| 4 |
+
year={2025},
|
| 5 |
+
eprint={2510.03154},
|
| 6 |
+
archivePrefix={arXiv},
|
| 7 |
+
primaryClass={cs.CL},
|
| 8 |
+
url={https://arxiv.org/abs/2510.03154}
|
| 9 |
+
}
|
LICENSE
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Attribution-NonCommercial-ShareAlike 4.0 International
|
| 2 |
+
|
| 3 |
+
=======================================================================
|
| 4 |
+
|
| 5 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 6 |
+
does not provide legal services or legal advice. Distribution of
|
| 7 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 8 |
+
other relationship. Creative Commons makes its licenses and related
|
| 9 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 10 |
+
warranties regarding its licenses, any material licensed under their
|
| 11 |
+
terms and conditions, or any related information. Creative Commons
|
| 12 |
+
disclaims all liability for damages resulting from their use to the
|
| 13 |
+
fullest extent possible.
|
| 14 |
+
|
| 15 |
+
Using Creative Commons Public Licenses
|
| 16 |
+
|
| 17 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 18 |
+
conditions that creators and other rights holders may use to share
|
| 19 |
+
original works of authorship and other material subject to copyright
|
| 20 |
+
and certain other rights specified in the public license below. The
|
| 21 |
+
following considerations are for informational purposes only, are not
|
| 22 |
+
exhaustive, and do not form part of our licenses.
|
| 23 |
+
|
| 24 |
+
Considerations for licensors: Our public licenses are
|
| 25 |
+
intended for use by those authorized to give the public
|
| 26 |
+
permission to use material in ways otherwise restricted by
|
| 27 |
+
copyright and certain other rights. Our licenses are
|
| 28 |
+
irrevocable. Licensors should read and understand the terms
|
| 29 |
+
and conditions of the license they choose before applying it.
|
| 30 |
+
Licensors should also secure all rights necessary before
|
| 31 |
+
applying our licenses so that the public can reuse the
|
| 32 |
+
material as expected. Licensors should clearly mark any
|
| 33 |
+
material not subject to the license. This includes other CC-
|
| 34 |
+
licensed material, or material used under an exception or
|
| 35 |
+
limitation to copyright. More considerations for licensors:
|
| 36 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 37 |
+
|
| 38 |
+
Considerations for the public: By using one of our public
|
| 39 |
+
licenses, a licensor grants the public permission to use the
|
| 40 |
+
licensed material under specified terms and conditions. If
|
| 41 |
+
the licensor's permission is not necessary for any reason--for
|
| 42 |
+
example, because of any applicable exception or limitation to
|
| 43 |
+
copyright--then that use is not regulated by the license. Our
|
| 44 |
+
licenses grant only permissions under copyright and certain
|
| 45 |
+
other rights that a licensor has authority to grant. Use of
|
| 46 |
+
the licensed material may still be restricted for other
|
| 47 |
+
reasons, including because others have copyright or other
|
| 48 |
+
rights in the material. A licensor may make special requests,
|
| 49 |
+
such as asking that all changes be marked or described.
|
| 50 |
+
Although not required by our licenses, you are encouraged to
|
| 51 |
+
respect those requests where reasonable. More considerations
|
| 52 |
+
for the public:
|
| 53 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 54 |
+
|
| 55 |
+
=======================================================================
|
| 56 |
+
|
| 57 |
+
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
| 58 |
+
Public License
|
| 59 |
+
|
| 60 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 61 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 62 |
+
Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
| 63 |
+
("Public License"). To the extent this Public License may be
|
| 64 |
+
interpreted as a contract, You are granted the Licensed Rights in
|
| 65 |
+
consideration of Your acceptance of these terms and conditions, and the
|
| 66 |
+
Licensor grants You such rights in consideration of benefits the
|
| 67 |
+
Licensor receives from making the Licensed Material available under
|
| 68 |
+
these terms and conditions.
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
Section 1 -- Definitions.
|
| 72 |
+
|
| 73 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 74 |
+
Rights that is derived from or based upon the Licensed Material
|
| 75 |
+
and in which the Licensed Material is translated, altered,
|
| 76 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 77 |
+
permission under the Copyright and Similar Rights held by the
|
| 78 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 79 |
+
Material is a musical work, performance, or sound recording,
|
| 80 |
+
Adapted Material is always produced where the Licensed Material is
|
| 81 |
+
synched in timed relation with a moving image.
|
| 82 |
+
|
| 83 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 84 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 85 |
+
accordance with the terms and conditions of this Public License.
|
| 86 |
+
|
| 87 |
+
c. BY-NC-SA Compatible License means a license listed at
|
| 88 |
+
creativecommons.org/compatiblelicenses, approved by Creative
|
| 89 |
+
Commons as essentially the equivalent of this Public License.
|
| 90 |
+
|
| 91 |
+
d. Copyright and Similar Rights means copyright and/or similar rights
|
| 92 |
+
closely related to copyright including, without limitation,
|
| 93 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 94 |
+
Rights, without regard to how the rights are labeled or
|
| 95 |
+
categorized. For purposes of this Public License, the rights
|
| 96 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 97 |
+
Rights.
|
| 98 |
+
|
| 99 |
+
e. Effective Technological Measures means those measures that, in the
|
| 100 |
+
absence of proper authority, may not be circumvented under laws
|
| 101 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 102 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 103 |
+
agreements.
|
| 104 |
+
|
| 105 |
+
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 106 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 107 |
+
that applies to Your use of the Licensed Material.
|
| 108 |
+
|
| 109 |
+
g. License Elements means the license attributes listed in the name
|
| 110 |
+
of a Creative Commons Public License. The License Elements of this
|
| 111 |
+
Public License are Attribution, NonCommercial, and ShareAlike.
|
| 112 |
+
|
| 113 |
+
h. Licensed Material means the artistic or literary work, database,
|
| 114 |
+
or other material to which the Licensor applied this Public
|
| 115 |
+
License.
|
| 116 |
+
|
| 117 |
+
i. Licensed Rights means the rights granted to You subject to the
|
| 118 |
+
terms and conditions of this Public License, which are limited to
|
| 119 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 120 |
+
Licensed Material and that the Licensor has authority to license.
|
| 121 |
+
|
| 122 |
+
j. Licensor means the individual(s) or entity(ies) granting rights
|
| 123 |
+
under this Public License.
|
| 124 |
+
|
| 125 |
+
k. NonCommercial means not primarily intended for or directed towards
|
| 126 |
+
commercial advantage or monetary compensation. For purposes of
|
| 127 |
+
this Public License, the exchange of the Licensed Material for
|
| 128 |
+
other material subject to Copyright and Similar Rights by digital
|
| 129 |
+
file-sharing or similar means is NonCommercial provided there is
|
| 130 |
+
no payment of monetary compensation in connection with the
|
| 131 |
+
exchange.
|
| 132 |
+
|
| 133 |
+
l. Share means to provide material to the public by any means or
|
| 134 |
+
process that requires permission under the Licensed Rights, such
|
| 135 |
+
as reproduction, public display, public performance, distribution,
|
| 136 |
+
dissemination, communication, or importation, and to make material
|
| 137 |
+
available to the public including in ways that members of the
|
| 138 |
+
public may access the material from a place and at a time
|
| 139 |
+
individually chosen by them.
|
| 140 |
+
|
| 141 |
+
m. Sui Generis Database Rights means rights other than copyright
|
| 142 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 143 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 144 |
+
as amended and/or succeeded, as well as other essentially
|
| 145 |
+
equivalent rights anywhere in the world.
|
| 146 |
+
|
| 147 |
+
n. You means the individual or entity exercising the Licensed Rights
|
| 148 |
+
under this Public License. Your has a corresponding meaning.
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
Section 2 -- Scope.
|
| 152 |
+
|
| 153 |
+
a. License grant.
|
| 154 |
+
|
| 155 |
+
1. Subject to the terms and conditions of this Public License,
|
| 156 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 157 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 158 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 159 |
+
|
| 160 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 161 |
+
in part, for NonCommercial purposes only; and
|
| 162 |
+
|
| 163 |
+
b. produce, reproduce, and Share Adapted Material for
|
| 164 |
+
NonCommercial purposes only.
|
| 165 |
+
|
| 166 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 167 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 168 |
+
License does not apply, and You do not need to comply with
|
| 169 |
+
its terms and conditions.
|
| 170 |
+
|
| 171 |
+
3. Term. The term of this Public License is specified in Section
|
| 172 |
+
6(a).
|
| 173 |
+
|
| 174 |
+
4. Media and formats; technical modifications allowed. The
|
| 175 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 176 |
+
all media and formats whether now known or hereafter created,
|
| 177 |
+
and to make technical modifications necessary to do so. The
|
| 178 |
+
Licensor waives and/or agrees not to assert any right or
|
| 179 |
+
authority to forbid You from making technical modifications
|
| 180 |
+
necessary to exercise the Licensed Rights, including
|
| 181 |
+
technical modifications necessary to circumvent Effective
|
| 182 |
+
Technological Measures. For purposes of this Public License,
|
| 183 |
+
simply making modifications authorized by this Section 2(a)
|
| 184 |
+
(4) never produces Adapted Material.
|
| 185 |
+
|
| 186 |
+
5. Downstream recipients.
|
| 187 |
+
|
| 188 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 189 |
+
recipient of the Licensed Material automatically
|
| 190 |
+
receives an offer from the Licensor to exercise the
|
| 191 |
+
Licensed Rights under the terms and conditions of this
|
| 192 |
+
Public License.
|
| 193 |
+
|
| 194 |
+
b. Additional offer from the Licensor -- Adapted Material.
|
| 195 |
+
Every recipient of Adapted Material from You
|
| 196 |
+
automatically receives an offer from the Licensor to
|
| 197 |
+
exercise the Licensed Rights in the Adapted Material
|
| 198 |
+
under the conditions of the Adapter's License You apply.
|
| 199 |
+
|
| 200 |
+
c. No downstream restrictions. You may not offer or impose
|
| 201 |
+
any additional or different terms or conditions on, or
|
| 202 |
+
apply any Effective Technological Measures to, the
|
| 203 |
+
Licensed Material if doing so restricts exercise of the
|
| 204 |
+
Licensed Rights by any recipient of the Licensed
|
| 205 |
+
Material.
|
| 206 |
+
|
| 207 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 208 |
+
may be construed as permission to assert or imply that You
|
| 209 |
+
are, or that Your use of the Licensed Material is, connected
|
| 210 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 211 |
+
the Licensor or others designated to receive attribution as
|
| 212 |
+
provided in Section 3(a)(1)(A)(i).
|
| 213 |
+
|
| 214 |
+
b. Other rights.
|
| 215 |
+
|
| 216 |
+
1. Moral rights, such as the right of integrity, are not
|
| 217 |
+
licensed under this Public License, nor are publicity,
|
| 218 |
+
privacy, and/or other similar personality rights; however, to
|
| 219 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 220 |
+
assert any such rights held by the Licensor to the limited
|
| 221 |
+
extent necessary to allow You to exercise the Licensed
|
| 222 |
+
Rights, but not otherwise.
|
| 223 |
+
|
| 224 |
+
2. Patent and trademark rights are not licensed under this
|
| 225 |
+
Public License.
|
| 226 |
+
|
| 227 |
+
3. To the extent possible, the Licensor waives any right to
|
| 228 |
+
collect royalties from You for the exercise of the Licensed
|
| 229 |
+
Rights, whether directly or through a collecting society
|
| 230 |
+
under any voluntary or waivable statutory or compulsory
|
| 231 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 232 |
+
reserves any right to collect such royalties, including when
|
| 233 |
+
the Licensed Material is used other than for NonCommercial
|
| 234 |
+
purposes.
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
Section 3 -- License Conditions.
|
| 238 |
+
|
| 239 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 240 |
+
following conditions.
|
| 241 |
+
|
| 242 |
+
a. Attribution.
|
| 243 |
+
|
| 244 |
+
1. If You Share the Licensed Material (including in modified
|
| 245 |
+
form), You must:
|
| 246 |
+
|
| 247 |
+
a. retain the following if it is supplied by the Licensor
|
| 248 |
+
with the Licensed Material:
|
| 249 |
+
|
| 250 |
+
i. identification of the creator(s) of the Licensed
|
| 251 |
+
Material and any others designated to receive
|
| 252 |
+
attribution, in any reasonable manner requested by
|
| 253 |
+
the Licensor (including by pseudonym if
|
| 254 |
+
designated);
|
| 255 |
+
|
| 256 |
+
ii. a copyright notice;
|
| 257 |
+
|
| 258 |
+
iii. a notice that refers to this Public License;
|
| 259 |
+
|
| 260 |
+
iv. a notice that refers to the disclaimer of
|
| 261 |
+
warranties;
|
| 262 |
+
|
| 263 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 264 |
+
extent reasonably practicable;
|
| 265 |
+
|
| 266 |
+
b. indicate if You modified the Licensed Material and
|
| 267 |
+
retain an indication of any previous modifications; and
|
| 268 |
+
|
| 269 |
+
c. indicate the Licensed Material is licensed under this
|
| 270 |
+
Public License, and include the text of, or the URI or
|
| 271 |
+
hyperlink to, this Public License.
|
| 272 |
+
|
| 273 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 274 |
+
reasonable manner based on the medium, means, and context in
|
| 275 |
+
which You Share the Licensed Material. For example, it may be
|
| 276 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 277 |
+
hyperlink to a resource that includes the required
|
| 278 |
+
information.
|
| 279 |
+
3. If requested by the Licensor, You must remove any of the
|
| 280 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 281 |
+
reasonably practicable.
|
| 282 |
+
|
| 283 |
+
b. ShareAlike.
|
| 284 |
+
|
| 285 |
+
In addition to the conditions in Section 3(a), if You Share
|
| 286 |
+
Adapted Material You produce, the following conditions also apply.
|
| 287 |
+
|
| 288 |
+
1. The Adapter's License You apply must be a Creative Commons
|
| 289 |
+
license with the same License Elements, this version or
|
| 290 |
+
later, or a BY-NC-SA Compatible License.
|
| 291 |
+
|
| 292 |
+
2. You must include the text of, or the URI or hyperlink to, the
|
| 293 |
+
Adapter's License You apply. You may satisfy this condition
|
| 294 |
+
in any reasonable manner based on the medium, means, and
|
| 295 |
+
context in which You Share Adapted Material.
|
| 296 |
+
|
| 297 |
+
3. You may not offer or impose any additional or different terms
|
| 298 |
+
or conditions on, or apply any Effective Technological
|
| 299 |
+
Measures to, Adapted Material that restrict exercise of the
|
| 300 |
+
rights granted under the Adapter's License You apply.
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
Section 4 -- Sui Generis Database Rights.
|
| 304 |
+
|
| 305 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 306 |
+
apply to Your use of the Licensed Material:
|
| 307 |
+
|
| 308 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 309 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 310 |
+
portion of the contents of the database for NonCommercial purposes
|
| 311 |
+
only;
|
| 312 |
+
|
| 313 |
+
b. if You include all or a substantial portion of the database
|
| 314 |
+
contents in a database in which You have Sui Generis Database
|
| 315 |
+
Rights, then the database in which You have Sui Generis Database
|
| 316 |
+
Rights (but not its individual contents) is Adapted Material,
|
| 317 |
+
including for purposes of Section 3(b); and
|
| 318 |
+
|
| 319 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 320 |
+
all or a substantial portion of the contents of the database.
|
| 321 |
+
|
| 322 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 323 |
+
replace Your obligations under this Public License where the Licensed
|
| 324 |
+
Rights include other Copyright and Similar Rights.
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 328 |
+
|
| 329 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 330 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 331 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 332 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 333 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 334 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 335 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 336 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 337 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 338 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 339 |
+
|
| 340 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 341 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 342 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 343 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 344 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 345 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 346 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 347 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 348 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 349 |
+
|
| 350 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 351 |
+
above shall be interpreted in a manner that, to the extent
|
| 352 |
+
possible, most closely approximates an absolute disclaimer and
|
| 353 |
+
waiver of all liability.
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
Section 6 -- Term and Termination.
|
| 357 |
+
|
| 358 |
+
a. This Public License applies for the term of the Copyright and
|
| 359 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 360 |
+
this Public License, then Your rights under this Public License
|
| 361 |
+
terminate automatically.
|
| 362 |
+
|
| 363 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 364 |
+
Section 6(a), it reinstates:
|
| 365 |
+
|
| 366 |
+
1. automatically as of the date the violation is cured, provided
|
| 367 |
+
it is cured within 30 days of Your discovery of the
|
| 368 |
+
violation; or
|
| 369 |
+
|
| 370 |
+
2. upon express reinstatement by the Licensor.
|
| 371 |
+
|
| 372 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 373 |
+
right the Licensor may have to seek remedies for Your violations
|
| 374 |
+
of this Public License.
|
| 375 |
+
|
| 376 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 377 |
+
Licensed Material under separate terms or conditions or stop
|
| 378 |
+
distributing the Licensed Material at any time; however, doing so
|
| 379 |
+
will not terminate this Public License.
|
| 380 |
+
|
| 381 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 382 |
+
License.
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
Section 7 -- Other Terms and Conditions.
|
| 386 |
+
|
| 387 |
+
a. The Licensor shall not be bound by any additional or different
|
| 388 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 389 |
+
|
| 390 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 391 |
+
Licensed Material not stated herein are separate from and
|
| 392 |
+
independent of the terms and conditions of this Public License.
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
Section 8 -- Interpretation.
|
| 396 |
+
|
| 397 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 398 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 399 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 400 |
+
be made without permission under this Public License.
|
| 401 |
+
|
| 402 |
+
b. To the extent possible, if any provision of this Public License is
|
| 403 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 404 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 405 |
+
cannot be reformed, it shall be severed from this Public License
|
| 406 |
+
without affecting the enforceability of the remaining terms and
|
| 407 |
+
conditions.
|
| 408 |
+
|
| 409 |
+
c. No term or condition of this Public License will be waived and no
|
| 410 |
+
failure to comply consented to unless expressly agreed to by the
|
| 411 |
+
Licensor.
|
| 412 |
+
|
| 413 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 414 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 415 |
+
that apply to the Licensor or You, including from the legal
|
| 416 |
+
processes of any jurisdiction or authority.
|
| 417 |
+
|
| 418 |
+
=======================================================================
|
| 419 |
+
|
| 420 |
+
Creative Commons is not a party to its public
|
| 421 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 422 |
+
its public licenses to material it publishes and in those instances
|
| 423 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 424 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 425 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 426 |
+
material is shared under a Creative Commons public license or as
|
| 427 |
+
otherwise permitted by the Creative Commons policies published at
|
| 428 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 429 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 430 |
+
of Creative Commons without its prior written consent including,
|
| 431 |
+
without limitation, in connection with any unauthorized modifications
|
| 432 |
+
to any of its public licenses or any other arrangements,
|
| 433 |
+
understandings, or agreements concerning use of licensed material. For
|
| 434 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 435 |
+
public licenses.
|
| 436 |
+
|
| 437 |
+
Creative Commons may be contacted at creativecommons.org.
|
| 438 |
+
|
NOTICE
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
EditLens RoBERTa Model Kit — CoderBak
|
| 2 |
+
|
| 3 |
+
This repository redistributes the original Pangram EditLens RoBERTa-large
|
| 4 |
+
checkpoint and converted ONNX artifacts derived from that checkpoint.
|
| 5 |
+
It is a community conversion/distribution project, not a newly trained model.
|
| 6 |
+
No affiliation with or endorsement by Pangram, the EditLens authors, Meta,
|
| 7 |
+
Hugging Face, or Microsoft is claimed.
|
| 8 |
+
|
| 9 |
+
Original model developer: Pangram.
|
| 10 |
+
Original research authors: Katherine Thai, Bradley Emi, Elyas Masrour,
|
| 11 |
+
and Mohit Iyyer.
|
| 12 |
+
Paper: EditLens: Quantifying the Extent of AI Editing in Text.
|
| 13 |
+
https://arxiv.org/abs/2510.03154
|
| 14 |
+
Upstream model: https://huggingface.co/pangram/editlens_roberta-large
|
| 15 |
+
Pinned source revision: f93e1ace74528cfb48f337ab2fe946fb71a728cb
|
| 16 |
+
Upstream research code: https://github.com/pangramlabs/EditLens
|
| 17 |
+
Base-model lineage: https://huggingface.co/FacebookAI/roberta-large
|
| 18 |
+
The base-model card identifies its license as MIT. The EditLens derivative
|
| 19 |
+
weights distributed here retain Pangram's CC BY-NC-SA 4.0 license.
|
| 20 |
+
|
| 21 |
+
License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0
|
| 22 |
+
International (CC BY-NC-SA 4.0).
|
| 23 |
+
https://creativecommons.org/licenses/by-nc-sa/4.0/
|
| 24 |
+
The complete license text is provided in LICENSE. Its attribution,
|
| 25 |
+
noncommercial, share-alike, and other applicable terms continue to apply.
|
| 26 |
+
Public availability does not grant commercial-use rights.
|
| 27 |
+
No additional research-only restriction is imposed by this model kit.
|
| 28 |
+
Third-party software dependencies retain their own licenses.
|
| 29 |
+
|
| 30 |
+
Changes made by CoderBak:
|
| 31 |
+
- Exported the complete sequence classifier to ONNX with opset 17,
|
| 32 |
+
dynamic batch/sequence axes, int64 input IDs and attention masks,
|
| 33 |
+
and four output logits.
|
| 34 |
+
- Created optional FP16 and dynamic per-channel INT8 MatMul variants.
|
| 35 |
+
- Added conversion scripts, local inference example, provenance,
|
| 36 |
+
checksums, and numerical conversion checks.
|
| 37 |
+
- No retraining, distillation, new calibration, or change of label order.
|
| 38 |
+
- The root PyTorch checkpoint/configuration/tokenizer files are preserved
|
| 39 |
+
byte-for-byte from the pinned upstream snapshot.
|
| 40 |
+
|
| 41 |
+
The original model card is retained in upstream/README.md. Its access-form
|
| 42 |
+
metadata is historical upstream information, not a gate for this repository.
|
| 43 |
+
This repository is public and ungated; that does not waive the model license
|
| 44 |
+
or grant access to the separately gated upstream repository.
|
| 45 |
+
|
| 46 |
+
The license includes a disclaimer of warranties and limitation of liability.
|
| 47 |
+
Please retain this notice, source attribution, license, and change notices
|
| 48 |
+
when redistributing the model or further derivatives.
|
README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-sa-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model: pangram/editlens_roberta-large
|
| 6 |
+
datasets:
|
| 7 |
+
- pangram/editlens_iclr
|
| 8 |
+
library_name: transformers
|
| 9 |
+
pipeline_tag: text-classification
|
| 10 |
+
tags:
|
| 11 |
+
- roberta
|
| 12 |
+
- onnx
|
| 13 |
+
- editlens
|
| 14 |
+
- ai-detection
|
| 15 |
+
- quantization
|
| 16 |
+
- local-inference
|
| 17 |
+
inference: false
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# EditLens RoBERTa Model Kit
|
| 21 |
+
|
| 22 |
+
**Community conversions of [Pangram's EditLens RoBERTa-large](https://huggingface.co/pangram/editlens_roberta-large), maintained by CoderBak. The original model and research are the work of Pangram and Katherine Thai, Bradley Emi, Elyas Masrour, and Mohit Iyyer.**
|
| 23 |
+
|
| 24 |
+
This repository packages their existing classifier for local inference. CoderBak performed format conversion, optional precision reduction, packaging, and numerical checks. **No new model was trained, and no improvement in detection accuracy is claimed.** This repository is not affiliated with or endorsed by Pangram or the research authors.
|
| 25 |
+
|
| 26 |
+
**License: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/). Noncommercial use only under this license.** Public, ungated downloads do not waive attribution, noncommercial, share-alike, or any other applicable license terms. See the complete [LICENSE](LICENSE), [NOTICE](NOTICE), and preserved [original model card](upstream/README.md). Commercial-use rights must be obtained separately from the relevant rights holder. This model kit adds no research-only restriction beyond the original license.
|
| 27 |
+
|
| 28 |
+
## Provenance
|
| 29 |
+
|
| 30 |
+
- Original checkpoint: [`pangram/editlens_roberta-large`](https://huggingface.co/pangram/editlens_roberta-large).
|
| 31 |
+
- Pinned upstream commit: [`f93e1ace74528cfb48f337ab2fe946fb71a728cb`](https://huggingface.co/pangram/editlens_roberta-large/tree/f93e1ace74528cfb48f337ab2fe946fb71a728cb).
|
| 32 |
+
- Original weight SHA-256: `869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb`.
|
| 33 |
+
- Paper: [EditLens: Quantifying the Extent of AI Editing in Text](https://arxiv.org/abs/2510.03154), Thai et al., ICLR 2026.
|
| 34 |
+
- Research code: [pangramlabs/EditLens](https://github.com/pangramlabs/EditLens).
|
| 35 |
+
- Earlier base-model lineage: [FacebookAI/roberta-large](https://huggingface.co/FacebookAI/roberta-large).
|
| 36 |
+
- Training-dataset lineage, as declared upstream: [pangram/editlens_iclr](https://huggingface.co/datasets/pangram/editlens_iclr). No training or calibration dataset was used to produce these conversions.
|
| 37 |
+
|
| 38 |
+
The root `model.safetensors`, configuration, and tokenizer files are byte-for-byte copies of the pinned upstream files. Their hashes, build versions, ONNX graph information, and variant status are recorded in [manifest.json](manifest.json). [SHA256SUMS](SHA256SUMS) covers the published files except itself.
|
| 39 |
+
|
| 40 |
+
The upstream repository remains separately gated. Its archived access-form metadata in `upstream/README.md` documents the source; it does not impose an account gate on this repository or grant access to the upstream repository.
|
| 41 |
+
|
| 42 |
+
## Available artifacts
|
| 43 |
+
|
| 44 |
+
| Artifact | File | Size (decimal MB) | Intended use |
|
| 45 |
+
| --- | --- | ---: | --- |
|
| 46 |
+
| Original PyTorch FP32 | [`model.safetensors`](model.safetensors) | 1,421.5 | Unchanged source checkpoint; full-precision PyTorch/MPS/CUDA use |
|
| 47 |
+
| ONNX FP32 — default | [`onnx/model.onnx`](onnx/model.onnx) | 1,421.9 | Full-precision baseline |
|
| 48 |
+
| ONNX FP16 — optional | [`onnx/model_fp16.onnx`](onnx/model_fp16.onnx) | 711.3 | Smaller floating-point artifact; test on your accelerator |
|
| 49 |
+
| ONNX INT8 — experimental | [`onnx/model_int8.onnx`](onnx/model_int8.onnx) | 514.3 | Smaller CPU candidate; failed numerical parity gate |
|
| 50 |
+
|
| 51 |
+
**FP32 is the recommended default.** Device selection and precision selection are separate decisions. FP16 and INT8 are optional deployment profiles, not automatic replacements for FP32.
|
| 52 |
+
|
| 53 |
+
**INT8 is experimental and failed this release's numerical parity gate.** It changed the top class for 1 of 24 fixtures and moved one class probability by approximately 0.121 (12.1 percentage points). The changed prediction occurred on a repetitive-token stress input. This does not establish the error rate on real writing. The artifact is provided for explicit evaluation, must not be automatically selected by an installer, and should not replace FP32 without application-specific evaluation. Its failed result is retained in `validation/int8.json`.
|
| 54 |
+
|
| 55 |
+
FP16 retains integer inputs and FP32 output logits; the converter preserves unsupported operations using casts. INT8 dynamically quantizes constant-weight MatMul operations per channel and leaves embeddings and other unquantized operations in FP32. Neither option changes the number of layers, the four output classes, or the maximum sequence length.
|
| 56 |
+
|
| 57 |
+
## What was validated
|
| 58 |
+
|
| 59 |
+
| ONNX variant | Maximum absolute probability difference | Matching top classes | Numerical gate |
|
| 60 |
+
| --- | ---: | ---: | --- |
|
| 61 |
+
| FP32 | 0.00000402 | 24/24 | Passed |
|
| 62 |
+
| FP16 | 0.00267339 | 24/24 | Passed |
|
| 63 |
+
| INT8 | 0.12102217 | 23/24 | **Failed — experimental only** |
|
| 64 |
+
|
| 65 |
+
These are **24 synthetic, unlabeled examples across 12 cases**, including empty/minimal inputs, Unicode, formatting, mixed padding, repetition, and long inputs capped at 512 tokens. Edge cases such as empty input and non-English text are conversion stress tests, not recommended detector inputs. The fixtures, exact input tensors, PyTorch FP32 reference logits, and per-case measurements are in [validation/](validation/).
|
| 66 |
+
|
| 67 |
+
The acceptance thresholds were set before measuring the variants: maximum absolute class-probability differences of `0.0001` for FP32, `0.01` for FP16, and `0.05` for INT8, with zero class changes on this fixture set. These are engineering smoke-test thresholds, not calibrated detection-quality standards. A passed check establishes neither real-world accuracy nor equivalence on unseen inputs. A failed check remains recorded and must not be interpreted as a passed release gate.
|
| 68 |
+
|
| 69 |
+
All ONNX numerical checks used **ONNX Runtime CPU on macOS arm64**, with four intra-op threads. This release does **not** claim tested CUDA, CoreML, DirectML, Windows ML, Windows, or Linux performance. The timing fields are single-run diagnostics and must not be treated as a speed ranking. FP16 graph storage does not prove every underlying CPU operation executes in native half precision.
|
| 70 |
+
|
| 71 |
+
The lightweight inference example's tokenizer IDs and attention masks were checked against the Transformers tokenizer for every fixture. No model-specific preprocessing, emoji replacement, language gate, paragraph grouping, window aggregation, or new score calibration is bundled into the ONNX graphs. Applications must implement and evaluate their own preprocessing consistently.
|
| 72 |
+
|
| 73 |
+
## Choosing a runtime
|
| 74 |
+
|
| 75 |
+
| Scenario | Starting point | Qualification |
|
| 76 |
+
| --- | --- | --- |
|
| 77 |
+
| CPU | FP32 ONNX | Baseline; verify an ONNX Runtime build exists for your OS and architecture. |
|
| 78 |
+
| Apple Silicon / PyTorch MPS | Original FP32 checkpoint | Select `mps` explicitly; this conversion release's numerical reference was measured on CPU. |
|
| 79 |
+
| NVIDIA GPU | FP32 ONNX with CUDA, or original PyTorch FP32 | Requires compatible GPU runtime/driver; not tested here. |
|
| 80 |
+
| GPU memory or bandwidth constraints | Optional FP16 ONNX | Validate provider support and output differences on the deployment device. |
|
| 81 |
+
| CPU download/memory constraints | Optional experimental INT8 | Read its numerical report; do not assume unchanged decisions. |
|
| 82 |
+
| Intel Mac | FP32 with an explicitly supported runtime build | Newer ORT releases do not provide Intel-Mac binaries; this release does not supply a legacy runtime. |
|
| 83 |
+
|
| 84 |
+
An ONNX file is a model artifact, not a universal installer. Runtime availability, supported operators, quantized kernels, and acceleration vary by platform. In particular, an INT8 CPU graph should not be assumed to run efficiently through a GPU provider. Read the [ORT provider documentation](https://onnxruntime.ai/docs/execution-providers/) and your selected runtime's release notes.
|
| 85 |
+
|
| 86 |
+
## Download only the selected variant
|
| 87 |
+
|
| 88 |
+
Use an immutable commit revision in a production installer. The example below requires the caller to supply one from this repository's commit history; it does not download all variants.
|
| 89 |
+
|
| 90 |
+
```python
|
| 91 |
+
from huggingface_hub import snapshot_download
|
| 92 |
+
|
| 93 |
+
MODEL_KIT_REVISION = "<commit SHA from this repository>"
|
| 94 |
+
snapshot_download(
|
| 95 |
+
repo_id="CoderBak/editlens_roberta_modelkit",
|
| 96 |
+
revision=MODEL_KIT_REVISION,
|
| 97 |
+
local_dir="editlens-modelkit",
|
| 98 |
+
allow_patterns=[
|
| 99 |
+
"config.json", "tokenizer.json", "tokenizer_config.json",
|
| 100 |
+
"special_tokens_map.json", "vocab.json", "merges.txt",
|
| 101 |
+
"onnx/model.onnx", # FP32 default; select another explicit file if needed
|
| 102 |
+
"examples/onnx_inference.py", "requirements-runtime.txt",
|
| 103 |
+
"LICENSE", "NOTICE", "README.md", "manifest.json", "SHA256SUMS",
|
| 104 |
+
],
|
| 105 |
+
)
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
No HF token is needed for this public repository. Check downloaded files against the checksums associated with the pinned revision. Preserve `LICENSE` and `NOTICE` in redistributed bundles.
|
| 109 |
+
|
| 110 |
+
## Local ONNX inference
|
| 111 |
+
|
| 112 |
+
The example needs ONNX Runtime, NumPy, and the Hugging Face `tokenizers` package; it does not need PyTorch. `requirements-runtime.txt` records the tested versions, whose platform availability must be checked before installation.
|
| 113 |
+
|
| 114 |
+
```sh
|
| 115 |
+
python -m pip install -r editlens-modelkit/requirements-runtime.txt
|
| 116 |
+
python editlens-modelkit/examples/onnx_inference.py \
|
| 117 |
+
--model-dir editlens-modelkit --variant fp32 --provider cpu \
|
| 118 |
+
"The text to classify goes here."
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
The ONNX inputs are `input_ids` and `attention_mask`, both int64 with shape `[batch, sequence]`. Output `logits` has shape `[batch, 4]`. Batch and sequence axes are dynamic. The supported input length is **2–512 tokens including special tokens**; pad and truncate using the supplied tokenizer. The example truncates overlong inputs; applications analyzing entire documents must implement and disclose their own windowing policy.
|
| 122 |
+
|
| 123 |
+
The original generic label names and their order (`LABEL_0` through `LABEL_3`) are preserved. The example returns softmax class probabilities. They are **not a percentage of AI-written words**, and conversion supplies no new probability calibration. Consult the original research for interpretation.
|
| 124 |
+
|
| 125 |
+
## Original PyTorch checkpoint
|
| 126 |
+
|
| 127 |
+
The repository root remains compatible with `AutoModelForSequenceClassification` and `AutoTokenizer`:
|
| 128 |
+
|
| 129 |
+
```python
|
| 130 |
+
import torch
|
| 131 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 132 |
+
|
| 133 |
+
repo = "CoderBak/editlens_roberta_modelkit"
|
| 134 |
+
revision = "<commit SHA from this repository>"
|
| 135 |
+
tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision)
|
| 136 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
| 137 |
+
repo, revision=revision, dtype=torch.float32,
|
| 138 |
+
attn_implementation="eager",
|
| 139 |
+
).eval()
|
| 140 |
+
# Select a supported device explicitly if desired: model.to("mps") or model.to("cuda").
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
## Reproduce the conversions
|
| 144 |
+
|
| 145 |
+
The build was performed using Python 3.13 and the exact versions in `requirements-build.txt`. Export tooling has platform-specific availability. Obtain the original pinned checkpoint through your own authorized upstream access, or use the verified original checkpoint in this repository.
|
| 146 |
+
|
| 147 |
+
```sh
|
| 148 |
+
python -m pip install -r requirements-build.txt
|
| 149 |
+
python scripts/build.py export --source .
|
| 150 |
+
python scripts/build.py fp16 --source .
|
| 151 |
+
python scripts/build.py int8 --source .
|
| 152 |
+
python scripts/build.py reference --source .
|
| 153 |
+
python scripts/validate.py fp32
|
| 154 |
+
python scripts/validate.py fp16
|
| 155 |
+
python scripts/validate.py int8
|
| 156 |
+
```
|
| 157 |
+
|
| 158 |
+
The INT8 validation command currently exits nonzero, intentionally reporting the documented parity failure. The FP32 and FP16 commands pass. Do not suppress a failed check or treat this release's experimental designation as approval for an application's accuracy requirements.
|
| 159 |
+
|
| 160 |
+
Export uses the PyTorch TorchScript exporter (`dynamo=False`) with eager attention and ONNX opset 17. FP16 uses `onnxconverter-common` with `keep_io_types=True` and its documented default clipping/operator policy. INT8 uses ONNX Runtime dynamic QInt8 weights, per-channel quantization, full range, and constant-weight MatMul operations only. No provider-specific graph fusion or hardware compilation is distributed. Reproduction can differ with other tool versions; verify outputs and hashes before substituting artifacts.
|
| 161 |
+
|
| 162 |
+
## Limitations and responsible interpretation
|
| 163 |
+
|
| 164 |
+
The upstream model is English-focused. Detection can produce false positives and false negatives, particularly outside its training distribution. Model output is not proof of authorship or misconduct. These conversions do not establish reliability for short posts, non-English text, OCR errors, scientific writing, or any particular real-world domain. Applications should preserve uncertainty and evaluate the original model and their complete input pipeline on representative data.
|
| 165 |
+
|
| 166 |
+
Please cite the original EditLens work using [CITATION.bib](CITATION.bib), retain Pangram's attribution and license, and separately identify any further changes you make.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ece8cba6007cbb8687b7d86eb8e57e6be613303706b40b0eab360b81d6a42dda .gitattributes
|
| 2 |
+
77ed84b596c5867c5ec9e2c5d3f726ea4173f579a478e64a58befd2911ea290a .gitignore
|
| 3 |
+
36e8a999bfd0ad3b6f82e3f75602521e2cc4b035d15bc37b9bd1a0b8b856cc4d CITATION.bib
|
| 4 |
+
e66c269d4819aaab34b49ef5220c4ddab6756f21bb5180761a4eb8561f2b7bbd LICENSE
|
| 5 |
+
7324cddb09dced5253ba6f1c963bbdf9c95f100f2bb3c3177ad2f059b078e81e NOTICE
|
| 6 |
+
b6f967ead56def979aa59409b9323aebca3dcff554e9c9bd4b11ce9bc2955f33 README.md
|
| 7 |
+
54b63c7e7298bdd5a49180a668e648a020d61cae92abdbae0a96ac3bf5a7ba18 config.json
|
| 8 |
+
19600d8e4b5f5663f8a295cc078a18a1fc07d96c6e30ead76bdfa2e72f80b0ec examples/onnx_inference.py
|
| 9 |
+
ff75ce561fe7d70c2df4ab5ffdc4a48b11543415047b2e809ea72480b993208a manifest.json
|
| 10 |
+
1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5 merges.txt
|
| 11 |
+
869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb model.safetensors
|
| 12 |
+
ddd1173f2ef517ad499965e5029fae8099a8054a2bc76d8134e5889cc4ed1b3e onnx/model.onnx
|
| 13 |
+
a0da0f46c5026489c37137b5f455e092e09ac48eafd031bec6f05433c5c2ec01 onnx/model_fp16.onnx
|
| 14 |
+
bc1b9cb5a7a63fb7c5b67de3556e9e43cb4537bd6ce6bae3e6ad7cfce9552d23 onnx/model_int8.onnx
|
| 15 |
+
55df36a94beb1a96447fbc77f69076a523104f622ff5113a460990dcdc966c5f requirements-build.txt
|
| 16 |
+
d935a411c82267a32dde29c973e3523be672241cb35af0d731540c2372d549d4 requirements-runtime.txt
|
| 17 |
+
d27d46410c0cd6c926ca75ad52bd054dd0ffe858c72d09b55fabe93f9dcd3923 scripts/build.py
|
| 18 |
+
7fbaf03be742fb696c8710479ef3e27723b98dbdc1f650a939b7e87b40c73808 scripts/package.py
|
| 19 |
+
83ef667d0f68f86267f5d9e5e5c2a371e13bf56c3d244ae2f0a13c3a4af4b896 scripts/validate.py
|
| 20 |
+
06e405a36dfe4b9604f484f6a1e619af1a7f7d09e34a8555eb0b77b66318067f special_tokens_map.json
|
| 21 |
+
2bb1a22cfbe25b8e5a232b7fc4d7fc5073923b45724a5f813b00811bb6620f66 tokenizer.json
|
| 22 |
+
4903bcd294e8ff8b840eb9c21909d2f910b466d250ac6e298a7438a7da63ef0d tokenizer_config.json
|
| 23 |
+
f50caae832ee1dfc5460b2a922e74fe77e21e79c10825477bf6a8c51505781dc upstream/README.md
|
| 24 |
+
cc16f56a486587022eec1f1420d54547aed8bfd9f2a6138824498dac800ebacc upstream/metadata.json
|
| 25 |
+
b4cfec82a9c2839e3231a51a4fe991c5ce83ae516aa61e8fe5f93c235953651b validation/fixtures.json
|
| 26 |
+
f6986486e7c528a6d36495da197e4f40238405404b1fdba905df896bc071df55 validation/fp16.json
|
| 27 |
+
721743632cb9b226c4fee901c92d4d7736ec3e7edae01c4390dc8fc0024b6f77 validation/fp32.json
|
| 28 |
+
3cc474b258e007623ad057cf45979b1e142faca5ffde2b199f873c97c4dd1693 validation/int8.json
|
| 29 |
+
1a9eb583dbaf714bddde6f4375b03932edecb8d5bb0d4109479b6381fa8c36d0 validation/reference.json
|
| 30 |
+
401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c validation/reference.npz
|
| 31 |
+
fac62a73e8e3740af6b2522856325f14c6b60856da58c2a7f9bd851731fd8ffa validation/tokenizer.json
|
| 32 |
+
ed19656ea1707df69134c4af35c8ceda2cc9860bf2c3495026153a133670ab5e vocab.json
|
config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RobertaForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout_prob": 0.1,
|
| 13 |
+
"hidden_size": 1024,
|
| 14 |
+
"id2label": {
|
| 15 |
+
"0": "LABEL_0",
|
| 16 |
+
"1": "LABEL_1",
|
| 17 |
+
"2": "LABEL_2",
|
| 18 |
+
"3": "LABEL_3"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 4096,
|
| 22 |
+
"is_decoder": false,
|
| 23 |
+
"label2id": {
|
| 24 |
+
"LABEL_0": 0,
|
| 25 |
+
"LABEL_1": 1,
|
| 26 |
+
"LABEL_2": 2,
|
| 27 |
+
"LABEL_3": 3
|
| 28 |
+
},
|
| 29 |
+
"layer_norm_eps": 1e-05,
|
| 30 |
+
"max_position_embeddings": 514,
|
| 31 |
+
"model_type": "roberta",
|
| 32 |
+
"num_attention_heads": 16,
|
| 33 |
+
"num_hidden_layers": 24,
|
| 34 |
+
"pad_token_id": 1,
|
| 35 |
+
"problem_type": "single_label_classification",
|
| 36 |
+
"tie_word_embeddings": true,
|
| 37 |
+
"transformers_version": "5.3.0",
|
| 38 |
+
"type_vocab_size": 1,
|
| 39 |
+
"use_cache": false,
|
| 40 |
+
"vocab_size": 50265
|
| 41 |
+
}
|
examples/onnx_inference.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Local inference without PyTorch. Download the selected files before running.
|
| 2 |
+
|
| 3 |
+
License: CC-BY-NC-SA-4.0. See LICENSE and NOTICE.
|
| 4 |
+
"""
|
| 5 |
+
import argparse
|
| 6 |
+
import json
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import numpy as np
|
| 10 |
+
import onnxruntime as ort
|
| 11 |
+
from tokenizers import Tokenizer
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def main():
|
| 15 |
+
ort.disable_telemetry_events()
|
| 16 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 17 |
+
p.add_argument("text", nargs="+", help="One or more texts; each gets its own output.")
|
| 18 |
+
p.add_argument("--model-dir", type=Path, default=Path(__file__).resolve().parents[1])
|
| 19 |
+
p.add_argument("--variant", choices=["fp32", "fp16", "int8"], default="fp32",
|
| 20 |
+
help="INT8 is experimental and failed the published parity check; FP32 is recommended.")
|
| 21 |
+
p.add_argument("--provider", choices=["cpu", "cuda", "coreml"], default="cpu",
|
| 22 |
+
help="Only CPU was validated for this release. GPU options require a compatible runtime and testing.")
|
| 23 |
+
args = p.parse_args()
|
| 24 |
+
config = json.loads((args.model_dir / "config.json").read_text())
|
| 25 |
+
tok = Tokenizer.from_file(str(args.model_dir / "tokenizer.json"))
|
| 26 |
+
tok.enable_truncation(max_length=512)
|
| 27 |
+
tok.enable_padding(pad_id=config["pad_token_id"], pad_token="<pad>")
|
| 28 |
+
enc = tok.encode_batch(args.text)
|
| 29 |
+
feeds = {"input_ids": np.array([e.ids for e in enc], dtype=np.int64),
|
| 30 |
+
"attention_mask": np.array([e.attention_mask for e in enc], dtype=np.int64)}
|
| 31 |
+
files = {"fp32": "model.onnx", "fp16": "model_fp16.onnx", "int8": "model_int8.onnx"}
|
| 32 |
+
provider = {"cpu": "CPUExecutionProvider", "cuda": "CUDAExecutionProvider",
|
| 33 |
+
"coreml": "CoreMLExecutionProvider"}[args.provider]
|
| 34 |
+
if provider not in ort.get_available_providers():
|
| 35 |
+
raise SystemExit("Requested provider is unavailable in this runtime: " + provider)
|
| 36 |
+
options = ort.SessionOptions()
|
| 37 |
+
options.intra_op_num_threads = 4
|
| 38 |
+
options.inter_op_num_threads = 1
|
| 39 |
+
providers = [provider] if args.provider == "cpu" else [provider, "CPUExecutionProvider"]
|
| 40 |
+
session = ort.InferenceSession(str(args.model_dir / "onnx" / files[args.variant]),
|
| 41 |
+
sess_options=options, providers=providers)
|
| 42 |
+
logits = session.run(["logits"], feeds)[0].astype(np.float64)
|
| 43 |
+
exp = np.exp(logits - logits.max(axis=1, keepdims=True))
|
| 44 |
+
probs = exp / exp.sum(axis=1, keepdims=True)
|
| 45 |
+
rows = [{"label": config["id2label"][str(int(row.argmax()))],
|
| 46 |
+
"probabilities": row.tolist()} for row in probs]
|
| 47 |
+
print(json.dumps({"variant": args.variant, "experimental": args.variant == "int8",
|
| 48 |
+
"requested_provider": provider,
|
| 49 |
+
"configured_providers": session.get_providers(),
|
| 50 |
+
"note": "Configured providers do not prove every operator ran on an accelerator. Class probabilities are not a percentage of AI-written words.",
|
| 51 |
+
"results": rows}, indent=2))
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
if __name__ == "__main__":
|
| 55 |
+
main()
|
manifest.json
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"repository": "CoderBak/editlens_roberta_modelkit",
|
| 4 |
+
"license": "CC-BY-NC-SA-4.0",
|
| 5 |
+
"public": true,
|
| 6 |
+
"gated": false,
|
| 7 |
+
"source_repository": "pangram/editlens_roberta-large",
|
| 8 |
+
"source_revision": "f93e1ace74528cfb48f337ab2fe946fb71a728cb",
|
| 9 |
+
"original_weights": {
|
| 10 |
+
"path": "model.safetensors",
|
| 11 |
+
"precision": "float32",
|
| 12 |
+
"size_bytes": 1421503560,
|
| 13 |
+
"sha256": "869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb",
|
| 14 |
+
"unchanged_from_upstream": true
|
| 15 |
+
},
|
| 16 |
+
"generated_utc": "2026-09-20T10:24:59.474264+00:00",
|
| 17 |
+
"build_environment": {
|
| 18 |
+
"python": "3.13.0",
|
| 19 |
+
"os": "Darwin",
|
| 20 |
+
"os_version": "27.2",
|
| 21 |
+
"architecture": "arm64",
|
| 22 |
+
"packages": {
|
| 23 |
+
"torch": "2.14.0",
|
| 24 |
+
"transformers": "5.17.0",
|
| 25 |
+
"tokenizers": "0.23.2",
|
| 26 |
+
"huggingface-hub": "1.31.0",
|
| 27 |
+
"safetensors": "0.8.0",
|
| 28 |
+
"numpy": "2.5.3",
|
| 29 |
+
"onnx": "1.23.0",
|
| 30 |
+
"onnxruntime": "1.30.0",
|
| 31 |
+
"onnxconverter-common": "1.16.0",
|
| 32 |
+
"protobuf": "7.36.2",
|
| 33 |
+
"ml-dtypes": "0.6.0"
|
| 34 |
+
}
|
| 35 |
+
},
|
| 36 |
+
"maximum_sequence_tokens_including_special_tokens": 512,
|
| 37 |
+
"num_labels": 4,
|
| 38 |
+
"default_variant": "fp32",
|
| 39 |
+
"variants": [
|
| 40 |
+
{
|
| 41 |
+
"id": "fp32",
|
| 42 |
+
"path": "onnx/model.onnx",
|
| 43 |
+
"recommended_default": true,
|
| 44 |
+
"auto_select": true,
|
| 45 |
+
"status": "numerical-smoke-tests-passed",
|
| 46 |
+
"size_bytes": 1421900913,
|
| 47 |
+
"sha256": "ddd1173f2ef517ad499965e5029fae8099a8054a2bc76d8134e5889cc4ed1b3e",
|
| 48 |
+
"opsets": {
|
| 49 |
+
"ai.onnx": 17
|
| 50 |
+
},
|
| 51 |
+
"ir_version": 8,
|
| 52 |
+
"inputs": [
|
| 53 |
+
{
|
| 54 |
+
"name": "input_ids",
|
| 55 |
+
"element_type": "INT64",
|
| 56 |
+
"shape": [
|
| 57 |
+
"batch",
|
| 58 |
+
"sequence"
|
| 59 |
+
]
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"name": "attention_mask",
|
| 63 |
+
"element_type": "INT64",
|
| 64 |
+
"shape": [
|
| 65 |
+
"batch",
|
| 66 |
+
"sequence"
|
| 67 |
+
]
|
| 68 |
+
}
|
| 69 |
+
],
|
| 70 |
+
"outputs": [
|
| 71 |
+
{
|
| 72 |
+
"name": "logits",
|
| 73 |
+
"element_type": "FLOAT",
|
| 74 |
+
"shape": [
|
| 75 |
+
"batch",
|
| 76 |
+
4
|
| 77 |
+
]
|
| 78 |
+
}
|
| 79 |
+
],
|
| 80 |
+
"operators": {
|
| 81 |
+
"Add": 244,
|
| 82 |
+
"And": 2,
|
| 83 |
+
"Cast": 8,
|
| 84 |
+
"Concat": 100,
|
| 85 |
+
"Constant": 548,
|
| 86 |
+
"ConstantOfShape": 4,
|
| 87 |
+
"CumSum": 1,
|
| 88 |
+
"Div": 24,
|
| 89 |
+
"Equal": 4,
|
| 90 |
+
"Erf": 24,
|
| 91 |
+
"Expand": 3,
|
| 92 |
+
"Flatten": 1,
|
| 93 |
+
"Gather": 58,
|
| 94 |
+
"GatherElements": 1,
|
| 95 |
+
"Gemm": 2,
|
| 96 |
+
"GreaterOrEqual": 1,
|
| 97 |
+
"LayerNormalization": 49,
|
| 98 |
+
"MatMul": 192,
|
| 99 |
+
"Mul": 77,
|
| 100 |
+
"Not": 1,
|
| 101 |
+
"Range": 3,
|
| 102 |
+
"Reshape": 101,
|
| 103 |
+
"Shape": 57,
|
| 104 |
+
"Softmax": 24,
|
| 105 |
+
"Tanh": 1,
|
| 106 |
+
"Transpose": 96,
|
| 107 |
+
"Unsqueeze": 207,
|
| 108 |
+
"Where": 4
|
| 109 |
+
},
|
| 110 |
+
"external_tensor_files": [],
|
| 111 |
+
"validated_provider": "CPUExecutionProvider",
|
| 112 |
+
"numerical_check_passed": true,
|
| 113 |
+
"validation_report": "validation/fp32.json",
|
| 114 |
+
"accuracy_evaluated": false,
|
| 115 |
+
"accelerator_execution_tested": false
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"id": "fp16",
|
| 119 |
+
"path": "onnx/model_fp16.onnx",
|
| 120 |
+
"recommended_default": false,
|
| 121 |
+
"auto_select": false,
|
| 122 |
+
"status": "numerical-smoke-tests-passed",
|
| 123 |
+
"size_bytes": 711340748,
|
| 124 |
+
"sha256": "a0da0f46c5026489c37137b5f455e092e09ac48eafd031bec6f05433c5c2ec01",
|
| 125 |
+
"opsets": {
|
| 126 |
+
"ai.onnx": 17
|
| 127 |
+
},
|
| 128 |
+
"ir_version": 8,
|
| 129 |
+
"inputs": [
|
| 130 |
+
{
|
| 131 |
+
"name": "input_ids",
|
| 132 |
+
"element_type": "INT64",
|
| 133 |
+
"shape": [
|
| 134 |
+
"batch",
|
| 135 |
+
"sequence"
|
| 136 |
+
]
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"name": "attention_mask",
|
| 140 |
+
"element_type": "INT64",
|
| 141 |
+
"shape": [
|
| 142 |
+
"batch",
|
| 143 |
+
"sequence"
|
| 144 |
+
]
|
| 145 |
+
}
|
| 146 |
+
],
|
| 147 |
+
"outputs": [
|
| 148 |
+
{
|
| 149 |
+
"name": "logits",
|
| 150 |
+
"element_type": "FLOAT",
|
| 151 |
+
"shape": [
|
| 152 |
+
"batch",
|
| 153 |
+
4
|
| 154 |
+
]
|
| 155 |
+
}
|
| 156 |
+
],
|
| 157 |
+
"operators": {
|
| 158 |
+
"Add": 244,
|
| 159 |
+
"And": 2,
|
| 160 |
+
"Cast": 9,
|
| 161 |
+
"Concat": 100,
|
| 162 |
+
"Constant": 548,
|
| 163 |
+
"ConstantOfShape": 4,
|
| 164 |
+
"CumSum": 1,
|
| 165 |
+
"Div": 24,
|
| 166 |
+
"Equal": 4,
|
| 167 |
+
"Erf": 24,
|
| 168 |
+
"Expand": 3,
|
| 169 |
+
"Flatten": 1,
|
| 170 |
+
"Gather": 58,
|
| 171 |
+
"GatherElements": 1,
|
| 172 |
+
"Gemm": 2,
|
| 173 |
+
"GreaterOrEqual": 1,
|
| 174 |
+
"LayerNormalization": 49,
|
| 175 |
+
"MatMul": 192,
|
| 176 |
+
"Mul": 77,
|
| 177 |
+
"Not": 1,
|
| 178 |
+
"Range": 3,
|
| 179 |
+
"Reshape": 101,
|
| 180 |
+
"Shape": 57,
|
| 181 |
+
"Softmax": 24,
|
| 182 |
+
"Tanh": 1,
|
| 183 |
+
"Transpose": 96,
|
| 184 |
+
"Unsqueeze": 207,
|
| 185 |
+
"Where": 4
|
| 186 |
+
},
|
| 187 |
+
"external_tensor_files": [],
|
| 188 |
+
"validated_provider": "CPUExecutionProvider",
|
| 189 |
+
"numerical_check_passed": true,
|
| 190 |
+
"validation_report": "validation/fp16.json",
|
| 191 |
+
"accuracy_evaluated": false,
|
| 192 |
+
"accelerator_execution_tested": false
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"id": "int8",
|
| 196 |
+
"path": "onnx/model_int8.onnx",
|
| 197 |
+
"recommended_default": false,
|
| 198 |
+
"auto_select": false,
|
| 199 |
+
"status": "experimental-parity-failed",
|
| 200 |
+
"size_bytes": 514268444,
|
| 201 |
+
"sha256": "bc1b9cb5a7a63fb7c5b67de3556e9e43cb4537bd6ce6bae3e6ad7cfce9552d23",
|
| 202 |
+
"opsets": {
|
| 203 |
+
"ai.onnx": 17
|
| 204 |
+
},
|
| 205 |
+
"ir_version": 8,
|
| 206 |
+
"inputs": [
|
| 207 |
+
{
|
| 208 |
+
"name": "input_ids",
|
| 209 |
+
"element_type": "INT64",
|
| 210 |
+
"shape": [
|
| 211 |
+
"batch",
|
| 212 |
+
"sequence"
|
| 213 |
+
]
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"name": "attention_mask",
|
| 217 |
+
"element_type": "INT64",
|
| 218 |
+
"shape": [
|
| 219 |
+
"batch",
|
| 220 |
+
"sequence"
|
| 221 |
+
]
|
| 222 |
+
}
|
| 223 |
+
],
|
| 224 |
+
"outputs": [
|
| 225 |
+
{
|
| 226 |
+
"name": "logits",
|
| 227 |
+
"element_type": "FLOAT",
|
| 228 |
+
"shape": [
|
| 229 |
+
"batch",
|
| 230 |
+
4
|
| 231 |
+
]
|
| 232 |
+
}
|
| 233 |
+
],
|
| 234 |
+
"operators": {
|
| 235 |
+
"Add": 246,
|
| 236 |
+
"And": 2,
|
| 237 |
+
"Cast": 154,
|
| 238 |
+
"Concat": 100,
|
| 239 |
+
"Constant": 548,
|
| 240 |
+
"ConstantOfShape": 4,
|
| 241 |
+
"CumSum": 1,
|
| 242 |
+
"Div": 24,
|
| 243 |
+
"DynamicQuantizeLinear": 98,
|
| 244 |
+
"Equal": 4,
|
| 245 |
+
"Erf": 24,
|
| 246 |
+
"Expand": 3,
|
| 247 |
+
"Flatten": 1,
|
| 248 |
+
"Gather": 58,
|
| 249 |
+
"GatherElements": 1,
|
| 250 |
+
"GreaterOrEqual": 1,
|
| 251 |
+
"LayerNormalization": 49,
|
| 252 |
+
"MatMul": 48,
|
| 253 |
+
"MatMulInteger": 146,
|
| 254 |
+
"Mul": 369,
|
| 255 |
+
"Not": 1,
|
| 256 |
+
"Range": 3,
|
| 257 |
+
"Reshape": 101,
|
| 258 |
+
"Shape": 57,
|
| 259 |
+
"Softmax": 24,
|
| 260 |
+
"Tanh": 1,
|
| 261 |
+
"Transpose": 96,
|
| 262 |
+
"Unsqueeze": 207,
|
| 263 |
+
"Where": 4
|
| 264 |
+
},
|
| 265 |
+
"external_tensor_files": [],
|
| 266 |
+
"validated_provider": "CPUExecutionProvider",
|
| 267 |
+
"numerical_check_passed": false,
|
| 268 |
+
"validation_report": "validation/int8.json",
|
| 269 |
+
"accuracy_evaluated": false,
|
| 270 |
+
"accelerator_execution_tested": false
|
| 271 |
+
}
|
| 272 |
+
],
|
| 273 |
+
"limitations": [
|
| 274 |
+
"Numerical conversion checks only; no labeled accuracy benchmark.",
|
| 275 |
+
"INT8 is experimental and failed the documented numerical acceptance gate.",
|
| 276 |
+
"No cross-platform or accelerated-provider compatibility certification.",
|
| 277 |
+
"Checksums establish file integrity; they are not an independent publisher signature."
|
| 278 |
+
]
|
| 279 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb
|
| 3 |
+
size 1421503560
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ddd1173f2ef517ad499965e5029fae8099a8054a2bc76d8134e5889cc4ed1b3e
|
| 3 |
+
size 1421900913
|
onnx/model_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0da0f46c5026489c37137b5f455e092e09ac48eafd031bec6f05433c5c2ec01
|
| 3 |
+
size 711340748
|
onnx/model_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc1b9cb5a7a63fb7c5b67de3556e9e43cb4537bd6ce6bae3e6ad7cfce9552d23
|
| 3 |
+
size 514268444
|
requirements-build.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Exact versions used to build and validate this release on Python 3.13 / macOS arm64.
|
| 2 |
+
# Runtime packages for other platforms may need different supported versions.
|
| 3 |
+
torch==2.14.0
|
| 4 |
+
transformers==5.17.0
|
| 5 |
+
tokenizers==0.23.2
|
| 6 |
+
huggingface-hub==1.31.0
|
| 7 |
+
safetensors==0.8.0
|
| 8 |
+
numpy==2.5.3
|
| 9 |
+
onnx==1.23.0
|
| 10 |
+
onnxruntime==1.30.0
|
| 11 |
+
onnxconverter-common==1.16.0
|
| 12 |
+
protobuf==7.36.2
|
| 13 |
+
ml-dtypes==0.6.0
|
requirements-runtime.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Validated ONNX CPU example environment; no torch/transformers required.
|
| 2 |
+
# These versions have platform-specific availability; see README.
|
| 3 |
+
onnxruntime==1.30.0
|
| 4 |
+
tokenizers==0.23.2
|
| 5 |
+
numpy==2.5.3
|
scripts/build.py
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Reproducible conversions of the pinned Pangram EditLens checkpoint.
|
| 2 |
+
|
| 3 |
+
License: CC-BY-NC-SA-4.0. See LICENSE and NOTICE in the repository root.
|
| 4 |
+
Run each stage in a separate process to bound peak conversion memory.
|
| 5 |
+
"""
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import argparse
|
| 9 |
+
import hashlib
|
| 10 |
+
import json
|
| 11 |
+
from pathlib import Path
|
| 12 |
+
|
| 13 |
+
UPSTREAM = "pangram/editlens_roberta-large"
|
| 14 |
+
REVISION = "f93e1ace74528cfb48f337ab2fe946fb71a728cb"
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def digest(path: Path) -> str:
|
| 18 |
+
with path.open("rb") as f:
|
| 19 |
+
return hashlib.file_digest(f, "sha256").hexdigest()
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def verify_source(source: Path, output: Path) -> None:
|
| 23 |
+
metadata = json.loads((output / "upstream/metadata.json").read_text())
|
| 24 |
+
if metadata["repo_id"] != UPSTREAM or metadata["revision"] != REVISION:
|
| 25 |
+
raise RuntimeError("Unexpected upstream identity")
|
| 26 |
+
for info in metadata["files"]:
|
| 27 |
+
if info["name"] in {"README.md", ".gitattributes"}:
|
| 28 |
+
continue
|
| 29 |
+
if digest(source / info["name"]) != info["sha256"]:
|
| 30 |
+
raise RuntimeError("Source differs from pinned upstream: " + info["name"])
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def export(source: Path, output: Path) -> None:
|
| 34 |
+
import torch
|
| 35 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 36 |
+
|
| 37 |
+
torch.set_num_threads(4)
|
| 38 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
| 39 |
+
source, local_files_only=True, dtype=torch.float32,
|
| 40 |
+
attn_implementation="eager",
|
| 41 |
+
).eval()
|
| 42 |
+
tokenizer = AutoTokenizer.from_pretrained(source, local_files_only=True)
|
| 43 |
+
|
| 44 |
+
class Classifier(torch.nn.Module):
|
| 45 |
+
def __init__(self, wrapped):
|
| 46 |
+
super().__init__()
|
| 47 |
+
self.wrapped = wrapped
|
| 48 |
+
|
| 49 |
+
def forward(self, input_ids, attention_mask):
|
| 50 |
+
return self.wrapped(input_ids=input_ids, attention_mask=attention_mask).logits
|
| 51 |
+
|
| 52 |
+
sample = tokenizer("A short example used only to trace the classifier graph.", return_tensors="pt")
|
| 53 |
+
with torch.inference_mode():
|
| 54 |
+
torch.onnx.export(
|
| 55 |
+
Classifier(model), (sample["input_ids"], sample["attention_mask"]),
|
| 56 |
+
str(output / "onnx/model.onnx"),
|
| 57 |
+
input_names=["input_ids", "attention_mask"], output_names=["logits"],
|
| 58 |
+
dynamic_axes={"input_ids": {0: "batch", 1: "sequence"},
|
| 59 |
+
"attention_mask": {0: "batch", 1: "sequence"},
|
| 60 |
+
"logits": {0: "batch"}},
|
| 61 |
+
opset_version=17, dynamo=False, external_data=False,
|
| 62 |
+
)
|
| 63 |
+
print("FP32 export complete", flush=True)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def fp16(output: Path) -> None:
|
| 67 |
+
import onnx
|
| 68 |
+
from onnxconverter_common import float16
|
| 69 |
+
|
| 70 |
+
graph = onnx.load(output / "onnx/model.onnx")
|
| 71 |
+
graph = float16.convert_float_to_float16(graph, keep_io_types=True)
|
| 72 |
+
onnx.save(graph, output / "onnx/model_fp16.onnx")
|
| 73 |
+
print("FP16 conversion complete (integer inputs and FP32 logits retained)", flush=True)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def int8(output: Path) -> None:
|
| 77 |
+
from onnxruntime.quantization import QuantType, quantize_dynamic
|
| 78 |
+
|
| 79 |
+
quantize_dynamic(
|
| 80 |
+
str(output / "onnx/model.onnx"), str(output / "onnx/model_int8.onnx"),
|
| 81 |
+
weight_type=QuantType.QInt8, per_channel=True, reduce_range=False,
|
| 82 |
+
op_types_to_quantize=["MatMul"],
|
| 83 |
+
extra_options={"MatMulConstBOnly": True},
|
| 84 |
+
)
|
| 85 |
+
print("INT8 dynamic MatMul conversion complete (embeddings retained in FP32)", flush=True)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def reference(source: Path, output: Path) -> None:
|
| 89 |
+
import numpy as np
|
| 90 |
+
import torch
|
| 91 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 92 |
+
|
| 93 |
+
torch.set_num_threads(4)
|
| 94 |
+
tokenizer = AutoTokenizer.from_pretrained(source, local_files_only=True)
|
| 95 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
| 96 |
+
source, local_files_only=True, dtype=torch.float32,
|
| 97 |
+
attn_implementation="eager",
|
| 98 |
+
).eval()
|
| 99 |
+
cases = json.loads((output / "validation/fixtures.json").read_text())
|
| 100 |
+
arrays, metadata = {}, []
|
| 101 |
+
with torch.inference_mode():
|
| 102 |
+
for case in cases:
|
| 103 |
+
inputs = tokenizer(case["texts"], padding=True, truncation=True,
|
| 104 |
+
max_length=512, return_tensors="pt")
|
| 105 |
+
logits = model(**inputs).logits.cpu().numpy()
|
| 106 |
+
key = case["id"]
|
| 107 |
+
arrays[key + "_input_ids"] = inputs["input_ids"].numpy()
|
| 108 |
+
arrays[key + "_attention_mask"] = inputs["attention_mask"].numpy()
|
| 109 |
+
arrays[key + "_logits"] = logits
|
| 110 |
+
metadata.append({"id": key, "shape": list(inputs["input_ids"].shape)})
|
| 111 |
+
print("Reference", key, metadata[-1]["shape"], flush=True)
|
| 112 |
+
np.savez_compressed(output / "validation/reference.npz", **arrays)
|
| 113 |
+
(output / "validation/reference.json").write_text(json.dumps({
|
| 114 |
+
"upstream": UPSTREAM, "revision": REVISION, "precision": "float32",
|
| 115 |
+
"attention_implementation": "eager", "provider": "PyTorch CPU",
|
| 116 |
+
"cases": metadata, "purpose": "Numerical conversion checks; not a labeled accuracy benchmark.",
|
| 117 |
+
"source_weights_sha256": digest(source / "model.safetensors"),
|
| 118 |
+
"fixtures_sha256": digest(output / "validation/fixtures.json"),
|
| 119 |
+
"reference_npz_sha256": digest(output / "validation/reference.npz"),
|
| 120 |
+
}, indent=2) + "\n")
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
if __name__ == "__main__":
|
| 124 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 125 |
+
parser.add_argument("stage", choices=["export", "fp16", "int8", "reference"])
|
| 126 |
+
parser.add_argument("--source", type=Path, required=True)
|
| 127 |
+
parser.add_argument("--output", type=Path, default=Path(__file__).resolve().parents[1])
|
| 128 |
+
args = parser.parse_args()
|
| 129 |
+
(args.output / "onnx").mkdir(parents=True, exist_ok=True)
|
| 130 |
+
if args.stage in {"export", "reference"}:
|
| 131 |
+
verify_source(args.source, args.output)
|
| 132 |
+
if args.stage == "export":
|
| 133 |
+
export(args.source, args.output)
|
| 134 |
+
elif args.stage == "fp16":
|
| 135 |
+
fp16(args.output)
|
| 136 |
+
elif args.stage == "int8":
|
| 137 |
+
int8(args.output)
|
| 138 |
+
else:
|
| 139 |
+
reference(args.source, args.output)
|
scripts/package.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Verify the source/artifacts and generate the public manifest and checksums.
|
| 2 |
+
|
| 3 |
+
License: CC-BY-NC-SA-4.0. Run after conversion/validation and documentation changes.
|
| 4 |
+
"""
|
| 5 |
+
import gc
|
| 6 |
+
import hashlib
|
| 7 |
+
import importlib.metadata
|
| 8 |
+
import json
|
| 9 |
+
import platform
|
| 10 |
+
from collections import Counter
|
| 11 |
+
from datetime import datetime, timezone
|
| 12 |
+
from pathlib import Path
|
| 13 |
+
|
| 14 |
+
import onnx
|
| 15 |
+
|
| 16 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def sha256(path):
|
| 20 |
+
with path.open("rb") as f:
|
| 21 |
+
return hashlib.file_digest(f, "sha256").hexdigest()
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def main():
|
| 25 |
+
source = json.loads((ROOT / "upstream/metadata.json").read_text())
|
| 26 |
+
for info in source["files"]:
|
| 27 |
+
name = info["name"]
|
| 28 |
+
target = ROOT / ("upstream/README.md" if name == "README.md" else name)
|
| 29 |
+
if name == ".gitattributes":
|
| 30 |
+
continue # Our generated model files need their own LFS rules.
|
| 31 |
+
if sha256(target) != info["sha256"]:
|
| 32 |
+
raise RuntimeError("Original source file changed: " + name)
|
| 33 |
+
variants = []
|
| 34 |
+
for key, filename in [("fp32", "model.onnx"), ("fp16", "model_fp16.onnx"), ("int8", "model_int8.onnx")]:
|
| 35 |
+
path = ROOT / "onnx" / filename
|
| 36 |
+
onnx.checker.check_model(str(path), full_check=True)
|
| 37 |
+
model = onnx.load(path)
|
| 38 |
+
report = json.loads((ROOT / "validation" / (key + ".json")).read_text())
|
| 39 |
+
if report["model_sha256"] != sha256(path) or report["reference_npz_sha256"] != sha256(ROOT / "validation/reference.npz") or report["fixtures_sha256"] != sha256(ROOT / "validation/fixtures.json"):
|
| 40 |
+
raise RuntimeError("Stale validation report: " + key)
|
| 41 |
+
if key != "int8" and not report["passed"]:
|
| 42 |
+
raise RuntimeError("Required numerical check failed: " + key)
|
| 43 |
+
variants.append({
|
| 44 |
+
"id": key, "path": "onnx/" + filename,
|
| 45 |
+
"recommended_default": key == "fp32", "auto_select": key == "fp32",
|
| 46 |
+
"status": "experimental-parity-failed" if not report["passed"] else "numerical-smoke-tests-passed",
|
| 47 |
+
"size_bytes": path.stat().st_size, "sha256": sha256(path),
|
| 48 |
+
"opsets": {v.domain or "ai.onnx": v.version for v in model.opset_import},
|
| 49 |
+
"ir_version": model.ir_version,
|
| 50 |
+
"inputs": [{"name": v.name, "element_type": onnx.TensorProto.DataType.Name(v.type.tensor_type.elem_type),
|
| 51 |
+
"shape": [d.dim_param or d.dim_value for d in v.type.tensor_type.shape.dim]} for v in model.graph.input],
|
| 52 |
+
"outputs": [{"name": v.name, "element_type": onnx.TensorProto.DataType.Name(v.type.tensor_type.elem_type),
|
| 53 |
+
"shape": [d.dim_param or d.dim_value for d in v.type.tensor_type.shape.dim]} for v in model.graph.output],
|
| 54 |
+
"operators": dict(sorted(Counter((n.domain + ":" if n.domain else "") + n.op_type for n in model.graph.node).items())),
|
| 55 |
+
"external_tensor_files": [], "validated_provider": report["provider"],
|
| 56 |
+
"numerical_check_passed": report["passed"], "validation_report": "validation/" + key + ".json",
|
| 57 |
+
"accuracy_evaluated": False, "accelerator_execution_tested": False,
|
| 58 |
+
})
|
| 59 |
+
if any(v.data_location == onnx.TensorProto.EXTERNAL for v in model.graph.initializer):
|
| 60 |
+
raise RuntimeError("Unexpected external tensor data")
|
| 61 |
+
del model
|
| 62 |
+
gc.collect()
|
| 63 |
+
versions = {name: importlib.metadata.version(name) for name in [
|
| 64 |
+
"torch", "transformers", "tokenizers", "huggingface-hub", "safetensors", "numpy",
|
| 65 |
+
"onnx", "onnxruntime", "onnxconverter-common", "protobuf", "ml-dtypes"]}
|
| 66 |
+
manifest = {
|
| 67 |
+
"schema_version": 1, "repository": "CoderBak/editlens_roberta_modelkit",
|
| 68 |
+
"license": "CC-BY-NC-SA-4.0", "public": True, "gated": False,
|
| 69 |
+
"source_repository": source["repo_id"], "source_revision": source["revision"],
|
| 70 |
+
"original_weights": {"path": "model.safetensors", "precision": "float32",
|
| 71 |
+
"size_bytes": (ROOT / "model.safetensors").stat().st_size,
|
| 72 |
+
"sha256": sha256(ROOT / "model.safetensors"), "unchanged_from_upstream": True},
|
| 73 |
+
"generated_utc": datetime.now(timezone.utc).isoformat(),
|
| 74 |
+
"build_environment": {"python": platform.python_version(), "os": platform.system(),
|
| 75 |
+
"os_version": platform.mac_ver()[0], "architecture": platform.machine(), "packages": versions},
|
| 76 |
+
"maximum_sequence_tokens_including_special_tokens": 512, "num_labels": 4,
|
| 77 |
+
"default_variant": "fp32", "variants": variants,
|
| 78 |
+
"limitations": ["Numerical conversion checks only; no labeled accuracy benchmark.",
|
| 79 |
+
"INT8 is experimental and failed the documented numerical acceptance gate.",
|
| 80 |
+
"No cross-platform or accelerated-provider compatibility certification.",
|
| 81 |
+
"Checksums establish file integrity; they are not an independent publisher signature."],
|
| 82 |
+
}
|
| 83 |
+
(ROOT / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n")
|
| 84 |
+
files = sorted(p for p in ROOT.rglob("*") if p.is_file() and p.name != "SHA256SUMS"
|
| 85 |
+
and not any(part in {"__pycache__", ".git", ".cache", ".venv"} for part in p.relative_to(ROOT).parts)
|
| 86 |
+
and p.name != ".DS_Store" and p.suffix != ".pyc")
|
| 87 |
+
(ROOT / "SHA256SUMS").write_text("".join(sha256(p) + " " + p.relative_to(ROOT).as_posix() + "\n" for p in files))
|
| 88 |
+
print(json.dumps({"verified_source": source["revision"], "published_files": len(files) + 1,
|
| 89 |
+
"variants": [{"id": v["id"], "bytes": v["size_bytes"], "status": v["status"]} for v in variants]}, indent=2))
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
if __name__ == "__main__":
|
| 93 |
+
main()
|
scripts/validate.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Check a conversion against recorded PyTorch FP32 outputs, one model per process.
|
| 2 |
+
|
| 3 |
+
License: CC-BY-NC-SA-4.0. Checks are numerical smoke tests, not detector accuracy.
|
| 4 |
+
"""
|
| 5 |
+
import argparse
|
| 6 |
+
import hashlib
|
| 7 |
+
import json
|
| 8 |
+
import platform
|
| 9 |
+
import time
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
import onnxruntime as ort
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def softmax(x):
|
| 17 |
+
ex = np.exp(x.astype(np.float64) - x.max(axis=-1, keepdims=True))
|
| 18 |
+
return ex / ex.sum(axis=-1, keepdims=True)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def digest(path):
|
| 22 |
+
with path.open("rb") as f:
|
| 23 |
+
return hashlib.file_digest(f, "sha256").hexdigest()
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def main():
|
| 27 |
+
ort.disable_telemetry_events()
|
| 28 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 29 |
+
p.add_argument("variant", choices=["fp32", "fp16", "int8"])
|
| 30 |
+
p.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[1])
|
| 31 |
+
args = p.parse_args()
|
| 32 |
+
files = {"fp32": "model.onnx", "fp16": "model_fp16.onnx", "int8": "model_int8.onnx"}
|
| 33 |
+
limits = {"fp32": 0.0001, "fp16": 0.01, "int8": 0.05}
|
| 34 |
+
config = ort.SessionOptions()
|
| 35 |
+
config.intra_op_num_threads = 4
|
| 36 |
+
config.inter_op_num_threads = 1
|
| 37 |
+
config.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
|
| 38 |
+
started = time.perf_counter()
|
| 39 |
+
session = ort.InferenceSession(str(args.root / "onnx" / files[args.variant]),
|
| 40 |
+
sess_options=config, providers=["CPUExecutionProvider"])
|
| 41 |
+
load_seconds = time.perf_counter() - started
|
| 42 |
+
reference_info = json.loads((args.root / "validation/reference.json").read_text())
|
| 43 |
+
reference_hash = digest(args.root / "validation/reference.npz")
|
| 44 |
+
fixture_hash = digest(args.root / "validation/fixtures.json")
|
| 45 |
+
if reference_hash != reference_info["reference_npz_sha256"] or fixture_hash != reference_info["fixtures_sha256"]:
|
| 46 |
+
raise RuntimeError("Reference tensors or fixtures changed; regenerate reference outputs.")
|
| 47 |
+
cases = reference_info["cases"]
|
| 48 |
+
reference = np.load(args.root / "validation/reference.npz", allow_pickle=False)
|
| 49 |
+
rows = []
|
| 50 |
+
for case in cases:
|
| 51 |
+
key = case["id"]
|
| 52 |
+
feeds = {name: reference[key + "_" + name] for name in ["input_ids", "attention_mask"]}
|
| 53 |
+
started = time.perf_counter()
|
| 54 |
+
actual = session.run(["logits"], feeds)[0]
|
| 55 |
+
elapsed = time.perf_counter() - started
|
| 56 |
+
expected = reference[key + "_logits"]
|
| 57 |
+
if actual.shape != expected.shape or not np.isfinite(actual).all():
|
| 58 |
+
raise RuntimeError("Invalid output for " + key)
|
| 59 |
+
rows.append({"id": key, "shape": case["shape"],
|
| 60 |
+
"max_absolute_logit_difference": float(np.max(np.abs(actual - expected))),
|
| 61 |
+
"max_absolute_probability_difference": float(np.max(np.abs(softmax(actual) - softmax(expected)))),
|
| 62 |
+
"argmax_agreements": int(np.sum(actual.argmax(-1) == expected.argmax(-1))),
|
| 63 |
+
"samples": len(actual), "single_run_seconds": elapsed})
|
| 64 |
+
print(args.variant, key, rows[-1], flush=True)
|
| 65 |
+
worst = max(row["max_absolute_probability_difference"] for row in rows)
|
| 66 |
+
disagreements = sum(row["samples"] - row["argmax_agreements"] for row in rows)
|
| 67 |
+
report = {"variant": args.variant, "model": "onnx/" + files[args.variant],
|
| 68 |
+
"model_sha256": digest(args.root / "onnx" / files[args.variant]),
|
| 69 |
+
"reference_npz_sha256": reference_hash, "fixtures_sha256": fixture_hash,
|
| 70 |
+
"provider": "CPUExecutionProvider", "onnxruntime": ort.__version__,
|
| 71 |
+
"platform": {"os": platform.system(), "version": platform.mac_ver()[0],
|
| 72 |
+
"machine": platform.machine()}, "threads": 4,
|
| 73 |
+
"load_seconds": load_seconds, "cases": rows,
|
| 74 |
+
"max_absolute_probability_difference": worst, "argmax_disagreements": disagreements,
|
| 75 |
+
"samples": sum(row["samples"] for row in rows),
|
| 76 |
+
"acceptance_probability_tolerance": limits[args.variant],
|
| 77 |
+
"passed": worst <= limits[args.variant] and disagreements == 0,
|
| 78 |
+
"limitations": "Synthetic unlabeled conversion fixtures. Timing is one run per shape, not a comparative performance benchmark. No Windows, Linux, CUDA, DirectML, WinML or CoreML validation is implied."}
|
| 79 |
+
(args.root / "validation" / (args.variant + ".json")).write_text(json.dumps(report, indent=2) + "\n")
|
| 80 |
+
if not report["passed"]:
|
| 81 |
+
raise SystemExit("Conversion acceptance check failed; inspect report before publication.")
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
if __name__ == "__main__":
|
| 85 |
+
main()
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"cls_token": "<s>",
|
| 4 |
+
"eos_token": "</s>",
|
| 5 |
+
"mask_token": {
|
| 6 |
+
"content": "<mask>",
|
| 7 |
+
"lstrip": true,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"unk_token": "<unk>"
|
| 15 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"mask_token": "<mask>",
|
| 10 |
+
"model_max_length": 512,
|
| 11 |
+
"pad_token": "<pad>",
|
| 12 |
+
"sep_token": "</s>",
|
| 13 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 14 |
+
"trim_offsets": true,
|
| 15 |
+
"unk_token": "<unk>"
|
| 16 |
+
}
|
upstream/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
extra_gated_fields:
|
| 3 |
+
First Name: text
|
| 4 |
+
Last Name: text
|
| 5 |
+
Institution: text
|
| 6 |
+
Country: country
|
| 7 |
+
How do you intend to use this model?: text
|
| 8 |
+
I agree to use this model for non-commercial use ONLY: checkbox
|
| 9 |
+
base_model: FacebookAI/roberta-large
|
| 10 |
+
library_name: peft
|
| 11 |
+
tags:
|
| 12 |
+
- base_model:FacebookAI/roberta-large
|
| 13 |
+
- ai_detection
|
| 14 |
+
datasets:
|
| 15 |
+
- pangram/editlens_iclr
|
| 16 |
+
language:
|
| 17 |
+
- en
|
| 18 |
+
license: cc-by-nc-sa-4.0
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Model Card for editlens_roberta-large by Pangram
|
| 22 |
+
|
| 23 |
+
This model is a `FacebookAI/roberta-large` base model finetuned for AI detection according to the techniques described in the EditLens paper by Thai et al. (ICLR 2026)
|
| 24 |
+
|
| 25 |
+
## Model Details
|
| 26 |
+
|
| 27 |
+
- **Developed by:** Pangram
|
| 28 |
+
- **Language(s) (NLP):** English
|
| 29 |
+
- **License:** CC BY-NC-SA 4.0
|
| 30 |
+
- **Finetuned from model:** `FacebookAI/roberta-large`
|
| 31 |
+
|
| 32 |
+
### Resources
|
| 33 |
+
|
| 34 |
+
- **Repository:** https://github.com/pangramlabs/EditLens
|
| 35 |
+
- **Paper:** https://arxiv.org/abs/2510.03154
|
| 36 |
+
|
| 37 |
+
## Citation
|
| 38 |
+
|
| 39 |
+
**BibTeX:**
|
| 40 |
+
```
|
| 41 |
+
@misc{thai2025editlensquantifyingextentai,
|
| 42 |
+
title={EditLens: Quantifying the Extent of AI Editing in Text},
|
| 43 |
+
author={Katherine Thai and Bradley Emi and Elyas Masrour and Mohit Iyyer},
|
| 44 |
+
year={2025},
|
| 45 |
+
eprint={2510.03154},
|
| 46 |
+
archivePrefix={arXiv},
|
| 47 |
+
primaryClass={cs.CL},
|
| 48 |
+
url={https://arxiv.org/abs/2510.03154},
|
| 49 |
+
}
|
| 50 |
+
```
|
| 51 |
+
## Model Card Contact
|
| 52 |
+
|
| 53 |
+
katherine@pangram.com
|
upstream/metadata.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repo_id": "pangram/editlens_roberta-large",
|
| 3 |
+
"revision": "f93e1ace74528cfb48f337ab2fe946fb71a728cb",
|
| 4 |
+
"gated": "manual",
|
| 5 |
+
"card": {
|
| 6 |
+
"base_model": "FacebookAI/roberta-large",
|
| 7 |
+
"datasets": [
|
| 8 |
+
"pangram/editlens_iclr"
|
| 9 |
+
],
|
| 10 |
+
"language": [
|
| 11 |
+
"en"
|
| 12 |
+
],
|
| 13 |
+
"library_name": "peft",
|
| 14 |
+
"license": "cc-by-nc-sa-4.0",
|
| 15 |
+
"tags": [
|
| 16 |
+
"base_model:FacebookAI/roberta-large",
|
| 17 |
+
"ai_detection"
|
| 18 |
+
],
|
| 19 |
+
"extra_gated_fields": {
|
| 20 |
+
"First Name": "text",
|
| 21 |
+
"Last Name": "text",
|
| 22 |
+
"Institution": "text",
|
| 23 |
+
"Country": "country",
|
| 24 |
+
"How do you intend to use this model?": "text",
|
| 25 |
+
"I agree to use this model for non-commercial use ONLY": "checkbox"
|
| 26 |
+
}
|
| 27 |
+
},
|
| 28 |
+
"files": [
|
| 29 |
+
{
|
| 30 |
+
"name": ".gitattributes",
|
| 31 |
+
"size": 1519,
|
| 32 |
+
"lfs": null,
|
| 33 |
+
"sha256": "11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"name": "README.md",
|
| 37 |
+
"size": 1337,
|
| 38 |
+
"lfs": null,
|
| 39 |
+
"sha256": "f50caae832ee1dfc5460b2a922e74fe77e21e79c10825477bf6a8c51505781dc"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"name": "config.json",
|
| 43 |
+
"size": 932,
|
| 44 |
+
"lfs": null,
|
| 45 |
+
"sha256": "54b63c7e7298bdd5a49180a668e648a020d61cae92abdbae0a96ac3bf5a7ba18"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"name": "merges.txt",
|
| 49 |
+
"size": 456318,
|
| 50 |
+
"lfs": null,
|
| 51 |
+
"sha256": "1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5"
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"name": "model.safetensors",
|
| 55 |
+
"size": 1421503560,
|
| 56 |
+
"lfs": {
|
| 57 |
+
"size": 1421503560,
|
| 58 |
+
"sha256": "869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb",
|
| 59 |
+
"pointer_size": 135
|
| 60 |
+
},
|
| 61 |
+
"sha256": "869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb"
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"name": "special_tokens_map.json",
|
| 65 |
+
"size": 280,
|
| 66 |
+
"lfs": null,
|
| 67 |
+
"sha256": "06e405a36dfe4b9604f484f6a1e619af1a7f7d09e34a8555eb0b77b66318067f"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"name": "tokenizer.json",
|
| 71 |
+
"size": 3558642,
|
| 72 |
+
"lfs": null,
|
| 73 |
+
"sha256": "2bb1a22cfbe25b8e5a232b7fc4d7fc5073923b45724a5f813b00811bb6620f66"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"name": "tokenizer_config.json",
|
| 77 |
+
"size": 359,
|
| 78 |
+
"lfs": null,
|
| 79 |
+
"sha256": "4903bcd294e8ff8b840eb9c21909d2f910b466d250ac6e298a7438a7da63ef0d"
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"name": "vocab.json",
|
| 83 |
+
"size": 798293,
|
| 84 |
+
"lfs": null,
|
| 85 |
+
"sha256": "ed19656ea1707df69134c4af35c8ceda2cc9860bf2c3495026153a133670ab5e"
|
| 86 |
+
}
|
| 87 |
+
]
|
| 88 |
+
}
|
validation/fixtures.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "empty",
|
| 4 |
+
"texts": [
|
| 5 |
+
""
|
| 6 |
+
]
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"id": "minimal",
|
| 10 |
+
"texts": [
|
| 11 |
+
"Hi."
|
| 12 |
+
]
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"id": "short",
|
| 16 |
+
"texts": [
|
| 17 |
+
"The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside."
|
| 18 |
+
]
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"id": "mixed_padding",
|
| 22 |
+
"texts": [
|
| 23 |
+
"The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside.",
|
| 24 |
+
"A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision.",
|
| 25 |
+
"Our measurements compare numerical outputs from a converted model with those of its source checkpoint. Agreement on these examples does not establish that either model is accurate on real documents.",
|
| 26 |
+
"I thought the meeting was on Thursday. The calendar said Tuesday. By the time I noticed, everyone had already gone downstairs for lunch, leaving three empty cups beside the projector."
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": "technical",
|
| 31 |
+
"texts": [
|
| 32 |
+
"The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations.",
|
| 33 |
+
"One paragraph.\n\nA second paragraph, separated by a blank line.\n\nA third paragraph asks whether a single post should be represented as several pieces of text.",
|
| 34 |
+
"Unicode examples: café, naïve, résumé, coöperate, Ελληνικά, 中文. Emoji examples: 🙂 🌧️ 👩🏽💻. Curly punctuation: “hello”—and ‘goodbye’.",
|
| 35 |
+
"Code: function add(a, b) { return a + b; }\nMath: E = mc²; x ≥ 0; p < 0.05.\nURL: https://example.org/path?q=one&lang=en"
|
| 36 |
+
]
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "formatting",
|
| 40 |
+
"texts": [
|
| 41 |
+
"The first result was inconclusive. We changed the order of the samples and repeated the procedure the next morning. The difference persisted, but its cause remained uncertain.",
|
| 42 |
+
"The river bent behind the station,\na pale line in the rain.\nI watched the lights move over it\nand missed the final train.",
|
| 43 |
+
"1. Read the instructions.\n2. Check the dimensions.\n3. Save the original file before making any changes.\n4. Record the software version used for the conversion.",
|
| 44 |
+
"他说这段文字只是用于检查字符编码和分词的转换测试,不应用来评估模型对中文的检测能力。"
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"id": "repetition",
|
| 49 |
+
"texts": [
|
| 50 |
+
"word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word ",
|
| 51 |
+
"word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word "
|
| 52 |
+
]
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"id": "long_512",
|
| 56 |
+
"texts": [
|
| 57 |
+
"A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. A browser extension extracts text from a page, sends it to a local process, and displays the returned classification. The numerical output depends on tokenization, preprocessing, model weights, and execution precision. "
|
| 58 |
+
]
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"id": "long_mixed_batch",
|
| 62 |
+
"texts": [
|
| 63 |
+
"The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. The garden gate stuck after the rain. I lifted it slightly, carried the watering can through, and forgot to close it until the cat followed me outside. ",
|
| 64 |
+
"The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. The proposed experiment holds temperature constant while varying the concentration of the solution. Each condition is repeated independently, and the uncertainty of the measurements is reported with the observations. "
|
| 65 |
+
]
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"id": "whitespace",
|
| 69 |
+
"texts": [
|
| 70 |
+
" \t\n ",
|
| 71 |
+
"A sentencewith unusual spacing."
|
| 72 |
+
]
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"id": "sequence_128",
|
| 76 |
+
"texts": [
|
| 77 |
+
"token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token "
|
| 78 |
+
]
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"id": "sequence_256",
|
| 82 |
+
"texts": [
|
| 83 |
+
"token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token token "
|
| 84 |
+
]
|
| 85 |
+
}
|
| 86 |
+
]
|
validation/fp16.json
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"variant": "fp16",
|
| 3 |
+
"model": "onnx/model_fp16.onnx",
|
| 4 |
+
"model_sha256": "a0da0f46c5026489c37137b5f455e092e09ac48eafd031bec6f05433c5c2ec01",
|
| 5 |
+
"reference_npz_sha256": "401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c",
|
| 6 |
+
"fixtures_sha256": "b4cfec82a9c2839e3231a51a4fe991c5ce83ae516aa61e8fe5f93c235953651b",
|
| 7 |
+
"provider": "CPUExecutionProvider",
|
| 8 |
+
"onnxruntime": "1.30.0",
|
| 9 |
+
"platform": {
|
| 10 |
+
"os": "Darwin",
|
| 11 |
+
"version": "27.2",
|
| 12 |
+
"machine": "arm64"
|
| 13 |
+
},
|
| 14 |
+
"threads": 4,
|
| 15 |
+
"load_seconds": 0.5343481249874458,
|
| 16 |
+
"cases": [
|
| 17 |
+
{
|
| 18 |
+
"id": "empty",
|
| 19 |
+
"shape": [
|
| 20 |
+
1,
|
| 21 |
+
2
|
| 22 |
+
],
|
| 23 |
+
"max_absolute_logit_difference": 0.0014386177062988281,
|
| 24 |
+
"max_absolute_probability_difference": 0.00041073191200602377,
|
| 25 |
+
"argmax_agreements": 1,
|
| 26 |
+
"samples": 1,
|
| 27 |
+
"single_run_seconds": 0.016592583007877693
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": "minimal",
|
| 31 |
+
"shape": [
|
| 32 |
+
1,
|
| 33 |
+
4
|
| 34 |
+
],
|
| 35 |
+
"max_absolute_logit_difference": 0.005922794342041016,
|
| 36 |
+
"max_absolute_probability_difference": 0.0011731637269449813,
|
| 37 |
+
"argmax_agreements": 1,
|
| 38 |
+
"samples": 1,
|
| 39 |
+
"single_run_seconds": 0.01663337499485351
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"id": "short",
|
| 43 |
+
"shape": [
|
| 44 |
+
1,
|
| 45 |
+
33
|
| 46 |
+
],
|
| 47 |
+
"max_absolute_logit_difference": 0.0018864870071411133,
|
| 48 |
+
"max_absolute_probability_difference": 3.8215753048742584e-05,
|
| 49 |
+
"argmax_agreements": 1,
|
| 50 |
+
"samples": 1,
|
| 51 |
+
"single_run_seconds": 0.05756524999742396
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"id": "mixed_padding",
|
| 55 |
+
"shape": [
|
| 56 |
+
4,
|
| 57 |
+
42
|
| 58 |
+
],
|
| 59 |
+
"max_absolute_logit_difference": 0.0039501190185546875,
|
| 60 |
+
"max_absolute_probability_difference": 0.00039417108910300147,
|
| 61 |
+
"argmax_agreements": 4,
|
| 62 |
+
"samples": 4,
|
| 63 |
+
"single_run_seconds": 0.2264625419920776
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"id": "technical",
|
| 67 |
+
"shape": [
|
| 68 |
+
4,
|
| 69 |
+
75
|
| 70 |
+
],
|
| 71 |
+
"max_absolute_logit_difference": 0.009561538696289062,
|
| 72 |
+
"max_absolute_probability_difference": 0.002259090232697658,
|
| 73 |
+
"argmax_agreements": 4,
|
| 74 |
+
"samples": 4,
|
| 75 |
+
"single_run_seconds": 0.40222375001758337
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"id": "formatting",
|
| 79 |
+
"shape": [
|
| 80 |
+
4,
|
| 81 |
+
93
|
| 82 |
+
],
|
| 83 |
+
"max_absolute_logit_difference": 0.008492529392242432,
|
| 84 |
+
"max_absolute_probability_difference": 0.002673388096724183,
|
| 85 |
+
"argmax_agreements": 4,
|
| 86 |
+
"samples": 4,
|
| 87 |
+
"single_run_seconds": 0.4941888749890495
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"id": "repetition",
|
| 91 |
+
"shape": [
|
| 92 |
+
2,
|
| 93 |
+
512
|
| 94 |
+
],
|
| 95 |
+
"max_absolute_logit_difference": 0.009428977966308594,
|
| 96 |
+
"max_absolute_probability_difference": 0.0009658652687765112,
|
| 97 |
+
"argmax_agreements": 2,
|
| 98 |
+
"samples": 2,
|
| 99 |
+
"single_run_seconds": 1.6448932499915827
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"id": "long_512",
|
| 103 |
+
"shape": [
|
| 104 |
+
1,
|
| 105 |
+
512
|
| 106 |
+
],
|
| 107 |
+
"max_absolute_logit_difference": 0.00196075439453125,
|
| 108 |
+
"max_absolute_probability_difference": 0.0005695001117718146,
|
| 109 |
+
"argmax_agreements": 1,
|
| 110 |
+
"samples": 1,
|
| 111 |
+
"single_run_seconds": 0.8356325839995407
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"id": "long_mixed_batch",
|
| 115 |
+
"shape": [
|
| 116 |
+
2,
|
| 117 |
+
512
|
| 118 |
+
],
|
| 119 |
+
"max_absolute_logit_difference": 0.0017921924591064453,
|
| 120 |
+
"max_absolute_probability_difference": 0.00015714796287497057,
|
| 121 |
+
"argmax_agreements": 2,
|
| 122 |
+
"samples": 2,
|
| 123 |
+
"single_run_seconds": 1.6570174579974264
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"id": "whitespace",
|
| 127 |
+
"shape": [
|
| 128 |
+
2,
|
| 129 |
+
17
|
| 130 |
+
],
|
| 131 |
+
"max_absolute_logit_difference": 0.008188486099243164,
|
| 132 |
+
"max_absolute_probability_difference": 0.0006054044427572514,
|
| 133 |
+
"argmax_agreements": 2,
|
| 134 |
+
"samples": 2,
|
| 135 |
+
"single_run_seconds": 0.0669901669898536
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "sequence_128",
|
| 139 |
+
"shape": [
|
| 140 |
+
1,
|
| 141 |
+
129
|
| 142 |
+
],
|
| 143 |
+
"max_absolute_logit_difference": 0.007044553756713867,
|
| 144 |
+
"max_absolute_probability_difference": 0.0021188273782045686,
|
| 145 |
+
"argmax_agreements": 1,
|
| 146 |
+
"samples": 1,
|
| 147 |
+
"single_run_seconds": 0.17962170802638866
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"id": "sequence_256",
|
| 151 |
+
"shape": [
|
| 152 |
+
1,
|
| 153 |
+
257
|
| 154 |
+
],
|
| 155 |
+
"max_absolute_logit_difference": 0.0067670345306396484,
|
| 156 |
+
"max_absolute_probability_difference": 0.002065454050376281,
|
| 157 |
+
"argmax_agreements": 1,
|
| 158 |
+
"samples": 1,
|
| 159 |
+
"single_run_seconds": 0.359755709010642
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"max_absolute_probability_difference": 0.002673388096724183,
|
| 163 |
+
"argmax_disagreements": 0,
|
| 164 |
+
"samples": 24,
|
| 165 |
+
"acceptance_probability_tolerance": 0.01,
|
| 166 |
+
"passed": true,
|
| 167 |
+
"limitations": "Synthetic unlabeled conversion fixtures. Timing is one run per shape, not a comparative performance benchmark. No Windows, Linux, CUDA, DirectML, WinML or CoreML validation is implied."
|
| 168 |
+
}
|
validation/fp32.json
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"variant": "fp32",
|
| 3 |
+
"model": "onnx/model.onnx",
|
| 4 |
+
"model_sha256": "ddd1173f2ef517ad499965e5029fae8099a8054a2bc76d8134e5889cc4ed1b3e",
|
| 5 |
+
"reference_npz_sha256": "401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c",
|
| 6 |
+
"fixtures_sha256": "b4cfec82a9c2839e3231a51a4fe991c5ce83ae516aa61e8fe5f93c235953651b",
|
| 7 |
+
"provider": "CPUExecutionProvider",
|
| 8 |
+
"onnxruntime": "1.30.0",
|
| 9 |
+
"platform": {
|
| 10 |
+
"os": "Darwin",
|
| 11 |
+
"version": "27.2",
|
| 12 |
+
"machine": "arm64"
|
| 13 |
+
},
|
| 14 |
+
"threads": 4,
|
| 15 |
+
"load_seconds": 1.27055700001074,
|
| 16 |
+
"cases": [
|
| 17 |
+
{
|
| 18 |
+
"id": "empty",
|
| 19 |
+
"shape": [
|
| 20 |
+
1,
|
| 21 |
+
2
|
| 22 |
+
],
|
| 23 |
+
"max_absolute_logit_difference": 3.337860107421875e-06,
|
| 24 |
+
"max_absolute_probability_difference": 5.654622786677166e-07,
|
| 25 |
+
"argmax_agreements": 1,
|
| 26 |
+
"samples": 1,
|
| 27 |
+
"single_run_seconds": 0.036468790989601985
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": "minimal",
|
| 31 |
+
"shape": [
|
| 32 |
+
1,
|
| 33 |
+
4
|
| 34 |
+
],
|
| 35 |
+
"max_absolute_logit_difference": 5.7220458984375e-06,
|
| 36 |
+
"max_absolute_probability_difference": 5.157515448050987e-07,
|
| 37 |
+
"argmax_agreements": 1,
|
| 38 |
+
"samples": 1,
|
| 39 |
+
"single_run_seconds": 0.01998937499593012
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"id": "short",
|
| 43 |
+
"shape": [
|
| 44 |
+
1,
|
| 45 |
+
33
|
| 46 |
+
],
|
| 47 |
+
"max_absolute_logit_difference": 2.1457672119140625e-06,
|
| 48 |
+
"max_absolute_probability_difference": 1.651584634609904e-07,
|
| 49 |
+
"argmax_agreements": 1,
|
| 50 |
+
"samples": 1,
|
| 51 |
+
"single_run_seconds": 0.04194808300235309
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"id": "mixed_padding",
|
| 55 |
+
"shape": [
|
| 56 |
+
4,
|
| 57 |
+
42
|
| 58 |
+
],
|
| 59 |
+
"max_absolute_logit_difference": 1.3828277587890625e-05,
|
| 60 |
+
"max_absolute_probability_difference": 2.085083897984674e-06,
|
| 61 |
+
"argmax_agreements": 4,
|
| 62 |
+
"samples": 4,
|
| 63 |
+
"single_run_seconds": 0.1256193750014063
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"id": "technical",
|
| 67 |
+
"shape": [
|
| 68 |
+
4,
|
| 69 |
+
75
|
| 70 |
+
],
|
| 71 |
+
"max_absolute_logit_difference": 1.7523765563964844e-05,
|
| 72 |
+
"max_absolute_probability_difference": 4.016848888621638e-06,
|
| 73 |
+
"argmax_agreements": 4,
|
| 74 |
+
"samples": 4,
|
| 75 |
+
"single_run_seconds": 0.20917212500353344
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"id": "formatting",
|
| 79 |
+
"shape": [
|
| 80 |
+
4,
|
| 81 |
+
93
|
| 82 |
+
],
|
| 83 |
+
"max_absolute_logit_difference": 5.841255187988281e-06,
|
| 84 |
+
"max_absolute_probability_difference": 1.8292948700815437e-06,
|
| 85 |
+
"argmax_agreements": 4,
|
| 86 |
+
"samples": 4,
|
| 87 |
+
"single_run_seconds": 0.2499902910203673
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"id": "repetition",
|
| 91 |
+
"shape": [
|
| 92 |
+
2,
|
| 93 |
+
512
|
| 94 |
+
],
|
| 95 |
+
"max_absolute_logit_difference": 8.344650268554688e-06,
|
| 96 |
+
"max_absolute_probability_difference": 9.791367671097007e-07,
|
| 97 |
+
"argmax_agreements": 2,
|
| 98 |
+
"samples": 2,
|
| 99 |
+
"single_run_seconds": 0.780980624986114
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"id": "long_512",
|
| 103 |
+
"shape": [
|
| 104 |
+
1,
|
| 105 |
+
512
|
| 106 |
+
],
|
| 107 |
+
"max_absolute_logit_difference": 3.933906555175781e-06,
|
| 108 |
+
"max_absolute_probability_difference": 1.4080306614400184e-07,
|
| 109 |
+
"argmax_agreements": 1,
|
| 110 |
+
"samples": 1,
|
| 111 |
+
"single_run_seconds": 0.3768378750246484
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"id": "long_mixed_batch",
|
| 115 |
+
"shape": [
|
| 116 |
+
2,
|
| 117 |
+
512
|
| 118 |
+
],
|
| 119 |
+
"max_absolute_logit_difference": 2.384185791015625e-06,
|
| 120 |
+
"max_absolute_probability_difference": 5.780850338421573e-07,
|
| 121 |
+
"argmax_agreements": 2,
|
| 122 |
+
"samples": 2,
|
| 123 |
+
"single_run_seconds": 0.7969407500058878
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"id": "whitespace",
|
| 127 |
+
"shape": [
|
| 128 |
+
2,
|
| 129 |
+
17
|
| 130 |
+
],
|
| 131 |
+
"max_absolute_logit_difference": 2.0265579223632812e-05,
|
| 132 |
+
"max_absolute_probability_difference": 1.538472105155897e-06,
|
| 133 |
+
"argmax_agreements": 2,
|
| 134 |
+
"samples": 2,
|
| 135 |
+
"single_run_seconds": 0.03817816698574461
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "sequence_128",
|
| 139 |
+
"shape": [
|
| 140 |
+
1,
|
| 141 |
+
129
|
| 142 |
+
],
|
| 143 |
+
"max_absolute_logit_difference": 2.2649765014648438e-06,
|
| 144 |
+
"max_absolute_probability_difference": 5.777336291590274e-07,
|
| 145 |
+
"argmax_agreements": 1,
|
| 146 |
+
"samples": 1,
|
| 147 |
+
"single_run_seconds": 0.09674633399117738
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"id": "sequence_256",
|
| 151 |
+
"shape": [
|
| 152 |
+
1,
|
| 153 |
+
257
|
| 154 |
+
],
|
| 155 |
+
"max_absolute_logit_difference": 2.6226043701171875e-06,
|
| 156 |
+
"max_absolute_probability_difference": 8.311704222663252e-07,
|
| 157 |
+
"argmax_agreements": 1,
|
| 158 |
+
"samples": 1,
|
| 159 |
+
"single_run_seconds": 0.18392837498686276
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"max_absolute_probability_difference": 4.016848888621638e-06,
|
| 163 |
+
"argmax_disagreements": 0,
|
| 164 |
+
"samples": 24,
|
| 165 |
+
"acceptance_probability_tolerance": 0.0001,
|
| 166 |
+
"passed": true,
|
| 167 |
+
"limitations": "Synthetic unlabeled conversion fixtures. Timing is one run per shape, not a comparative performance benchmark. No Windows, Linux, CUDA, DirectML, WinML or CoreML validation is implied."
|
| 168 |
+
}
|
validation/int8.json
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"variant": "int8",
|
| 3 |
+
"model": "onnx/model_int8.onnx",
|
| 4 |
+
"model_sha256": "bc1b9cb5a7a63fb7c5b67de3556e9e43cb4537bd6ce6bae3e6ad7cfce9552d23",
|
| 5 |
+
"reference_npz_sha256": "401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c",
|
| 6 |
+
"fixtures_sha256": "b4cfec82a9c2839e3231a51a4fe991c5ce83ae516aa61e8fe5f93c235953651b",
|
| 7 |
+
"provider": "CPUExecutionProvider",
|
| 8 |
+
"onnxruntime": "1.30.0",
|
| 9 |
+
"platform": {
|
| 10 |
+
"os": "Darwin",
|
| 11 |
+
"version": "27.2",
|
| 12 |
+
"machine": "arm64"
|
| 13 |
+
},
|
| 14 |
+
"threads": 4,
|
| 15 |
+
"load_seconds": 0.46590999999898486,
|
| 16 |
+
"cases": [
|
| 17 |
+
{
|
| 18 |
+
"id": "empty",
|
| 19 |
+
"shape": [
|
| 20 |
+
1,
|
| 21 |
+
2
|
| 22 |
+
],
|
| 23 |
+
"max_absolute_logit_difference": 0.06944859027862549,
|
| 24 |
+
"max_absolute_probability_difference": 0.015214827854648338,
|
| 25 |
+
"argmax_agreements": 1,
|
| 26 |
+
"samples": 1,
|
| 27 |
+
"single_run_seconds": 0.0074065420194529
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": "minimal",
|
| 31 |
+
"shape": [
|
| 32 |
+
1,
|
| 33 |
+
4
|
| 34 |
+
],
|
| 35 |
+
"max_absolute_logit_difference": 0.03919851779937744,
|
| 36 |
+
"max_absolute_probability_difference": 0.004634794839445511,
|
| 37 |
+
"argmax_agreements": 1,
|
| 38 |
+
"samples": 1,
|
| 39 |
+
"single_run_seconds": 0.006942207983229309
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"id": "short",
|
| 43 |
+
"shape": [
|
| 44 |
+
1,
|
| 45 |
+
33
|
| 46 |
+
],
|
| 47 |
+
"max_absolute_logit_difference": 0.5800451040267944,
|
| 48 |
+
"max_absolute_probability_difference": 0.08030236252326506,
|
| 49 |
+
"argmax_agreements": 1,
|
| 50 |
+
"samples": 1,
|
| 51 |
+
"single_run_seconds": 0.020768166985362768
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"id": "mixed_padding",
|
| 55 |
+
"shape": [
|
| 56 |
+
4,
|
| 57 |
+
42
|
| 58 |
+
],
|
| 59 |
+
"max_absolute_logit_difference": 0.5149990320205688,
|
| 60 |
+
"max_absolute_probability_difference": 0.10564716504707161,
|
| 61 |
+
"argmax_agreements": 4,
|
| 62 |
+
"samples": 4,
|
| 63 |
+
"single_run_seconds": 0.10670587501954287
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"id": "technical",
|
| 67 |
+
"shape": [
|
| 68 |
+
4,
|
| 69 |
+
75
|
| 70 |
+
],
|
| 71 |
+
"max_absolute_logit_difference": 0.28310370445251465,
|
| 72 |
+
"max_absolute_probability_difference": 0.08742598251544209,
|
| 73 |
+
"argmax_agreements": 4,
|
| 74 |
+
"samples": 4,
|
| 75 |
+
"single_run_seconds": 0.14382395800203085
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"id": "formatting",
|
| 79 |
+
"shape": [
|
| 80 |
+
4,
|
| 81 |
+
93
|
| 82 |
+
],
|
| 83 |
+
"max_absolute_logit_difference": 0.5161757469177246,
|
| 84 |
+
"max_absolute_probability_difference": 0.054650292908438924,
|
| 85 |
+
"argmax_agreements": 4,
|
| 86 |
+
"samples": 4,
|
| 87 |
+
"single_run_seconds": 0.16716937502496876
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"id": "repetition",
|
| 91 |
+
"shape": [
|
| 92 |
+
2,
|
| 93 |
+
512
|
| 94 |
+
],
|
| 95 |
+
"max_absolute_logit_difference": 0.11870789527893066,
|
| 96 |
+
"max_absolute_probability_difference": 0.023913312589348035,
|
| 97 |
+
"argmax_agreements": 2,
|
| 98 |
+
"samples": 2,
|
| 99 |
+
"single_run_seconds": 0.6287333749933168
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"id": "long_512",
|
| 103 |
+
"shape": [
|
| 104 |
+
1,
|
| 105 |
+
512
|
| 106 |
+
],
|
| 107 |
+
"max_absolute_logit_difference": 0.0936439037322998,
|
| 108 |
+
"max_absolute_probability_difference": 0.025589508520716953,
|
| 109 |
+
"argmax_agreements": 1,
|
| 110 |
+
"samples": 1,
|
| 111 |
+
"single_run_seconds": 0.30129020899767056
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"id": "long_mixed_batch",
|
| 115 |
+
"shape": [
|
| 116 |
+
2,
|
| 117 |
+
512
|
| 118 |
+
],
|
| 119 |
+
"max_absolute_logit_difference": 0.07313346862792969,
|
| 120 |
+
"max_absolute_probability_difference": 0.013863669886090335,
|
| 121 |
+
"argmax_agreements": 2,
|
| 122 |
+
"samples": 2,
|
| 123 |
+
"single_run_seconds": 0.6343192080094013
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"id": "whitespace",
|
| 127 |
+
"shape": [
|
| 128 |
+
2,
|
| 129 |
+
17
|
| 130 |
+
],
|
| 131 |
+
"max_absolute_logit_difference": 0.45113587379455566,
|
| 132 |
+
"max_absolute_probability_difference": 0.02637604951583239,
|
| 133 |
+
"argmax_agreements": 2,
|
| 134 |
+
"samples": 2,
|
| 135 |
+
"single_run_seconds": 0.026343709003413096
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "sequence_128",
|
| 139 |
+
"shape": [
|
| 140 |
+
1,
|
| 141 |
+
129
|
| 142 |
+
],
|
| 143 |
+
"max_absolute_logit_difference": 0.4388701319694519,
|
| 144 |
+
"max_absolute_probability_difference": 0.121022168586576,
|
| 145 |
+
"argmax_agreements": 0,
|
| 146 |
+
"samples": 1,
|
| 147 |
+
"single_run_seconds": 0.073258624994196
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"id": "sequence_256",
|
| 151 |
+
"shape": [
|
| 152 |
+
1,
|
| 153 |
+
257
|
| 154 |
+
],
|
| 155 |
+
"max_absolute_logit_difference": 0.38826239109039307,
|
| 156 |
+
"max_absolute_probability_difference": 0.09848208213145021,
|
| 157 |
+
"argmax_agreements": 1,
|
| 158 |
+
"samples": 1,
|
| 159 |
+
"single_run_seconds": 0.1273815000022296
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"max_absolute_probability_difference": 0.121022168586576,
|
| 163 |
+
"argmax_disagreements": 1,
|
| 164 |
+
"samples": 24,
|
| 165 |
+
"acceptance_probability_tolerance": 0.05,
|
| 166 |
+
"passed": false,
|
| 167 |
+
"limitations": "Synthetic unlabeled conversion fixtures. Timing is one run per shape, not a comparative performance benchmark. No Windows, Linux, CUDA, DirectML, WinML or CoreML validation is implied."
|
| 168 |
+
}
|
validation/reference.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"upstream": "pangram/editlens_roberta-large",
|
| 3 |
+
"revision": "f93e1ace74528cfb48f337ab2fe946fb71a728cb",
|
| 4 |
+
"precision": "float32",
|
| 5 |
+
"attention_implementation": "eager",
|
| 6 |
+
"provider": "PyTorch CPU",
|
| 7 |
+
"cases": [
|
| 8 |
+
{
|
| 9 |
+
"id": "empty",
|
| 10 |
+
"shape": [
|
| 11 |
+
1,
|
| 12 |
+
2
|
| 13 |
+
]
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"id": "minimal",
|
| 17 |
+
"shape": [
|
| 18 |
+
1,
|
| 19 |
+
4
|
| 20 |
+
]
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"id": "short",
|
| 24 |
+
"shape": [
|
| 25 |
+
1,
|
| 26 |
+
33
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": "mixed_padding",
|
| 31 |
+
"shape": [
|
| 32 |
+
4,
|
| 33 |
+
42
|
| 34 |
+
]
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"id": "technical",
|
| 38 |
+
"shape": [
|
| 39 |
+
4,
|
| 40 |
+
75
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"id": "formatting",
|
| 45 |
+
"shape": [
|
| 46 |
+
4,
|
| 47 |
+
93
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"id": "repetition",
|
| 52 |
+
"shape": [
|
| 53 |
+
2,
|
| 54 |
+
512
|
| 55 |
+
]
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"id": "long_512",
|
| 59 |
+
"shape": [
|
| 60 |
+
1,
|
| 61 |
+
512
|
| 62 |
+
]
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"id": "long_mixed_batch",
|
| 66 |
+
"shape": [
|
| 67 |
+
2,
|
| 68 |
+
512
|
| 69 |
+
]
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"id": "whitespace",
|
| 73 |
+
"shape": [
|
| 74 |
+
2,
|
| 75 |
+
17
|
| 76 |
+
]
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"id": "sequence_128",
|
| 80 |
+
"shape": [
|
| 81 |
+
1,
|
| 82 |
+
129
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"id": "sequence_256",
|
| 87 |
+
"shape": [
|
| 88 |
+
1,
|
| 89 |
+
257
|
| 90 |
+
]
|
| 91 |
+
}
|
| 92 |
+
],
|
| 93 |
+
"purpose": "Numerical conversion checks; not a labeled accuracy benchmark.",
|
| 94 |
+
"source_weights_sha256": "869f33df7928c447bbd150d3b5192b4ea90b1cbd2ee4aad97f5d51d59dfc8cfb",
|
| 95 |
+
"fixtures_sha256": "b4cfec82a9c2839e3231a51a4fe991c5ce83ae516aa61e8fe5f93c235953651b",
|
| 96 |
+
"reference_npz_sha256": "401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c"
|
| 97 |
+
}
|
validation/reference.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:401ca4e9bf9b65c3f91552b277f254254fa1469cf870ac81424985df3d92286c
|
| 3 |
+
size 10701
|
validation/tokenizer.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"passed": true,
|
| 3 |
+
"cases": 12,
|
| 4 |
+
"samples": 24,
|
| 5 |
+
"comparison": "tokenizers.Tokenizer example input_ids and attention_mask exactly match the AutoTokenizer reference for every fixture."
|
| 6 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|