Publish immutable validation-selected FP32 finite-decision package
Browse filesNo training, export, quantization or checkpoint reselection. Synthetic quality only; real-site generalization unverified.
This view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +3 -0
- LICENSE +69 -0
- NOTICE +40 -0
- README.md +98 -0
- SHA256SUMS +54 -0
- config.json +72 -0
- licenses/LFM2.5-Encoder-350M/LICENSE +71 -0
- licenses/onnxruntime/LICENSE +21 -0
- licenses/onnxruntime/ThirdPartyNotices.txt +0 -0
- licenses/transformers/LICENSE +202 -0
- licenses/webbrain/LICENSE +685 -0
- model.safetensors +3 -0
- model.safetensors.NOTICE.txt +40 -0
- onnx/decision.data +3 -0
- onnx/decision.data.NOTICE.txt +40 -0
- onnx/decision.onnx +3 -0
- onnx/decision.onnx.NOTICE.txt +40 -0
- onnx/projector.data +3 -0
- onnx/projector.data.NOTICE.txt +40 -0
- onnx/projector.onnx +3 -0
- onnx/projector.onnx.NOTICE.txt +40 -0
- onnx/vision.data +3 -0
- onnx/vision.onnx +3 -0
- package-manifest.json +0 -0
- provenance/integration-batch-approved.json +179 -0
- provenance/integration-contract-approved.json +1812 -0
- provenance/integration-numeric-ids.json +574 -0
- provenance/model-identity.json +0 -0
- provenance/prepare-copy-records.json +313 -0
- provenance/preprocessing-adapter-change.json +28 -0
- provenance/selected-release-audit.json +0 -0
- provenance/selection.json +32 -0
- provenance/synthetic-evaluation.json +0 -0
- provenance/upstream-source/README.md +260 -0
- provenance/upstream-source/audio.py +250 -0
- provenance/upstream-source/config.json +86 -0
- provenance/upstream-source/encoder.py +172 -0
- provenance/upstream-source/modeling_d1.py +168 -0
- provenance/upstream-source/prompt.py +131 -0
- provenance/upstream-source/vision.py +113 -0
- runtime/NOTICE +22 -0
- runtime/README.md +87 -0
- runtime/d1-preprocess.js +169 -0
- runtime/d1-runtime.js +114 -0
- runtime/package.json +9 -0
- runtime/vendor/LICENSE.onnxruntime.txt +21 -0
- runtime/vendor/LICENSE.transformers.txt +202 -0
- runtime/vendor/README.md +17 -0
- runtime/vendor/ThirdPartyNotices.onnxruntime.txt +0 -0
- runtime/vendor/ort-wasm-simd-threaded.jsep.mjs +108 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* 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
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 36 |
+
onnx/decision.data filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
onnx/projector.data filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
onnx/vision.data filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LFM Open License v1.0
|
| 2 |
+
|
| 3 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
+
1. Definitions.
|
| 5 |
+
|
| 6 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by this document.
|
| 7 |
+
|
| 8 |
+
"Licensor" shall mean Liquid AI, Inc.
|
| 9 |
+
|
| 10 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 11 |
+
|
| 12 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 13 |
+
|
| 14 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 15 |
+
|
| 16 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 17 |
+
|
| 18 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
| 19 |
+
|
| 20 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 21 |
+
|
| 22 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 23 |
+
|
| 24 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 25 |
+
|
| 26 |
+
"Commercial Use" shall mean any use of the Work for direct or indirect commercial advantage or monetary compensation.
|
| 27 |
+
|
| 28 |
+
"Qualified Non-Profit Organization" shall mean a Legal Entity that is organized and operated exclusively for religious, charitable, scientific, testing for public safety, literary, or educational purposes, and which is exempt from federal income tax under Section 501(c)(3) of the United States Internal Revenue Code of 1986, as amended, or any equivalent non-profit or charitable organization in a foreign jurisdiction.
|
| 29 |
+
"Non-Commercial or Research Purposes" shall mean purposes that do not involve any use of the Work or a Derivative Work for Commercial Use.
|
| 30 |
+
|
| 31 |
+
"Threshold" shall mean annual revenue of 10 million United States dollars ($10,000,000) or more.
|
| 32 |
+
|
| 33 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 34 |
+
|
| 35 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 36 |
+
|
| 37 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 38 |
+
|
| 39 |
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 40 |
+
|
| 41 |
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 42 |
+
|
| 43 |
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 44 |
+
|
| 45 |
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 46 |
+
|
| 47 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 48 |
+
|
| 49 |
+
5. Commercial Use Limitation.
|
| 50 |
+
|
| 51 |
+
(a) The rights granted under this License for Commercial Use are conditioned upon You or Your Legal Entity not exceeding the Threshold.
|
| 52 |
+
|
| 53 |
+
(b) Any Commercial Use of the Work or a Derivative Work by a Legal Entity that exceeds the Threshold is not licensed under this Agreement.
|
| 54 |
+
|
| 55 |
+
(c) The Threshold shall not apply to a Qualified Non-Profit Organization's use of the Work or a Derivative Work for Non-Commercial or Research Purposes.
|
| 56 |
+
|
| 57 |
+
6. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 58 |
+
|
| 59 |
+
7. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except for the reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 60 |
+
|
| 61 |
+
8. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 62 |
+
|
| 63 |
+
9. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 64 |
+
|
| 65 |
+
10. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 66 |
+
|
| 67 |
+
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 68 |
+
|
| 69 |
+
END OF TERMS AND CONDITIONS
|
NOTICE
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: lfm1.0
|
| 4 |
+
license_link: LICENSE
|
| 5 |
+
base_model: LiquidAI/d1-omni-600M
|
| 6 |
+
tags:
|
| 7 |
+
- decision
|
| 8 |
+
- webgpu
|
| 9 |
+
- onnx
|
| 10 |
+
- fp32
|
| 11 |
+
- experimental
|
| 12 |
+
- image-text-to-decision
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# d1 Browser Decision FP32 Experimental
|
| 16 |
+
|
| 17 |
+
An experimental, audio-free derivative of [LiquidAI/d1-omni-600M](https://huggingface.co/LiquidAI/d1-omni-600M/tree/02b55d7076f15129e59ab3f94783f32c4b088674). It directly scores named options for `choice`, `noul` and ordinal `score` questions using text/JSON state and optional screenshots. It does **not** generate text or tokens. Do not call `generate()` or treat it as a causal chat model.
|
| 18 |
+
|
| 19 |
+
**Real-site generalization is not verified.** The reported quality data are authored synthetic browser pages, with AI-authored labels independently checked through AI DOM/pixel review, not human-expert annotations. Actual Chrome/WebGPU runtime parity was measured separately; that does not establish reliable completion detection on independently developed websites.
|
| 20 |
+
|
| 21 |
+
## Immutable Candidate
|
| 22 |
+
|
| 23 |
+
The published bytes are the already validation-selected `projector_head_text_lora` epoch 06 from the balanced-V3 experiment. The lock was written before held-out model evaluation. Packaging performed no training, new selection, weight transfer, merge, quantization or ONNX re-export.
|
| 24 |
+
|
| 25 |
+
- Source revision: `02b55d7076f15129e59ab3f94783f32c4b088674`.
|
| 26 |
+
- 380 clean FP32 tensors: text encoder, decision head, vision tower and projector; no audio or LM head.
|
| 27 |
+
- Prior adaptation updated 31 head tensors, four projector tensors and four encoder Q/V matrices through one rank-4, alpha-8 LoRA merge. The other 341 tensors, including all 197 vision-tower tensors, remain exact original-A values.
|
| 28 |
+
- Physical `model.safetensors` SHA-256: `75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940` (1,899,912,876 bytes).
|
| 29 |
+
- Logical clean-tensor-state SHA-256: `76409dd958673e2028f1da23a909033876169f89603c16c7cbcdfbcc7404cdb5`. This is **not** the file SHA-256.
|
| 30 |
+
- Selected delta SHA-256: `82b6844524adf1ff1f7add1c9ef57475af5fcfa07ada10b9edf70c4d24c1ba35`.
|
| 31 |
+
- Selection-lock SHA-256: `4ab2441d9b3cf7742957a374988fc50fc400b29081b7c38b6920be88cd65bb19`.
|
| 32 |
+
|
| 33 |
+
The three ONNX graphs and their external data total 1,900,356,386 bytes. They are full FP32, unquantized, and copied without binary changes. `package-manifest.json` and `SHA256SUMS` enumerate payload checksums; large files also have 4 MiB chunk checksums.
|
| 34 |
+
|
| 35 |
+
**Config caveat:** the unchanged legacy `config.json` says `dtype: float16` and `architectures: [NoAudioModel]`. Actual checkpoint/graphs/feeds are **float32**, as explicitly required by the release manifest. Do not derive precision from the legacy label. This repository does not advertise an `AutoModel.from_pretrained()` loader or executable remote Python code.
|
| 36 |
+
|
| 37 |
+
## Synthetic Held-Out Results
|
| 38 |
+
|
| 39 |
+
New final test: 72 screens, 144 questions (126 categorical choice/noul, 18 ordinal score). Old test: 60 screens, 120 questions (90 categorical, 30 score). All four historical stages are shown, not only the released one.
|
| 40 |
+
|
| 41 |
+
| Historical stage | New categorical | Completion precision | Completion recall | Unknown correct | New score MAE | Old categorical | Old score MAE |
|
| 42 |
+
|---|---:|---:|---:|---:|---:|---:|---:|
|
| 43 |
+
| Original A | 48/126 | 21/59 | 21/24 | 6/28 | 0.736238 | 43/90 | 0.973761 |
|
| 44 |
+
| Head only | 51/126 | 11/27 | 11/24 | 9/28 | 0.723945 | 42/90 | 0.913887 |
|
| 45 |
+
| Projector + head | 93/126 | 22/23 | 22/24 | 23/28 | 0.574737 | 52/90 | 0.605605 |
|
| 46 |
+
| Released projector + head + text LoRA | 92/126 | 22/23 | 22/24 | 23/28 | 0.574219 | 52/90 | 0.570224 |
|
| 47 |
+
|
| 48 |
+
The released stage has one false completion among 48 non-complete/uncertain new-test cases: 0/24 known negatives and 1/24 uncertain cases. It has two missed new-test positives. **All four stages miss all seven positive completion examples in the older test.** No positives are predicted there, so old-test completion precision is undefined; zero false positives is not evidence of successful completion recognition.
|
| 49 |
+
|
| 50 |
+
The LoRA stage did not add new-test categorical accuracy over projector+head. It remains the release candidate because selection was validation-only; held-out results did not reselect it. The original unlabelled 58-request/70-question regression suite is not an accuracy benchmark: the released stage changes 9/46 choice/noul decisions versus current original A (maximum probability drift 0.734239; maximum expected-score drift 1.496044).
|
| 51 |
+
|
| 52 |
+
Limitations include synthetic layout/text/color regularities, finite family splits, overconfidence/train-versus-validation loss separation, residual Ready-identifier/completion association (0.622556 bits within sparse target groups), and joint family/option-position association (0.584963 bits). Zero conditional viewport MI in the specified QC groups is not proof of universal nuisance independence. No independently developed real-site dataset was collected for this release.
|
| 53 |
+
|
| 54 |
+
## Measured Runtime Scope
|
| 55 |
+
|
| 56 |
+
The existing own-checkpoint FP32 source API was compared with desktop ONNX and actual Chrome 154 WebGPU on an NVIDIA RTX 5090, non-software adapter. Fixtures were 72 validation screenshots plus 20 neutral text requests: 92 requests/169 questions, not held-out quality examples. Each browser path had two warm-ups and ten hot repeats; all 145 categorical questions agreed on every hot repeat. Maximum absolute probability/expected-score errors stayed below the unchanged 0.001 gate.
|
| 57 |
+
|
| 58 |
+
| Browser path | Max probability difference | Max expected-score difference |
|
| 59 |
+
|---|---:|---:|
|
| 60 |
+
| Same native media prefix | 0.0000563264 | 0.000109192 |
|
| 61 |
+
| Actual PNG preprocessing + vision/projector | 0.0000483990 | 0.0000722781 |
|
| 62 |
+
|
| 63 |
+
Tokens, pixels, masks and shapes matched their references exactly. Position-interpolation FP32 order differences reached 0.000000774860; the trained intermediate media-prefix difference reached 0.0565567. There is no claim of bit-exact intermediate activations or a 0.001 intermediate gate.
|
| 64 |
+
|
| 65 |
+
Observed hot p50/p95 milliseconds on that machine: text decision 30.778/151.935; saved image-prefix decision 67.290/272.953; full image inference 219.943/751.239; PNG preprocessing plus inference 337.175/957.691. These finite request-balanced measurements are not throughput guarantees. Model/graph storage bytes are not VRAM consumption.
|
| 66 |
+
|
| 67 |
+
Separate three-fixture profiling observed 1,465 WebGPU nodes and 407 CPU/WASM nodes, including four floating mask/position construction nodes; this is **not pure GPU execution**. Separate bounded memory sampling observed adapter-total memory, not isolated model VRAM. Existing runner parity is not, by itself, proof of a newly integrated packed WebBrain extension.
|
| 68 |
+
|
| 69 |
+
## Adapter Use
|
| 70 |
+
|
| 71 |
+
The package contains the dependency-injected adapter copied from the actual [WebBrain](https://github.com/webbrain-one/webbrain) extension module `src/chrome/src/providers/d1-runtime.js`. Its preprocessing helper preserves the old verified bytes except two explicit source-semantic corrections: present-null noul criteria (`Object.hasOwn`, matching Python `dict.get`) and small fractional Python-style JSON exponent formatting. The old baseline helper is untouched. JavaScript numbers cannot recover Python int-versus-integral-float lexical types: use preformatted state/criterion strings when exact original lexical representation matters. The adapter also restores the source 65,536 padded-token subbatch budget while returning named answers in original order. Executable JavaScript/WASM must be bundled locally for extension CSP; do not load remote executable code. Immutable-revision model graph/tokenizer downloads are data and must be checksum-verified before caching/creating sessions.
|
| 72 |
+
|
| 73 |
+
The exact API is `createD1Runtime({ort, tokenizer, config, ratios, sessions, device, model})`, then `evaluate({state, images, questions, signal})`. See [runtime/README.md](runtime/README.md) for session wiring. `noul` answers expose the source public yes-probability; score answers expose expected ordinal level, not argmax-class accuracy. Option insertion order, masks, media prefix, calibration and the image text limit of 896 tokens must remain unchanged.
|
| 74 |
+
|
| 75 |
+
```js
|
| 76 |
+
import { createD1Runtime } from './runtime/d1-runtime.js';
|
| 77 |
+
|
| 78 |
+
// Supply verified package assets, the bundled ORT/tokenizer, and three FP32 sessions.
|
| 79 |
+
const judge = createD1Runtime({ ort, tokenizer, config, ratios, sessions, device, model: 'd1-browser-decision-fp32-experimental' });
|
| 80 |
+
const result = await judge.evaluate({
|
| 81 |
+
state: { task: 'Check whether a visible receipt establishes completion.' },
|
| 82 |
+
images: [inlinePngDataUrl],
|
| 83 |
+
questions: {
|
| 84 |
+
completion: { type: 'choice', instructions: 'Judge only visible evidence.', criteria: {
|
| 85 |
+
completed: 'An explicit receipt confirms the named task.',
|
| 86 |
+
not_completed: 'Visible evidence establishes failure or an unfinished task.',
|
| 87 |
+
unknown: 'The screenshot does not establish the outcome.'
|
| 88 |
+
} }
|
| 89 |
+
}
|
| 90 |
+
});
|
| 91 |
+
// result.usage.output_tokens === 0; this is not text generation.
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## License And Notices
|
| 95 |
+
|
| 96 |
+
The model is governed by the exact upstream [LFM Open License v1.0](LICENSE), not Apache/MIT. Its commercial-use provisions include annual-revenue threshold terms of US$10 million; determine eligibility and obtain any required separate license before commercial deployment. This card is not legal approval or an endorsement by Liquid AI.
|
| 97 |
+
|
| 98 |
+
[NOTICE](NOTICE) and modified-binary sidecars retain attribution and identify the historical derivative changes without changing verified binary bytes. The underlying [LFM2.5-Encoder license reference](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M/blob/b886781f7c6f10ca9b7096e21b83e30a073c2f39/LICENSE) is separately retained; that license-reference revision is not a claim about the historical base-weight revision used by d1. Bundled ONNX Runtime 1.31.0-dev.20260914-8d85527a0 is MIT-licensed; Transformers.js 4.3.1 is Apache-2.0-licensed. The actual WebBrain GPL-3.0-or-later project notice is retained for the copied runtime source at [licenses/webbrain/LICENSE](licenses/webbrain/LICENSE). Separate component notices do not replace the model license or constitute a legal compatibility/commercial-eligibility opinion.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
68ddf4bd4f3e489455211f80836b36281115cb9206b8e8d47858d062bdb6508d config.json
|
| 2 |
+
9953509cbd8c1c6ce7b06ddf74fcc204a892692316201dd8f7400a84790d4120 LICENSE
|
| 3 |
+
4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c licenses/LFM2.5-Encoder-350M/LICENSE
|
| 4 |
+
2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c licenses/onnxruntime/LICENSE
|
| 5 |
+
143764b952fdb1a7c69ce653bfba74a7744d6a8a573bfb73e235fba356c83de3 licenses/onnxruntime/ThirdPartyNotices.txt
|
| 6 |
+
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 licenses/transformers/LICENSE
|
| 7 |
+
a759b37ffc07280716156c7f128257e2f61af3cbb95edbfcfd2e3a85d190a25f licenses/webbrain/LICENSE
|
| 8 |
+
75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940 model.safetensors
|
| 9 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 model.safetensors.NOTICE.txt
|
| 10 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 NOTICE
|
| 11 |
+
631417aa49dacb602b7e099062cd44c89e3747533a4094a61ff5f1cb3ccb0daf onnx/decision.data
|
| 12 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 onnx/decision.data.NOTICE.txt
|
| 13 |
+
ef66e7aa7f288fd71578cb6f6b71a04d6f531ad7755536487e155f66f605baf9 onnx/decision.onnx
|
| 14 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 onnx/decision.onnx.NOTICE.txt
|
| 15 |
+
e52c40550fbce097580870a7ddcca3f6992d93942931039ea717878514dd7a47 onnx/projector.data
|
| 16 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 onnx/projector.data.NOTICE.txt
|
| 17 |
+
5489cd6636df06e474866ea55a37b06ec30a9fffcc993c89caff76639cc07d1e onnx/projector.onnx
|
| 18 |
+
4836bf8d92951e013b106d9efa96ae2eac173249da7c53281e2177437e2bc744 onnx/projector.onnx.NOTICE.txt
|
| 19 |
+
490b694cf9a8770793e1cccc3d698bfb076f4b177216f9036e82eb0735b09390 onnx/vision.data
|
| 20 |
+
aa7cbbabc0ee925ab4dd44a6c85dd7bf92ef36da5f2ebcdf1066f918d1a2ea89 onnx/vision.onnx
|
| 21 |
+
a4b30b877f51618b3b35acea16c84e8c9be21c802ad5e3133d4304971f77f974 provenance/integration-batch-approved.json
|
| 22 |
+
9ea86c76aae3c028cf10b1dbcb82482c31a49a18fa65436a1b9d83df7bba624b provenance/integration-contract-approved.json
|
| 23 |
+
2efc31ff81ffad0e3957bd326ff0875e83997b9239a7df7832a27773799ddf6f provenance/integration-numeric-ids.json
|
| 24 |
+
964459ec7aca2e3d16af71edce3f38c7210c4835ff59b2254d50428517993f4a provenance/model-identity.json
|
| 25 |
+
a94c6c4062515c8003f7f9ec3551fe76e6b6ea7f20a1cd3452f17464f1e2d126 provenance/prepare-copy-records.json
|
| 26 |
+
81d53a94e4a5ab8d6bd0df762cf97f1ea0d0c4f2706239f1678d079a8ce9f591 provenance/preprocessing-adapter-change.json
|
| 27 |
+
fb1f2eb54e03990265920a3dc71b973aaa97bc9562054dc333701b92a10d07d6 provenance/selected-release-audit.json
|
| 28 |
+
6511c254961c07ce98fd36481c2e5ddbed82e816d7c4278df6bcea975ac5ce9a provenance/selection.json
|
| 29 |
+
c858cf1446df8c591f872003274a102487eb4979ca938825fd4fd8443e0863a8 provenance/synthetic-evaluation.json
|
| 30 |
+
c5ff09d52d6a079e79d0505c89dbd0582ba2bc9abf2b26595d8d5b1d0c347bdf provenance/upstream-source/audio.py
|
| 31 |
+
dfccae241822f81752426629c88c8b8d7efdd03dd19418b6645c604fad43d619 provenance/upstream-source/config.json
|
| 32 |
+
5f2e20319ee42a7367febf06c7653d7b3f9b28ef99a64cb9ec7739563dcfcffe provenance/upstream-source/encoder.py
|
| 33 |
+
2b71a5c909ec5d3aa6307378a41a0fd24af1e17d5c1c1f8d510582147051a686 provenance/upstream-source/modeling_d1.py
|
| 34 |
+
a6b29a55ec8345f1fc1fdbfcc4b64d80d473dc4316f095a62c51cb6cce1194cf provenance/upstream-source/prompt.py
|
| 35 |
+
6577bee7b8cb23b595a90e99aa82007f57214d447f0ebcdfb2e812a7123d57bf provenance/upstream-source/README.md
|
| 36 |
+
43ad71029f82e20fd26b97574627773d47639d7a3742c8b04fe5bf55f41c4c28 provenance/upstream-source/vision.py
|
| 37 |
+
da7b9b56973503baf2414a5b32c4c1ea30523b26818f0863d3147898857c3d46 README.md
|
| 38 |
+
00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e runtime/d1-preprocess.js
|
| 39 |
+
7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba runtime/d1-runtime.js
|
| 40 |
+
da4d330d5521fb4354a7a2f6ac87466d038d53cfd70c1547d157e6d14257a8c4 runtime/NOTICE
|
| 41 |
+
dd9753529e8a67ca767376ee55498827e6f31725942ddcd2fb4dc62bba579ebf runtime/package.json
|
| 42 |
+
ca020227c8b93177c5c59f39bd9179543f91a827718f4c7983d0d7adc9193151 runtime/README.md
|
| 43 |
+
2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c runtime/vendor/LICENSE.onnxruntime.txt
|
| 44 |
+
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 runtime/vendor/LICENSE.transformers.txt
|
| 45 |
+
c2f80e915e9df63289788a99d434d8c4e00e64e9c1f030f4b80b022458dd2c99 runtime/vendor/ort-wasm-simd-threaded.jsep.mjs
|
| 46 |
+
62ff86b2f2fa3a79eb87a7e4720e8ea9051942bf975f314181bf7dcef2feac06 runtime/vendor/ort-wasm-simd-threaded.jsep.wasm
|
| 47 |
+
7c93a51e9906b246af505bbfbfa4e5806ebe70a081ab0ca0d34e1180293f4f8d runtime/vendor/ort.webgpu.bundle.min.mjs
|
| 48 |
+
2913bb741ca413a1731e7694ab1a681db317c705c428b204e93bec514cf6077f runtime/vendor/README.md
|
| 49 |
+
143764b952fdb1a7c69ce653bfba74a7744d6a8a573bfb73e235fba356c83de3 runtime/vendor/ThirdPartyNotices.onnxruntime.txt
|
| 50 |
+
539590a6de78977caa3d28a4669df919c909a485388a870d4da67cdea8aa5698 runtime/vendor/transformers.web.js
|
| 51 |
+
2c45505005320946e5aadeaed4a66a9e0d3b7e752a371694f5c33fbbef802b17 runtime/vendor/vendor-manifest.json
|
| 52 |
+
256b18bf3b533c9aaa34099b049e688893282341fb078b772b3ecb7b59ab43b6 tiling-ratios.json
|
| 53 |
+
1efc3a6609abf6b63b1f47188d139f3b59973a6a434dffe970a7261a51ed2711 tokenizer.json
|
| 54 |
+
03efc74b752b899b6292ff7e607738be59e6f206fec9aca32bbc05e9184090fc tokenizer_config.json
|
config.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"NoAudioModel"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "d1_omni",
|
| 6 |
+
"dtype": "float16",
|
| 7 |
+
"max_length": 16384,
|
| 8 |
+
"image_text_length": 896,
|
| 9 |
+
"head_layers": 2,
|
| 10 |
+
"projector_hidden_size": 2048,
|
| 11 |
+
"temperatures": {
|
| 12 |
+
"choice:11+": 1.372515082359314,
|
| 13 |
+
"choice:2": 1.7465145587921143,
|
| 14 |
+
"choice:3-5": 1.3998981714248657,
|
| 15 |
+
"choice:6-10": 1.1751071214675903,
|
| 16 |
+
"noul:2": 1.6663223505020142,
|
| 17 |
+
"score:3-5": 1.7301132678985596,
|
| 18 |
+
"score:6-10": 1.0,
|
| 19 |
+
"choice": 1.0,
|
| 20 |
+
"score": 1.0,
|
| 21 |
+
"noul": 1.0
|
| 22 |
+
},
|
| 23 |
+
"bos_token_id": 1,
|
| 24 |
+
"pad_token_id": 0,
|
| 25 |
+
"text_config": {
|
| 26 |
+
"vocab_size": 65536,
|
| 27 |
+
"hidden_size": 1024,
|
| 28 |
+
"intermediate_size": 6656,
|
| 29 |
+
"num_hidden_layers": 16,
|
| 30 |
+
"num_attention_heads": 16,
|
| 31 |
+
"num_key_value_heads": 8,
|
| 32 |
+
"layer_types": [
|
| 33 |
+
"conv",
|
| 34 |
+
"conv",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"conv",
|
| 37 |
+
"conv",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"conv",
|
| 40 |
+
"conv",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"conv",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"conv",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"conv",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"conv"
|
| 49 |
+
],
|
| 50 |
+
"norm_eps": 1e-05,
|
| 51 |
+
"conv_L_cache": 3,
|
| 52 |
+
"block_ffn_dim_multiplier": 1.0,
|
| 53 |
+
"block_multiple_of": 256,
|
| 54 |
+
"max_position_embeddings": 128000,
|
| 55 |
+
"rope_theta": 1000000.0
|
| 56 |
+
},
|
| 57 |
+
"vision_config": {
|
| 58 |
+
"attention_dropout": 0.0,
|
| 59 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 60 |
+
"hidden_size": 768,
|
| 61 |
+
"intermediate_size": 3072,
|
| 62 |
+
"layer_norm_eps": 1e-06,
|
| 63 |
+
"model_type": "siglip2_vision_model",
|
| 64 |
+
"num_attention_heads": 12,
|
| 65 |
+
"num_channels": 3,
|
| 66 |
+
"num_hidden_layers": 12,
|
| 67 |
+
"num_patches": 256,
|
| 68 |
+
"patch_size": 16,
|
| 69 |
+
"vision_use_head": false
|
| 70 |
+
},
|
| 71 |
+
"source_revision": "02b55d7076f15129e59ab3f94783f32c4b088674"
|
| 72 |
+
}
|
licenses/LFM2.5-Encoder-350M/LICENSE
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LFM Open License v1.0
|
| 2 |
+
|
| 3 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
+
|
| 5 |
+
1. Definitions.
|
| 6 |
+
|
| 7 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by this document.
|
| 8 |
+
|
| 9 |
+
"Licensor" shall mean Liquid AI, Inc.
|
| 10 |
+
|
| 11 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 12 |
+
|
| 13 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 14 |
+
|
| 15 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 16 |
+
|
| 17 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 18 |
+
|
| 19 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
| 20 |
+
|
| 21 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 22 |
+
|
| 23 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 24 |
+
|
| 25 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 26 |
+
|
| 27 |
+
"Commercial Use" shall mean any use of the Work for direct or indirect commercial advantage or monetary compensation.
|
| 28 |
+
|
| 29 |
+
"Qualified Non-Profit Organization" shall mean a Legal Entity that is organized and operated exclusively for religious, charitable, scientific, testing for public safety, literary, or educational purposes, and which is exempt from federal income tax under Section 501(c)(3) of the United States Internal Revenue Code of 1986, as amended, or any equivalent non-profit or charitable organization in a foreign jurisdiction.
|
| 30 |
+
|
| 31 |
+
"Non-Commercial or Research Purposes" shall mean purposes that do not involve any use of the Work or a Derivative Work for Commercial Use.
|
| 32 |
+
|
| 33 |
+
"Threshold" shall mean annual revenue of 10 million United States dollars ($10,000,000) or more.
|
| 34 |
+
|
| 35 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 36 |
+
|
| 37 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 38 |
+
|
| 39 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 40 |
+
|
| 41 |
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 42 |
+
|
| 43 |
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 44 |
+
|
| 45 |
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 46 |
+
|
| 47 |
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 48 |
+
|
| 49 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 50 |
+
|
| 51 |
+
5. Commercial Use Limitation.
|
| 52 |
+
|
| 53 |
+
(a) The rights granted under this License for Commercial Use are conditioned upon You or Your Legal Entity not exceeding the Threshold.
|
| 54 |
+
|
| 55 |
+
(b) Any Commercial Use of the Work or a Derivative Work by a Legal Entity that exceeds the Threshold is not licensed under this Agreement.
|
| 56 |
+
|
| 57 |
+
(c) The Threshold shall not apply to a Qualified Non-Profit Organization's use of the Work or a Derivative Work for Non-Commercial or Research Purposes.
|
| 58 |
+
|
| 59 |
+
6. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 60 |
+
|
| 61 |
+
7. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except for the reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 62 |
+
|
| 63 |
+
8. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 64 |
+
|
| 65 |
+
9. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 66 |
+
|
| 67 |
+
10. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 68 |
+
|
| 69 |
+
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 70 |
+
|
| 71 |
+
END OF TERMS AND CONDITIONS
|
licenses/onnxruntime/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Microsoft Corporation
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
licenses/onnxruntime/ThirdPartyNotices.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
licenses/transformers/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
licenses/webbrain/LICENSE
ADDED
|
@@ -0,0 +1,685 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
WebBrain project license notice
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Emre Sokullu
|
| 4 |
+
|
| 5 |
+
WebBrain 33.0.0 and later is free software: you may redistribute it and/or
|
| 6 |
+
modify it under the terms of the GNU General Public License as published by
|
| 7 |
+
the Free Software Foundation, either version 3 of the License, or (at your
|
| 8 |
+
option) any later version.
|
| 9 |
+
|
| 10 |
+
The unmodified GNU GPL version 3 license text follows.
|
| 11 |
+
|
| 12 |
+
GNU GENERAL PUBLIC LICENSE
|
| 13 |
+
Version 3, 29 June 2007
|
| 14 |
+
|
| 15 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
| 16 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 17 |
+
of this license document, but changing it is not allowed.
|
| 18 |
+
|
| 19 |
+
Preamble
|
| 20 |
+
|
| 21 |
+
The GNU General Public License is a free, copyleft license for
|
| 22 |
+
software and other kinds of works.
|
| 23 |
+
|
| 24 |
+
The licenses for most software and other practical works are designed
|
| 25 |
+
to take away your freedom to share and change the works. By contrast,
|
| 26 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 27 |
+
share and change all versions of a program--to make sure it remains free
|
| 28 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 29 |
+
GNU General Public License for most of our software; it applies also to
|
| 30 |
+
any other work released this way by its authors. You can apply it to
|
| 31 |
+
your programs, too.
|
| 32 |
+
|
| 33 |
+
When we speak of free software, we are referring to freedom, not
|
| 34 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 35 |
+
have the freedom to distribute copies of free software (and charge for
|
| 36 |
+
them if you wish), that you receive source code or can get it if you
|
| 37 |
+
want it, that you can change the software or use pieces of it in new
|
| 38 |
+
free programs, and that you know you can do these things.
|
| 39 |
+
|
| 40 |
+
To protect your rights, we need to prevent others from denying you
|
| 41 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 42 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 43 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 44 |
+
|
| 45 |
+
For example, if you distribute copies of such a program, whether
|
| 46 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 47 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 48 |
+
or can get the source code. And you must show them these terms so they
|
| 49 |
+
know their rights.
|
| 50 |
+
|
| 51 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 52 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 53 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 54 |
+
|
| 55 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 56 |
+
that there is no warranty for this free software. For both users' and
|
| 57 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 58 |
+
changed, so that their problems will not be attributed erroneously to
|
| 59 |
+
authors of previous versions.
|
| 60 |
+
|
| 61 |
+
Some devices are designed to deny users access to install or run
|
| 62 |
+
modified versions of the software inside them, although the manufacturer
|
| 63 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 64 |
+
protecting users' freedom to change the software. The systematic
|
| 65 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 66 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 67 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 68 |
+
products. If such problems arise substantially in other domains, we
|
| 69 |
+
stand ready to extend this provision to those domains in future versions
|
| 70 |
+
of the GPL, as needed to protect the freedom of users.
|
| 71 |
+
|
| 72 |
+
Finally, every program is threatened constantly by software patents.
|
| 73 |
+
States should not allow patents to restrict development and use of
|
| 74 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 75 |
+
avoid the special danger that patents applied to a free program could
|
| 76 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 77 |
+
patents cannot be used to render the program non-free.
|
| 78 |
+
|
| 79 |
+
The precise terms and conditions for copying, distribution and
|
| 80 |
+
modification follow.
|
| 81 |
+
|
| 82 |
+
TERMS AND CONDITIONS
|
| 83 |
+
|
| 84 |
+
0. Definitions.
|
| 85 |
+
|
| 86 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 87 |
+
|
| 88 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 89 |
+
works, such as semiconductor masks.
|
| 90 |
+
|
| 91 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 92 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 93 |
+
"recipients" may be individuals or organizations.
|
| 94 |
+
|
| 95 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 96 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 97 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 98 |
+
earlier work or a work "based on" the earlier work.
|
| 99 |
+
|
| 100 |
+
A "covered work" means either the unmodified Program or a work based
|
| 101 |
+
on the Program.
|
| 102 |
+
|
| 103 |
+
To "propagate" a work means to do anything with it that, without
|
| 104 |
+
permission, would make you directly or secondarily liable for
|
| 105 |
+
infringement under applicable copyright law, except executing it on a
|
| 106 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 107 |
+
distribution (with or without modification), making available to the
|
| 108 |
+
public, and in some countries other activities as well.
|
| 109 |
+
|
| 110 |
+
To "convey" a work means any kind of propagation that enables other
|
| 111 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 112 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 113 |
+
|
| 114 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 115 |
+
to the extent that it includes a convenient and prominently visible
|
| 116 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 117 |
+
tells the user that there is no warranty for the work (except to the
|
| 118 |
+
extent that warranties are provided), that licensees may convey the
|
| 119 |
+
work under this License, and how to view a copy of this License. If
|
| 120 |
+
the interface presents a list of user commands or options, such as a
|
| 121 |
+
menu, a prominent item in the list meets this criterion.
|
| 122 |
+
|
| 123 |
+
1. Source Code.
|
| 124 |
+
|
| 125 |
+
The "source code" for a work means the preferred form of the work
|
| 126 |
+
for making modifications to it. "Object code" means any non-source
|
| 127 |
+
form of a work.
|
| 128 |
+
|
| 129 |
+
A "Standard Interface" means an interface that either is an official
|
| 130 |
+
standard defined by a recognized standards body, or, in the case of
|
| 131 |
+
interfaces specified for a particular programming language, one that
|
| 132 |
+
is widely used among developers working in that language.
|
| 133 |
+
|
| 134 |
+
The "System Libraries" of an executable work include anything, other
|
| 135 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 136 |
+
packaging a Major Component, but which is not part of that Major
|
| 137 |
+
Component, and (b) serves only to enable use of the work with that
|
| 138 |
+
Major Component, or to implement a Standard Interface for which an
|
| 139 |
+
implementation is available to the public in source code form. A
|
| 140 |
+
"Major Component", in this context, means a major essential component
|
| 141 |
+
(kernel, window system, and so on) of the specific operating system
|
| 142 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 143 |
+
produce the work, or an object code interpreter used to run it.
|
| 144 |
+
|
| 145 |
+
The "Corresponding Source" for a work in object code form means all
|
| 146 |
+
the source code needed to generate, install, and (for an executable
|
| 147 |
+
work) run the object code and to modify the work, including scripts to
|
| 148 |
+
control those activities. However, it does not include the work's
|
| 149 |
+
System Libraries, or general-purpose tools or generally available free
|
| 150 |
+
programs which are used unmodified in performing those activities but
|
| 151 |
+
which are not part of the work. For example, Corresponding Source
|
| 152 |
+
includes interface definition files associated with source files for
|
| 153 |
+
the work, and the source code for shared libraries and dynamically
|
| 154 |
+
linked subprograms that the work is specifically designed to require,
|
| 155 |
+
such as by intimate data communication or control flow between those
|
| 156 |
+
subprograms and other parts of the work.
|
| 157 |
+
|
| 158 |
+
The Corresponding Source need not include anything that users
|
| 159 |
+
can regenerate automatically from other parts of the Corresponding
|
| 160 |
+
Source.
|
| 161 |
+
|
| 162 |
+
The Corresponding Source for a work in source code form is that
|
| 163 |
+
same work.
|
| 164 |
+
|
| 165 |
+
2. Basic Permissions.
|
| 166 |
+
|
| 167 |
+
All rights granted under this License are granted for the term of
|
| 168 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 169 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 170 |
+
permission to run the unmodified Program. The output from running a
|
| 171 |
+
covered work is covered by this License only if the output, given its
|
| 172 |
+
content, constitutes a covered work. This License acknowledges your
|
| 173 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 174 |
+
|
| 175 |
+
You may make, run and propagate covered works that you do not
|
| 176 |
+
convey, without conditions so long as your license otherwise remains
|
| 177 |
+
in force. You may convey covered works to others for the sole purpose
|
| 178 |
+
of having them make modifications exclusively for you, or provide you
|
| 179 |
+
with facilities for running those works, provided that you comply with
|
| 180 |
+
the terms of this License in conveying all material for which you do
|
| 181 |
+
not control copyright. Those thus making or running the covered works
|
| 182 |
+
for you must do so exclusively on your behalf, under your direction
|
| 183 |
+
and control, on terms that prohibit them from making any copies of
|
| 184 |
+
your copyrighted material outside their relationship with you.
|
| 185 |
+
|
| 186 |
+
Conveying under any other circumstances is permitted solely under
|
| 187 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 188 |
+
makes it unnecessary.
|
| 189 |
+
|
| 190 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 191 |
+
|
| 192 |
+
No covered work shall be deemed part of an effective technological
|
| 193 |
+
measure under any applicable law fulfilling obligations under article
|
| 194 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 195 |
+
similar laws prohibiting or restricting circumvention of such
|
| 196 |
+
measures.
|
| 197 |
+
|
| 198 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 199 |
+
circumvention of technological measures to the extent such circumvention
|
| 200 |
+
is effected by exercising rights under this License with respect to
|
| 201 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 202 |
+
modification of the work as a means of enforcing, against the work's
|
| 203 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 204 |
+
technological measures.
|
| 205 |
+
|
| 206 |
+
4. Conveying Verbatim Copies.
|
| 207 |
+
|
| 208 |
+
You may convey verbatim copies of the Program's source code as you
|
| 209 |
+
receive it, in any medium, provided that you conspicuously and
|
| 210 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 211 |
+
keep intact all notices stating that this License and any
|
| 212 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 213 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 214 |
+
recipients a copy of this License along with the Program.
|
| 215 |
+
|
| 216 |
+
You may charge any price or no price for each copy that you convey,
|
| 217 |
+
and you may offer support or warranty protection for a fee.
|
| 218 |
+
|
| 219 |
+
5. Conveying Modified Source Versions.
|
| 220 |
+
|
| 221 |
+
You may convey a work based on the Program, or the modifications to
|
| 222 |
+
produce it from the Program, in the form of source code under the
|
| 223 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 224 |
+
|
| 225 |
+
a) The work must carry prominent notices stating that you modified
|
| 226 |
+
it, and giving a relevant date.
|
| 227 |
+
|
| 228 |
+
b) The work must carry prominent notices stating that it is
|
| 229 |
+
released under this License and any conditions added under section
|
| 230 |
+
7. This requirement modifies the requirement in section 4 to
|
| 231 |
+
"keep intact all notices".
|
| 232 |
+
|
| 233 |
+
c) You must license the entire work, as a whole, under this
|
| 234 |
+
License to anyone who comes into possession of a copy. This
|
| 235 |
+
License will therefore apply, along with any applicable section 7
|
| 236 |
+
additional terms, to the whole of the work, and all its parts,
|
| 237 |
+
regardless of how they are packaged. This License gives no
|
| 238 |
+
permission to license the work in any other way, but it does not
|
| 239 |
+
invalidate such permission if you have separately received it.
|
| 240 |
+
|
| 241 |
+
d) If the work has interactive user interfaces, each must display
|
| 242 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 243 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 244 |
+
work need not make them do so.
|
| 245 |
+
|
| 246 |
+
A compilation of a covered work with other separate and independent
|
| 247 |
+
works, which are not by their nature extensions of the covered work,
|
| 248 |
+
and which are not combined with it such as to form a larger program,
|
| 249 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 250 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 251 |
+
used to limit the access or legal rights of the compilation's users
|
| 252 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 253 |
+
in an aggregate does not cause this License to apply to the other
|
| 254 |
+
parts of the aggregate.
|
| 255 |
+
|
| 256 |
+
6. Conveying Non-Source Forms.
|
| 257 |
+
|
| 258 |
+
You may convey a covered work in object code form under the terms
|
| 259 |
+
of sections 4 and 5, provided that you also convey the
|
| 260 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 261 |
+
in one of these ways:
|
| 262 |
+
|
| 263 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 264 |
+
(including a physical distribution medium), accompanied by the
|
| 265 |
+
Corresponding Source fixed on a durable physical medium
|
| 266 |
+
customarily used for software interchange.
|
| 267 |
+
|
| 268 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 269 |
+
(including a physical distribution medium), accompanied by a
|
| 270 |
+
written offer, valid for at least three years and valid for as
|
| 271 |
+
long as you offer spare parts or customer support for that product
|
| 272 |
+
model, to give anyone who possesses the object code either (1) a
|
| 273 |
+
copy of the Corresponding Source for all the software in the
|
| 274 |
+
product that is covered by this License, on a durable physical
|
| 275 |
+
medium customarily used for software interchange, for a price no
|
| 276 |
+
more than your reasonable cost of physically performing this
|
| 277 |
+
conveying of source, or (2) access to copy the
|
| 278 |
+
Corresponding Source from a network server at no charge.
|
| 279 |
+
|
| 280 |
+
c) Convey individual copies of the object code with a copy of the
|
| 281 |
+
written offer to provide the Corresponding Source. This
|
| 282 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 283 |
+
only if you received the object code with such an offer, in accord
|
| 284 |
+
with subsection 6b.
|
| 285 |
+
|
| 286 |
+
d) Convey the object code by offering access from a designated
|
| 287 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 288 |
+
Corresponding Source in the same way through the same place at no
|
| 289 |
+
further charge. You need not require recipients to copy the
|
| 290 |
+
Corresponding Source along with the object code. If the place to
|
| 291 |
+
copy the object code is a network server, the Corresponding Source
|
| 292 |
+
may be on a different server (operated by you or a third party)
|
| 293 |
+
that supports equivalent copying facilities, provided you maintain
|
| 294 |
+
clear directions next to the object code saying where to find the
|
| 295 |
+
Corresponding Source. Regardless of what server hosts the
|
| 296 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 297 |
+
available for as long as needed to satisfy these requirements.
|
| 298 |
+
|
| 299 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 300 |
+
you inform other peers where the object code and Corresponding
|
| 301 |
+
Source of the work are being offered to the general public at no
|
| 302 |
+
charge under subsection 6d.
|
| 303 |
+
|
| 304 |
+
A separable portion of the object code, whose source code is excluded
|
| 305 |
+
from the Corresponding Source as a System Library, need not be
|
| 306 |
+
included in conveying the object code work.
|
| 307 |
+
|
| 308 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 309 |
+
tangible personal property which is normally used for personal, family,
|
| 310 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 311 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 312 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 313 |
+
product received by a particular user, "normally used" refers to a
|
| 314 |
+
typical or common use of that class of product, regardless of the status
|
| 315 |
+
of the particular user or of the way in which the particular user
|
| 316 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 317 |
+
is a consumer product regardless of whether the product has substantial
|
| 318 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 319 |
+
the only significant mode of use of the product.
|
| 320 |
+
|
| 321 |
+
"Installation Information" for a User Product means any methods,
|
| 322 |
+
procedures, authorization keys, or other information required to install
|
| 323 |
+
and execute modified versions of a covered work in that User Product from
|
| 324 |
+
a modified version of its Corresponding Source. The information must
|
| 325 |
+
suffice to ensure that the continued functioning of the modified object
|
| 326 |
+
code is in no case prevented or interfered with solely because
|
| 327 |
+
modification has been made.
|
| 328 |
+
|
| 329 |
+
If you convey an object code work under this section in, or with, or
|
| 330 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 331 |
+
part of a transaction in which the right of possession and use of the
|
| 332 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 333 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 334 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 335 |
+
by the Installation Information. But this requirement does not apply
|
| 336 |
+
if neither you nor any third party retains the ability to install
|
| 337 |
+
modified object code on the User Product (for example, the work has
|
| 338 |
+
been installed in ROM).
|
| 339 |
+
|
| 340 |
+
The requirement to provide Installation Information does not include a
|
| 341 |
+
requirement to continue to provide support service, warranty, or updates
|
| 342 |
+
for a work that has been modified or installed by the recipient, or for
|
| 343 |
+
the User Product in which it has been modified or installed. Access to a
|
| 344 |
+
network may be denied when the modification itself materially and
|
| 345 |
+
adversely affects the operation of the network or violates the rules and
|
| 346 |
+
protocols for communication across the network.
|
| 347 |
+
|
| 348 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 349 |
+
in accord with this section must be in a format that is publicly
|
| 350 |
+
documented (and with an implementation available to the public in
|
| 351 |
+
source code form), and must require no special password or key for
|
| 352 |
+
unpacking, reading or copying.
|
| 353 |
+
|
| 354 |
+
7. Additional Terms.
|
| 355 |
+
|
| 356 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 357 |
+
License by making exceptions from one or more of its conditions.
|
| 358 |
+
Additional permissions that are applicable to the entire Program shall
|
| 359 |
+
be treated as though they were included in this License, to the extent
|
| 360 |
+
that they are valid under applicable law. If additional permissions
|
| 361 |
+
apply only to part of the Program, that part may be used separately
|
| 362 |
+
under those permissions, but the entire Program remains governed by
|
| 363 |
+
this License without regard to the additional permissions.
|
| 364 |
+
|
| 365 |
+
When you convey a copy of a covered work, you may at your option
|
| 366 |
+
remove any additional permissions from that copy, or from any part of
|
| 367 |
+
it. (Additional permissions may be written to require their own
|
| 368 |
+
removal in certain cases when you modify the work.) You may place
|
| 369 |
+
additional permissions on material, added by you to a covered work,
|
| 370 |
+
for which you have or can give appropriate copyright permission.
|
| 371 |
+
|
| 372 |
+
Notwithstanding any other provision of this License, for material you
|
| 373 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 374 |
+
that material) supplement the terms of this License with terms:
|
| 375 |
+
|
| 376 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 377 |
+
terms of sections 15 and 16 of this License; or
|
| 378 |
+
|
| 379 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 380 |
+
author attributions in that material or in the Appropriate Legal
|
| 381 |
+
Notices displayed by works containing it; or
|
| 382 |
+
|
| 383 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 384 |
+
requiring that modified versions of such material be marked in
|
| 385 |
+
reasonable ways as different from the original version; or
|
| 386 |
+
|
| 387 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 388 |
+
authors of the material; or
|
| 389 |
+
|
| 390 |
+
e) Declining to grant rights under trademark law for use of some
|
| 391 |
+
trade names, trademarks, or service marks; or
|
| 392 |
+
|
| 393 |
+
f) Requiring indemnification of licensors and authors of that
|
| 394 |
+
material by anyone who conveys the material (or modified versions of
|
| 395 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 396 |
+
any liability that these contractual assumptions directly impose on
|
| 397 |
+
those licensors and authors.
|
| 398 |
+
|
| 399 |
+
All other non-permissive additional terms are considered "further
|
| 400 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 401 |
+
received it, or any part of it, contains a notice stating that it is
|
| 402 |
+
governed by this License along with a term that is a further
|
| 403 |
+
restriction, you may remove that term. If a license document contains
|
| 404 |
+
a further restriction but permits relicensing or conveying under this
|
| 405 |
+
License, you may add to a covered work material governed by the terms
|
| 406 |
+
of that license document, provided that the further restriction does
|
| 407 |
+
not survive such relicensing or conveying.
|
| 408 |
+
|
| 409 |
+
If you add terms to a covered work in accord with this section, you
|
| 410 |
+
must place, in the relevant source files, a statement of the
|
| 411 |
+
additional terms that apply to those files, or a notice indicating
|
| 412 |
+
where to find the applicable terms.
|
| 413 |
+
|
| 414 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 415 |
+
form of a separately written license, or stated as exceptions;
|
| 416 |
+
the above requirements apply either way.
|
| 417 |
+
|
| 418 |
+
8. Termination.
|
| 419 |
+
|
| 420 |
+
You may not propagate or modify a covered work except as expressly
|
| 421 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 422 |
+
modify it is void, and will automatically terminate your rights under
|
| 423 |
+
this License (including any patent licenses granted under the third
|
| 424 |
+
paragraph of section 11).
|
| 425 |
+
|
| 426 |
+
However, if you cease all violation of this License, then your
|
| 427 |
+
license from a particular copyright holder is reinstated (a)
|
| 428 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 429 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 430 |
+
holder fails to notify you of the violation by some reasonable means
|
| 431 |
+
prior to 60 days after the cessation.
|
| 432 |
+
|
| 433 |
+
Moreover, your license from a particular copyright holder is
|
| 434 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 435 |
+
violation by some reasonable means, this is the first time you have
|
| 436 |
+
received notice of violation of this License (for any work) from that
|
| 437 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 438 |
+
your receipt of the notice.
|
| 439 |
+
|
| 440 |
+
Termination of your rights under this section does not terminate the
|
| 441 |
+
licenses of parties who have received copies or rights from you under
|
| 442 |
+
this License. If your rights have been terminated and not permanently
|
| 443 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 444 |
+
material under section 10.
|
| 445 |
+
|
| 446 |
+
9. Acceptance Not Required for Having Copies.
|
| 447 |
+
|
| 448 |
+
You are not required to accept this License in order to receive or
|
| 449 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 450 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 451 |
+
to receive a copy likewise does not require acceptance. However,
|
| 452 |
+
nothing other than this License grants you permission to propagate or
|
| 453 |
+
modify any covered work. These actions infringe copyright if you do
|
| 454 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 455 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 456 |
+
|
| 457 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 458 |
+
|
| 459 |
+
Each time you convey a covered work, the recipient automatically
|
| 460 |
+
receives a license from the original licensors, to run, modify and
|
| 461 |
+
propagate that work, subject to this License. You are not responsible
|
| 462 |
+
for enforcing compliance by third parties with this License.
|
| 463 |
+
|
| 464 |
+
An "entity transaction" is a transaction transferring control of an
|
| 465 |
+
organization, or substantially all assets of one, or subdividing an
|
| 466 |
+
organization, or merging organizations. If propagation of a covered
|
| 467 |
+
work results from an entity transaction, each party to that
|
| 468 |
+
transaction who receives a copy of the work also receives whatever
|
| 469 |
+
licenses to the work the party's predecessor in interest had or could
|
| 470 |
+
give under the previous paragraph, plus a right to possession of the
|
| 471 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 472 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 473 |
+
|
| 474 |
+
You may not impose any further restrictions on the exercise of the
|
| 475 |
+
rights granted or affirmed under this License. For example, you may
|
| 476 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 477 |
+
rights granted under this License, and you may not initiate litigation
|
| 478 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 479 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 480 |
+
sale, or importing the Program or any portion of it.
|
| 481 |
+
|
| 482 |
+
11. Patents.
|
| 483 |
+
|
| 484 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 485 |
+
License of the Program or a work on which the Program is based. The
|
| 486 |
+
work thus licensed is called the contributor's "contributor version".
|
| 487 |
+
|
| 488 |
+
A contributor's "essential patent claims" are all patent claims
|
| 489 |
+
owned or controlled by the contributor, whether already acquired or
|
| 490 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 491 |
+
by this License, of making, using, or selling its contributor version,
|
| 492 |
+
but do not include claims that would be infringed only as a
|
| 493 |
+
consequence of further modification of the contributor version. For
|
| 494 |
+
purposes of this definition, "control" includes the right to grant
|
| 495 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 496 |
+
this License.
|
| 497 |
+
|
| 498 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 499 |
+
patent license under the contributor's essential patent claims, to
|
| 500 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 501 |
+
propagate the contents of its contributor version.
|
| 502 |
+
|
| 503 |
+
In the following three paragraphs, a "patent license" is any express
|
| 504 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 505 |
+
(such as an express permission to practice a patent or covenant not to
|
| 506 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 507 |
+
party means to make such an agreement or commitment not to enforce a
|
| 508 |
+
patent against the party.
|
| 509 |
+
|
| 510 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 511 |
+
and the Corresponding Source of the work is not available for anyone
|
| 512 |
+
to copy, free of charge and under the terms of this License, through a
|
| 513 |
+
publicly available network server or other readily accessible means,
|
| 514 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 515 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 516 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 517 |
+
consistent with the requirements of this License, to extend the patent
|
| 518 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 519 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 520 |
+
covered work in a country, or your recipient's use of the covered work
|
| 521 |
+
in a country, would infringe one or more identifiable patents in that
|
| 522 |
+
country that you have reason to believe are valid.
|
| 523 |
+
|
| 524 |
+
If, pursuant to or in connection with a single transaction or
|
| 525 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 526 |
+
covered work, and grant a patent license to some of the parties
|
| 527 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 528 |
+
or convey a specific copy of the covered work, then the patent license
|
| 529 |
+
you grant is automatically extended to all recipients of the covered
|
| 530 |
+
work and works based on it.
|
| 531 |
+
|
| 532 |
+
A patent license is "discriminatory" if it does not include within
|
| 533 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 534 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 535 |
+
specifically granted under this License. You may not convey a covered
|
| 536 |
+
work if you are a party to an arrangement with a third party that is
|
| 537 |
+
in the business of distributing software, under which you make payment
|
| 538 |
+
to the third party based on the extent of your activity of conveying
|
| 539 |
+
the work, and under which the third party grants, to any of the
|
| 540 |
+
parties who would receive the covered work from you, a discriminatory
|
| 541 |
+
patent license (a) in connection with copies of the covered work
|
| 542 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 543 |
+
for and in connection with specific products or compilations that
|
| 544 |
+
contain the covered work, unless you entered into that arrangement,
|
| 545 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 546 |
+
|
| 547 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 548 |
+
any implied license or other defenses to infringement that may
|
| 549 |
+
otherwise be available to you under applicable patent law.
|
| 550 |
+
|
| 551 |
+
12. No Surrender of Others' Freedom.
|
| 552 |
+
|
| 553 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 554 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 555 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 556 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 557 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 558 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 559 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 560 |
+
the Program, the only way you could satisfy both those terms and this
|
| 561 |
+
License would be to refrain entirely from conveying the Program.
|
| 562 |
+
|
| 563 |
+
13. Use with the GNU Affero General Public License.
|
| 564 |
+
|
| 565 |
+
Notwithstanding any other provision of this License, you have
|
| 566 |
+
permission to link or combine any covered work with a work licensed
|
| 567 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 568 |
+
combined work, and to convey the resulting work. The terms of this
|
| 569 |
+
License will continue to apply to the part which is the covered work,
|
| 570 |
+
but the special requirements of the GNU Affero General Public License,
|
| 571 |
+
section 13, concerning interaction through a network will apply to the
|
| 572 |
+
combination as such.
|
| 573 |
+
|
| 574 |
+
14. Revised Versions of this License.
|
| 575 |
+
|
| 576 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 577 |
+
the GNU General Public License from time to time. Such new versions will
|
| 578 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 579 |
+
address new problems or concerns.
|
| 580 |
+
|
| 581 |
+
Each version is given a distinguishing version number. If the
|
| 582 |
+
Program specifies that a certain numbered version of the GNU General
|
| 583 |
+
Public License "or any later version" applies to it, you have the
|
| 584 |
+
option of following the terms and conditions either of that numbered
|
| 585 |
+
version or of any later version published by the Free Software
|
| 586 |
+
Foundation. If the Program does not specify a version number of the
|
| 587 |
+
GNU General Public License, you may choose any version ever published
|
| 588 |
+
by the Free Software Foundation.
|
| 589 |
+
|
| 590 |
+
If the Program specifies that a proxy can decide which future
|
| 591 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 592 |
+
public statement of acceptance of a version permanently authorizes you
|
| 593 |
+
to choose that version for the Program.
|
| 594 |
+
|
| 595 |
+
Later license versions may give you additional or different
|
| 596 |
+
permissions. However, no additional obligations are imposed on any
|
| 597 |
+
author or copyright holder as a result of your choosing to follow a
|
| 598 |
+
later version.
|
| 599 |
+
|
| 600 |
+
15. Disclaimer of Warranty.
|
| 601 |
+
|
| 602 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 603 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 604 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 605 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 606 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 607 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 608 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 609 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 610 |
+
|
| 611 |
+
16. Limitation of Liability.
|
| 612 |
+
|
| 613 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 614 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 615 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 616 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 617 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 618 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 619 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 620 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 621 |
+
SUCH DAMAGES.
|
| 622 |
+
|
| 623 |
+
17. Interpretation of Sections 15 and 16.
|
| 624 |
+
|
| 625 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 626 |
+
above cannot be given local legal effect according to their terms,
|
| 627 |
+
reviewing courts shall apply local law that most closely approximates
|
| 628 |
+
an absolute waiver of all civil liability in connection with the
|
| 629 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 630 |
+
copy of the Program in return for a fee.
|
| 631 |
+
|
| 632 |
+
END OF TERMS AND CONDITIONS
|
| 633 |
+
|
| 634 |
+
How to Apply These Terms to Your New Programs
|
| 635 |
+
|
| 636 |
+
If you develop a new program, and you want it to be of the greatest
|
| 637 |
+
possible use to the public, the best way to achieve this is to make it
|
| 638 |
+
free software which everyone can redistribute and change under these terms.
|
| 639 |
+
|
| 640 |
+
To do so, attach the following notices to the program. It is safest
|
| 641 |
+
to attach them to the start of each source file to most effectively
|
| 642 |
+
state the exclusion of warranty; and each file should have at least
|
| 643 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 644 |
+
|
| 645 |
+
<one line to give the program's name and a brief idea of what it does.>
|
| 646 |
+
Copyright (C) <year> <name of author>
|
| 647 |
+
|
| 648 |
+
This program is free software: you can redistribute it and/or modify
|
| 649 |
+
it under the terms of the GNU General Public License as published by
|
| 650 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 651 |
+
(at your option) any later version.
|
| 652 |
+
|
| 653 |
+
This program is distributed in the hope that it will be useful,
|
| 654 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 655 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 656 |
+
GNU General Public License for more details.
|
| 657 |
+
|
| 658 |
+
You should have received a copy of the GNU General Public License
|
| 659 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 660 |
+
|
| 661 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 662 |
+
|
| 663 |
+
If the program does terminal interaction, make it output a short
|
| 664 |
+
notice like this when it starts in an interactive mode:
|
| 665 |
+
|
| 666 |
+
<program> Copyright (C) <year> <name of author>
|
| 667 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 668 |
+
This is free software, and you are welcome to redistribute it
|
| 669 |
+
under certain conditions; type `show c' for details.
|
| 670 |
+
|
| 671 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 672 |
+
parts of the General Public License. Of course, your program's commands
|
| 673 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 674 |
+
|
| 675 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 676 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 677 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 678 |
+
<http://www.gnu.org/licenses/>.
|
| 679 |
+
|
| 680 |
+
The GNU General Public License does not permit incorporating your program
|
| 681 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 682 |
+
may consider it more useful to permit linking proprietary applications with
|
| 683 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 684 |
+
Public License instead of this License. But first, please read
|
| 685 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940
|
| 3 |
+
size 1899912876
|
model.safetensors.NOTICE.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
onnx/decision.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:631417aa49dacb602b7e099062cd44c89e3747533a4094a61ff5f1cb3ccb0daf
|
| 3 |
+
size 1522925568
|
onnx/decision.data.NOTICE.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
onnx/decision.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef66e7aa7f288fd71578cb6f6b71a04d6f531ad7755536487e155f66f605baf9
|
| 3 |
+
size 366403
|
onnx/decision.onnx.NOTICE.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
onnx/projector.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e52c40550fbce097580870a7ddcca3f6992d93942931039ea717878514dd7a47
|
| 3 |
+
size 33566720
|
onnx/projector.data.NOTICE.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
onnx/projector.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5489cd6636df06e474866ea55a37b06ec30a9fffcc993c89caff76639cc07d1e
|
| 3 |
+
size 5712
|
onnx/projector.onnx.NOTICE.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Experimental d1 FP32 browser-decision derivative
|
| 2 |
+
|
| 3 |
+
Original model and model implementation: Liquid AI, LiquidAI/d1-omni-600M,
|
| 4 |
+
revision 02b55d7076f15129e59ab3f94783f32c4b088674.
|
| 5 |
+
Original license: LFM Open License v1.0. The exact upstream license is retained
|
| 6 |
+
as LICENSE. Liquid AI does not endorse this experimental derivative.
|
| 7 |
+
|
| 8 |
+
MODIFIED MATERIALS NOTICE
|
| 9 |
+
The original audio components were removed. The decision head and vision
|
| 10 |
+
projector were adapted in a prior, completed synthetic-browser experiment.
|
| 11 |
+
Four encoder Q/V weights include one FP32 merge of the selected rank-4 LoRA
|
| 12 |
+
delta. The vision tower remains byte-identical to the no-audio original-A
|
| 13 |
+
reference. The immutable selected checkpoint is projector_head_text_lora,
|
| 14 |
+
validation-selected epoch 06. No new training, merge, quantization, checkpoint
|
| 15 |
+
selection or ONNX export was performed for this release package.
|
| 16 |
+
|
| 17 |
+
model.safetensors, onnx/decision.onnx, onnx/decision.data,
|
| 18 |
+
onnx/projector.onnx and onnx/projector.data are modified derivatives of the
|
| 19 |
+
upstream model. They are copied byte-identically from the verified experiment.
|
| 20 |
+
The onnx/vision.onnx and onnx/vision.data files retain the accepted original-A
|
| 21 |
+
vision graph bytes. Modified-file notices are supplied as sidecars so the
|
| 22 |
+
verified binary bytes are not altered.
|
| 23 |
+
|
| 24 |
+
The immutable config.json retains a legacy dtype=float16 label. Actual packaged
|
| 25 |
+
weights and ONNX arithmetic are float32; package-manifest.json is authoritative.
|
| 26 |
+
Tokenizer, calibration temperatures and answer semantics are unchanged.
|
| 27 |
+
|
| 28 |
+
Source, selected delta, logical tensor-state identity and physical checkpoint
|
| 29 |
+
file identity are separately recorded in provenance/selection.json,
|
| 30 |
+
provenance/model-identity.json and package-manifest.json.
|
| 31 |
+
|
| 32 |
+
This derivative is experimental. Synthetic labels/results and finite browser
|
| 33 |
+
runtime parity do not establish reliability on real independently developed
|
| 34 |
+
websites. In particular, all seven positive completion examples in the older
|
| 35 |
+
synthetic held-out suite remain missed. No blanket commercial permission is
|
| 36 |
+
granted here; consult LICENSE, including its annual-revenue threshold terms.
|
| 37 |
+
|
| 38 |
+
Third-party runtime code retains its separate upstream notices under licenses/.
|
| 39 |
+
Microsoft ONNX Runtime is MIT-licensed; Hugging Face Transformers.js is
|
| 40 |
+
Apache-2.0-licensed. These dependency licenses do not replace the model license.
|
onnx/vision.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:490b694cf9a8770793e1cccc3d698bfb076f4b177216f9036e82eb0735b09390
|
| 3 |
+
size 343372800
|
onnx/vision.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa7cbbabc0ee925ab4dd44a6c85dd7bf92ef36da5f2ebcdf1066f918d1a2ea89
|
| 3 |
+
size 119183
|
package-manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
provenance/integration-batch-approved.json
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"complete": true,
|
| 4 |
+
"passed": true,
|
| 5 |
+
"scope": "Actual source tokenizer, 32 valid long text questions, mock sessions test batching/answer routing only; no neural parity claim",
|
| 6 |
+
"model_calls": 0,
|
| 7 |
+
"gpu_calls": 0,
|
| 8 |
+
"browser_calls": 0,
|
| 9 |
+
"real_ort_sessions": 0,
|
| 10 |
+
"protected_writes": 0,
|
| 11 |
+
"records": [
|
| 12 |
+
{
|
| 13 |
+
"build": "chrome",
|
| 14 |
+
"passed": true,
|
| 15 |
+
"checks": {
|
| 16 |
+
"source_65536_budget": true,
|
| 17 |
+
"multiple_batches": true,
|
| 18 |
+
"coverage": true,
|
| 19 |
+
"public_choice": true,
|
| 20 |
+
"fp32_feeds": true,
|
| 21 |
+
"no_generated_tokens": true
|
| 22 |
+
},
|
| 23 |
+
"calls": [
|
| 24 |
+
{
|
| 25 |
+
"batch": 8,
|
| 26 |
+
"length": 7962,
|
| 27 |
+
"padded_tokens": 63696,
|
| 28 |
+
"width": 5,
|
| 29 |
+
"feed_types": {
|
| 30 |
+
"input_ids": "int64",
|
| 31 |
+
"text_mask": "bool",
|
| 32 |
+
"marker_pos": "int64",
|
| 33 |
+
"marker_mask": "bool",
|
| 34 |
+
"qtype": "int64",
|
| 35 |
+
"temperature": "float32",
|
| 36 |
+
"media_prefix": "float32"
|
| 37 |
+
}
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"batch": 8,
|
| 41 |
+
"length": 7962,
|
| 42 |
+
"padded_tokens": 63696,
|
| 43 |
+
"width": 5,
|
| 44 |
+
"feed_types": {
|
| 45 |
+
"input_ids": "int64",
|
| 46 |
+
"text_mask": "bool",
|
| 47 |
+
"marker_pos": "int64",
|
| 48 |
+
"marker_mask": "bool",
|
| 49 |
+
"qtype": "int64",
|
| 50 |
+
"temperature": "float32",
|
| 51 |
+
"media_prefix": "float32"
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"batch": 8,
|
| 56 |
+
"length": 7942,
|
| 57 |
+
"padded_tokens": 63536,
|
| 58 |
+
"width": 3,
|
| 59 |
+
"feed_types": {
|
| 60 |
+
"input_ids": "int64",
|
| 61 |
+
"text_mask": "bool",
|
| 62 |
+
"marker_pos": "int64",
|
| 63 |
+
"marker_mask": "bool",
|
| 64 |
+
"qtype": "int64",
|
| 65 |
+
"temperature": "float32",
|
| 66 |
+
"media_prefix": "float32"
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"batch": 8,
|
| 71 |
+
"length": 7932,
|
| 72 |
+
"padded_tokens": 63456,
|
| 73 |
+
"width": 2,
|
| 74 |
+
"feed_types": {
|
| 75 |
+
"input_ids": "int64",
|
| 76 |
+
"text_mask": "bool",
|
| 77 |
+
"marker_pos": "int64",
|
| 78 |
+
"marker_mask": "bool",
|
| 79 |
+
"qtype": "int64",
|
| 80 |
+
"temperature": "float32",
|
| 81 |
+
"media_prefix": "float32"
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
],
|
| 85 |
+
"source": {
|
| 86 |
+
"path": "../webbrain/src/chrome/src/providers/d1-runtime.js",
|
| 87 |
+
"bytes": 8578,
|
| 88 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 89 |
+
},
|
| 90 |
+
"input_state_utf8_bytes": 15802
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"build": "firefox",
|
| 94 |
+
"passed": true,
|
| 95 |
+
"checks": {
|
| 96 |
+
"source_65536_budget": true,
|
| 97 |
+
"multiple_batches": true,
|
| 98 |
+
"coverage": true,
|
| 99 |
+
"public_choice": true,
|
| 100 |
+
"fp32_feeds": true,
|
| 101 |
+
"no_generated_tokens": true
|
| 102 |
+
},
|
| 103 |
+
"calls": [
|
| 104 |
+
{
|
| 105 |
+
"batch": 8,
|
| 106 |
+
"length": 7962,
|
| 107 |
+
"padded_tokens": 63696,
|
| 108 |
+
"width": 5,
|
| 109 |
+
"feed_types": {
|
| 110 |
+
"input_ids": "int64",
|
| 111 |
+
"text_mask": "bool",
|
| 112 |
+
"marker_pos": "int64",
|
| 113 |
+
"marker_mask": "bool",
|
| 114 |
+
"qtype": "int64",
|
| 115 |
+
"temperature": "float32",
|
| 116 |
+
"media_prefix": "float32"
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"batch": 8,
|
| 121 |
+
"length": 7962,
|
| 122 |
+
"padded_tokens": 63696,
|
| 123 |
+
"width": 5,
|
| 124 |
+
"feed_types": {
|
| 125 |
+
"input_ids": "int64",
|
| 126 |
+
"text_mask": "bool",
|
| 127 |
+
"marker_pos": "int64",
|
| 128 |
+
"marker_mask": "bool",
|
| 129 |
+
"qtype": "int64",
|
| 130 |
+
"temperature": "float32",
|
| 131 |
+
"media_prefix": "float32"
|
| 132 |
+
}
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"batch": 8,
|
| 136 |
+
"length": 7942,
|
| 137 |
+
"padded_tokens": 63536,
|
| 138 |
+
"width": 3,
|
| 139 |
+
"feed_types": {
|
| 140 |
+
"input_ids": "int64",
|
| 141 |
+
"text_mask": "bool",
|
| 142 |
+
"marker_pos": "int64",
|
| 143 |
+
"marker_mask": "bool",
|
| 144 |
+
"qtype": "int64",
|
| 145 |
+
"temperature": "float32",
|
| 146 |
+
"media_prefix": "float32"
|
| 147 |
+
}
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"batch": 8,
|
| 151 |
+
"length": 7932,
|
| 152 |
+
"padded_tokens": 63456,
|
| 153 |
+
"width": 2,
|
| 154 |
+
"feed_types": {
|
| 155 |
+
"input_ids": "int64",
|
| 156 |
+
"text_mask": "bool",
|
| 157 |
+
"marker_pos": "int64",
|
| 158 |
+
"marker_mask": "bool",
|
| 159 |
+
"qtype": "int64",
|
| 160 |
+
"temperature": "float32",
|
| 161 |
+
"media_prefix": "float32"
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
],
|
| 165 |
+
"source": {
|
| 166 |
+
"path": "../webbrain/src/firefox/src/providers/d1-runtime.js",
|
| 167 |
+
"bytes": 8578,
|
| 168 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 169 |
+
},
|
| 170 |
+
"input_state_utf8_bytes": 15802
|
| 171 |
+
}
|
| 172 |
+
],
|
| 173 |
+
"runner": {
|
| 174 |
+
"path": "d1-webbrain-release/validation/integration_batch.mjs",
|
| 175 |
+
"bytes": 3933,
|
| 176 |
+
"sha256": "cb46aee04f04c823dcac797ea9601d247f63e5d8cb4ae678db67056520d38315"
|
| 177 |
+
},
|
| 178 |
+
"checked_at_utc": "2026-10-08T22:59:50.270Z"
|
| 179 |
+
}
|
provenance/integration-contract-approved.json
ADDED
|
@@ -0,0 +1,1812 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"complete": true,
|
| 4 |
+
"passed": true,
|
| 5 |
+
"checks_scope": "Actual pinned tokenizer + original prompt formatting, calibration and public answer parsing; not neural/model inference",
|
| 6 |
+
"source_oracle": "Pinned source/prompt.py, no wrapper/model",
|
| 7 |
+
"model_calls": 0,
|
| 8 |
+
"gpu_calls": 0,
|
| 9 |
+
"browser_calls": 0,
|
| 10 |
+
"ort_sessions_created": 0,
|
| 11 |
+
"protected_writes": 0,
|
| 12 |
+
"cases_per_build": 20,
|
| 13 |
+
"comparisons": 40,
|
| 14 |
+
"results": [
|
| 15 |
+
{
|
| 16 |
+
"build": "chrome",
|
| 17 |
+
"name": "choice-2",
|
| 18 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 19 |
+
"passed": true,
|
| 20 |
+
"checks": {
|
| 21 |
+
"rendered_options": true,
|
| 22 |
+
"input_ids": true,
|
| 23 |
+
"markers": true,
|
| 24 |
+
"serialized_state": true,
|
| 25 |
+
"temperature": true,
|
| 26 |
+
"public_answer": true,
|
| 27 |
+
"answer_schema": true
|
| 28 |
+
},
|
| 29 |
+
"actual_answer": {
|
| 30 |
+
"type": "choice",
|
| 31 |
+
"confidence": 0.6666666666666666,
|
| 32 |
+
"probabilities": {
|
| 33 |
+
"option_0": 0.3333333333333333,
|
| 34 |
+
"option_1": 0.6666666666666666
|
| 35 |
+
},
|
| 36 |
+
"choice": "option_1"
|
| 37 |
+
},
|
| 38 |
+
"expected_answer": {
|
| 39 |
+
"type": "choice",
|
| 40 |
+
"choice": "option_1",
|
| 41 |
+
"confidence": 0.6666666666666666,
|
| 42 |
+
"probabilities": {
|
| 43 |
+
"option_0": 0.3333333333333333,
|
| 44 |
+
"option_1": 0.6666666666666666
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"answer_contract_error": null,
|
| 48 |
+
"token_count": {
|
| 49 |
+
"actual": 43,
|
| 50 |
+
"expected": 43
|
| 51 |
+
},
|
| 52 |
+
"ids_first_difference": -1,
|
| 53 |
+
"expected_serialized_state": null,
|
| 54 |
+
"actual_serialized_state": null
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"build": "chrome",
|
| 58 |
+
"name": "choice-3",
|
| 59 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 60 |
+
"passed": true,
|
| 61 |
+
"checks": {
|
| 62 |
+
"rendered_options": true,
|
| 63 |
+
"input_ids": true,
|
| 64 |
+
"markers": true,
|
| 65 |
+
"serialized_state": true,
|
| 66 |
+
"temperature": true,
|
| 67 |
+
"public_answer": true,
|
| 68 |
+
"answer_schema": true
|
| 69 |
+
},
|
| 70 |
+
"actual_answer": {
|
| 71 |
+
"type": "choice",
|
| 72 |
+
"confidence": 0.5,
|
| 73 |
+
"probabilities": {
|
| 74 |
+
"option_0": 0.16666666666666666,
|
| 75 |
+
"option_1": 0.3333333333333333,
|
| 76 |
+
"option_2": 0.5
|
| 77 |
+
},
|
| 78 |
+
"choice": "option_2"
|
| 79 |
+
},
|
| 80 |
+
"expected_answer": {
|
| 81 |
+
"type": "choice",
|
| 82 |
+
"choice": "option_2",
|
| 83 |
+
"confidence": 0.5,
|
| 84 |
+
"probabilities": {
|
| 85 |
+
"option_0": 0.16666666666666666,
|
| 86 |
+
"option_1": 0.3333333333333333,
|
| 87 |
+
"option_2": 0.5
|
| 88 |
+
}
|
| 89 |
+
},
|
| 90 |
+
"answer_contract_error": null,
|
| 91 |
+
"token_count": {
|
| 92 |
+
"actual": 54,
|
| 93 |
+
"expected": 54
|
| 94 |
+
},
|
| 95 |
+
"ids_first_difference": -1,
|
| 96 |
+
"expected_serialized_state": null,
|
| 97 |
+
"actual_serialized_state": null
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"build": "chrome",
|
| 101 |
+
"name": "choice-5",
|
| 102 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 103 |
+
"passed": true,
|
| 104 |
+
"checks": {
|
| 105 |
+
"rendered_options": true,
|
| 106 |
+
"input_ids": true,
|
| 107 |
+
"markers": true,
|
| 108 |
+
"serialized_state": true,
|
| 109 |
+
"temperature": true,
|
| 110 |
+
"public_answer": true,
|
| 111 |
+
"answer_schema": true
|
| 112 |
+
},
|
| 113 |
+
"actual_answer": {
|
| 114 |
+
"type": "choice",
|
| 115 |
+
"confidence": 0.3333333333333333,
|
| 116 |
+
"probabilities": {
|
| 117 |
+
"option_0": 0.06666666666666667,
|
| 118 |
+
"option_1": 0.13333333333333333,
|
| 119 |
+
"option_2": 0.2,
|
| 120 |
+
"option_3": 0.26666666666666666,
|
| 121 |
+
"option_4": 0.3333333333333333
|
| 122 |
+
},
|
| 123 |
+
"choice": "option_4"
|
| 124 |
+
},
|
| 125 |
+
"expected_answer": {
|
| 126 |
+
"type": "choice",
|
| 127 |
+
"choice": "option_4",
|
| 128 |
+
"confidence": 0.3333333333333333,
|
| 129 |
+
"probabilities": {
|
| 130 |
+
"option_0": 0.06666666666666667,
|
| 131 |
+
"option_1": 0.13333333333333333,
|
| 132 |
+
"option_2": 0.2,
|
| 133 |
+
"option_3": 0.26666666666666666,
|
| 134 |
+
"option_4": 0.3333333333333333
|
| 135 |
+
}
|
| 136 |
+
},
|
| 137 |
+
"answer_contract_error": null,
|
| 138 |
+
"token_count": {
|
| 139 |
+
"actual": 76,
|
| 140 |
+
"expected": 76
|
| 141 |
+
},
|
| 142 |
+
"ids_first_difference": -1,
|
| 143 |
+
"expected_serialized_state": null,
|
| 144 |
+
"actual_serialized_state": null
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"build": "chrome",
|
| 148 |
+
"name": "choice-11",
|
| 149 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 150 |
+
"passed": true,
|
| 151 |
+
"checks": {
|
| 152 |
+
"rendered_options": true,
|
| 153 |
+
"input_ids": true,
|
| 154 |
+
"markers": true,
|
| 155 |
+
"serialized_state": true,
|
| 156 |
+
"temperature": true,
|
| 157 |
+
"public_answer": true,
|
| 158 |
+
"answer_schema": true
|
| 159 |
+
},
|
| 160 |
+
"actual_answer": {
|
| 161 |
+
"type": "choice",
|
| 162 |
+
"confidence": 0.16666666666666666,
|
| 163 |
+
"probabilities": {
|
| 164 |
+
"option_0": 0.015151515151515152,
|
| 165 |
+
"option_1": 0.030303030303030304,
|
| 166 |
+
"option_2": 0.045454545454545456,
|
| 167 |
+
"option_3": 0.06060606060606061,
|
| 168 |
+
"option_4": 0.07575757575757576,
|
| 169 |
+
"option_5": 0.09090909090909091,
|
| 170 |
+
"option_6": 0.10606060606060606,
|
| 171 |
+
"option_7": 0.12121212121212122,
|
| 172 |
+
"option_8": 0.13636363636363635,
|
| 173 |
+
"option_9": 0.15151515151515152,
|
| 174 |
+
"option_10": 0.16666666666666666
|
| 175 |
+
},
|
| 176 |
+
"choice": "option_10"
|
| 177 |
+
},
|
| 178 |
+
"expected_answer": {
|
| 179 |
+
"type": "choice",
|
| 180 |
+
"choice": "option_10",
|
| 181 |
+
"confidence": 0.16666666666666666,
|
| 182 |
+
"probabilities": {
|
| 183 |
+
"option_0": 0.015151515151515152,
|
| 184 |
+
"option_1": 0.030303030303030304,
|
| 185 |
+
"option_2": 0.045454545454545456,
|
| 186 |
+
"option_3": 0.06060606060606061,
|
| 187 |
+
"option_4": 0.07575757575757576,
|
| 188 |
+
"option_5": 0.09090909090909091,
|
| 189 |
+
"option_6": 0.10606060606060606,
|
| 190 |
+
"option_7": 0.12121212121212122,
|
| 191 |
+
"option_8": 0.13636363636363635,
|
| 192 |
+
"option_9": 0.15151515151515152,
|
| 193 |
+
"option_10": 0.16666666666666666
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
"answer_contract_error": null,
|
| 197 |
+
"token_count": {
|
| 198 |
+
"actual": 142,
|
| 199 |
+
"expected": 142
|
| 200 |
+
},
|
| 201 |
+
"ids_first_difference": -1,
|
| 202 |
+
"expected_serialized_state": null,
|
| 203 |
+
"actual_serialized_state": null
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"build": "chrome",
|
| 207 |
+
"name": "score-2",
|
| 208 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 209 |
+
"passed": true,
|
| 210 |
+
"checks": {
|
| 211 |
+
"rendered_options": true,
|
| 212 |
+
"input_ids": true,
|
| 213 |
+
"markers": true,
|
| 214 |
+
"serialized_state": true,
|
| 215 |
+
"temperature": true,
|
| 216 |
+
"public_answer": true,
|
| 217 |
+
"answer_schema": true
|
| 218 |
+
},
|
| 219 |
+
"actual_answer": {
|
| 220 |
+
"type": "score",
|
| 221 |
+
"confidence": 0.6666666666666666,
|
| 222 |
+
"probabilities": {
|
| 223 |
+
"0": 0.3333333333333333,
|
| 224 |
+
"1": 0.6666666666666666
|
| 225 |
+
},
|
| 226 |
+
"score": 0.6666666666666666,
|
| 227 |
+
"legend": {
|
| 228 |
+
"0": "Evidence level 0",
|
| 229 |
+
"1": "Evidence level 1"
|
| 230 |
+
}
|
| 231 |
+
},
|
| 232 |
+
"expected_answer": {
|
| 233 |
+
"type": "score",
|
| 234 |
+
"score": 0.6666666666666666,
|
| 235 |
+
"confidence": 0.6666666666666666,
|
| 236 |
+
"probabilities": {
|
| 237 |
+
"0": 0.3333333333333333,
|
| 238 |
+
"1": 0.6666666666666666
|
| 239 |
+
},
|
| 240 |
+
"legend": {
|
| 241 |
+
"0": "Evidence level 0",
|
| 242 |
+
"1": "Evidence level 1"
|
| 243 |
+
}
|
| 244 |
+
},
|
| 245 |
+
"answer_contract_error": null,
|
| 246 |
+
"token_count": {
|
| 247 |
+
"actual": 32,
|
| 248 |
+
"expected": 32
|
| 249 |
+
},
|
| 250 |
+
"ids_first_difference": -1,
|
| 251 |
+
"expected_serialized_state": null,
|
| 252 |
+
"actual_serialized_state": null
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"build": "chrome",
|
| 256 |
+
"name": "score-3",
|
| 257 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 258 |
+
"passed": true,
|
| 259 |
+
"checks": {
|
| 260 |
+
"rendered_options": true,
|
| 261 |
+
"input_ids": true,
|
| 262 |
+
"markers": true,
|
| 263 |
+
"serialized_state": true,
|
| 264 |
+
"temperature": true,
|
| 265 |
+
"public_answer": true,
|
| 266 |
+
"answer_schema": true
|
| 267 |
+
},
|
| 268 |
+
"actual_answer": {
|
| 269 |
+
"type": "score",
|
| 270 |
+
"confidence": 0.5,
|
| 271 |
+
"probabilities": {
|
| 272 |
+
"0": 0.16666666666666666,
|
| 273 |
+
"1": 0.3333333333333333,
|
| 274 |
+
"2": 0.5
|
| 275 |
+
},
|
| 276 |
+
"score": 1.3333333333333333,
|
| 277 |
+
"legend": {
|
| 278 |
+
"0": "Evidence level 0",
|
| 279 |
+
"1": "Evidence level 1",
|
| 280 |
+
"2": "Evidence level 2"
|
| 281 |
+
}
|
| 282 |
+
},
|
| 283 |
+
"expected_answer": {
|
| 284 |
+
"type": "score",
|
| 285 |
+
"score": 1.3333333333333333,
|
| 286 |
+
"confidence": 0.5,
|
| 287 |
+
"probabilities": {
|
| 288 |
+
"0": 0.16666666666666666,
|
| 289 |
+
"1": 0.3333333333333333,
|
| 290 |
+
"2": 0.5
|
| 291 |
+
},
|
| 292 |
+
"legend": {
|
| 293 |
+
"0": "Evidence level 0",
|
| 294 |
+
"1": "Evidence level 1",
|
| 295 |
+
"2": "Evidence level 2"
|
| 296 |
+
}
|
| 297 |
+
},
|
| 298 |
+
"answer_contract_error": null,
|
| 299 |
+
"token_count": {
|
| 300 |
+
"actual": 43,
|
| 301 |
+
"expected": 43
|
| 302 |
+
},
|
| 303 |
+
"ids_first_difference": -1,
|
| 304 |
+
"expected_serialized_state": null,
|
| 305 |
+
"actual_serialized_state": null
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"build": "chrome",
|
| 309 |
+
"name": "score-5",
|
| 310 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 311 |
+
"passed": true,
|
| 312 |
+
"checks": {
|
| 313 |
+
"rendered_options": true,
|
| 314 |
+
"input_ids": true,
|
| 315 |
+
"markers": true,
|
| 316 |
+
"serialized_state": true,
|
| 317 |
+
"temperature": true,
|
| 318 |
+
"public_answer": true,
|
| 319 |
+
"answer_schema": true
|
| 320 |
+
},
|
| 321 |
+
"actual_answer": {
|
| 322 |
+
"type": "score",
|
| 323 |
+
"confidence": 0.3333333333333333,
|
| 324 |
+
"probabilities": {
|
| 325 |
+
"0": 0.06666666666666667,
|
| 326 |
+
"1": 0.13333333333333333,
|
| 327 |
+
"2": 0.2,
|
| 328 |
+
"3": 0.26666666666666666,
|
| 329 |
+
"4": 0.3333333333333333
|
| 330 |
+
},
|
| 331 |
+
"score": 2.666666666666667,
|
| 332 |
+
"legend": {
|
| 333 |
+
"0": "Evidence level 0",
|
| 334 |
+
"1": "Evidence level 1",
|
| 335 |
+
"2": "Evidence level 2",
|
| 336 |
+
"3": "Evidence level 3",
|
| 337 |
+
"4": "Evidence level 4"
|
| 338 |
+
}
|
| 339 |
+
},
|
| 340 |
+
"expected_answer": {
|
| 341 |
+
"type": "score",
|
| 342 |
+
"score": 2.666666666666667,
|
| 343 |
+
"confidence": 0.3333333333333333,
|
| 344 |
+
"probabilities": {
|
| 345 |
+
"0": 0.06666666666666667,
|
| 346 |
+
"1": 0.13333333333333333,
|
| 347 |
+
"2": 0.2,
|
| 348 |
+
"3": 0.26666666666666666,
|
| 349 |
+
"4": 0.3333333333333333
|
| 350 |
+
},
|
| 351 |
+
"legend": {
|
| 352 |
+
"0": "Evidence level 0",
|
| 353 |
+
"1": "Evidence level 1",
|
| 354 |
+
"2": "Evidence level 2",
|
| 355 |
+
"3": "Evidence level 3",
|
| 356 |
+
"4": "Evidence level 4"
|
| 357 |
+
}
|
| 358 |
+
},
|
| 359 |
+
"answer_contract_error": null,
|
| 360 |
+
"token_count": {
|
| 361 |
+
"actual": 65,
|
| 362 |
+
"expected": 65
|
| 363 |
+
},
|
| 364 |
+
"ids_first_difference": -1,
|
| 365 |
+
"expected_serialized_state": null,
|
| 366 |
+
"actual_serialized_state": null
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"build": "chrome",
|
| 370 |
+
"name": "score-10",
|
| 371 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 372 |
+
"passed": true,
|
| 373 |
+
"checks": {
|
| 374 |
+
"rendered_options": true,
|
| 375 |
+
"input_ids": true,
|
| 376 |
+
"markers": true,
|
| 377 |
+
"serialized_state": true,
|
| 378 |
+
"temperature": true,
|
| 379 |
+
"public_answer": true,
|
| 380 |
+
"answer_schema": true
|
| 381 |
+
},
|
| 382 |
+
"actual_answer": {
|
| 383 |
+
"type": "score",
|
| 384 |
+
"confidence": 0.18181818181818182,
|
| 385 |
+
"probabilities": {
|
| 386 |
+
"0": 0.01818181818181818,
|
| 387 |
+
"1": 0.03636363636363636,
|
| 388 |
+
"2": 0.05454545454545454,
|
| 389 |
+
"3": 0.07272727272727272,
|
| 390 |
+
"4": 0.09090909090909091,
|
| 391 |
+
"5": 0.10909090909090909,
|
| 392 |
+
"6": 0.12727272727272726,
|
| 393 |
+
"7": 0.14545454545454545,
|
| 394 |
+
"8": 0.16363636363636364,
|
| 395 |
+
"9": 0.18181818181818182
|
| 396 |
+
},
|
| 397 |
+
"score": 6,
|
| 398 |
+
"legend": {
|
| 399 |
+
"0": "Evidence level 0",
|
| 400 |
+
"1": "Evidence level 1",
|
| 401 |
+
"2": "Evidence level 2",
|
| 402 |
+
"3": "Evidence level 3",
|
| 403 |
+
"4": "Evidence level 4",
|
| 404 |
+
"5": "Evidence level 5",
|
| 405 |
+
"6": "Evidence level 6",
|
| 406 |
+
"7": "Evidence level 7",
|
| 407 |
+
"8": "Evidence level 8",
|
| 408 |
+
"9": "Evidence level 9"
|
| 409 |
+
}
|
| 410 |
+
},
|
| 411 |
+
"expected_answer": {
|
| 412 |
+
"type": "score",
|
| 413 |
+
"score": 6,
|
| 414 |
+
"confidence": 0.18181818181818182,
|
| 415 |
+
"probabilities": {
|
| 416 |
+
"0": 0.01818181818181818,
|
| 417 |
+
"1": 0.03636363636363636,
|
| 418 |
+
"2": 0.05454545454545454,
|
| 419 |
+
"3": 0.07272727272727272,
|
| 420 |
+
"4": 0.09090909090909091,
|
| 421 |
+
"5": 0.10909090909090909,
|
| 422 |
+
"6": 0.12727272727272726,
|
| 423 |
+
"7": 0.14545454545454545,
|
| 424 |
+
"8": 0.16363636363636364,
|
| 425 |
+
"9": 0.18181818181818182
|
| 426 |
+
},
|
| 427 |
+
"legend": {
|
| 428 |
+
"0": "Evidence level 0",
|
| 429 |
+
"1": "Evidence level 1",
|
| 430 |
+
"2": "Evidence level 2",
|
| 431 |
+
"3": "Evidence level 3",
|
| 432 |
+
"4": "Evidence level 4",
|
| 433 |
+
"5": "Evidence level 5",
|
| 434 |
+
"6": "Evidence level 6",
|
| 435 |
+
"7": "Evidence level 7",
|
| 436 |
+
"8": "Evidence level 8",
|
| 437 |
+
"9": "Evidence level 9"
|
| 438 |
+
}
|
| 439 |
+
},
|
| 440 |
+
"answer_contract_error": null,
|
| 441 |
+
"token_count": {
|
| 442 |
+
"actual": 120,
|
| 443 |
+
"expected": 120
|
| 444 |
+
},
|
| 445 |
+
"ids_first_difference": -1,
|
| 446 |
+
"expected_serialized_state": null,
|
| 447 |
+
"actual_serialized_state": null
|
| 448 |
+
},
|
| 449 |
+
{
|
| 450 |
+
"build": "chrome",
|
| 451 |
+
"name": "noul-False-8",
|
| 452 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 453 |
+
"passed": true,
|
| 454 |
+
"checks": {
|
| 455 |
+
"rendered_options": true,
|
| 456 |
+
"input_ids": true,
|
| 457 |
+
"markers": true,
|
| 458 |
+
"serialized_state": true,
|
| 459 |
+
"temperature": true,
|
| 460 |
+
"public_answer": true,
|
| 461 |
+
"answer_schema": true
|
| 462 |
+
},
|
| 463 |
+
"actual_answer": {
|
| 464 |
+
"type": "noul",
|
| 465 |
+
"noul": 0.6666666666666666
|
| 466 |
+
},
|
| 467 |
+
"expected_answer": {
|
| 468 |
+
"type": "noul",
|
| 469 |
+
"noul": 0.6666666666666666
|
| 470 |
+
},
|
| 471 |
+
"answer_contract_error": null,
|
| 472 |
+
"token_count": {
|
| 473 |
+
"actual": 35,
|
| 474 |
+
"expected": 35
|
| 475 |
+
},
|
| 476 |
+
"ids_first_difference": -1,
|
| 477 |
+
"expected_serialized_state": null,
|
| 478 |
+
"actual_serialized_state": null
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"build": "chrome",
|
| 482 |
+
"name": "noul-False-9",
|
| 483 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 484 |
+
"passed": true,
|
| 485 |
+
"checks": {
|
| 486 |
+
"rendered_options": true,
|
| 487 |
+
"input_ids": true,
|
| 488 |
+
"markers": true,
|
| 489 |
+
"serialized_state": true,
|
| 490 |
+
"temperature": true,
|
| 491 |
+
"public_answer": true,
|
| 492 |
+
"answer_schema": true
|
| 493 |
+
},
|
| 494 |
+
"actual_answer": {
|
| 495 |
+
"type": "noul",
|
| 496 |
+
"noul": 0.6666666666666666
|
| 497 |
+
},
|
| 498 |
+
"expected_answer": {
|
| 499 |
+
"type": "noul",
|
| 500 |
+
"noul": 0.6666666666666666
|
| 501 |
+
},
|
| 502 |
+
"answer_contract_error": null,
|
| 503 |
+
"token_count": {
|
| 504 |
+
"actual": 27,
|
| 505 |
+
"expected": 27
|
| 506 |
+
},
|
| 507 |
+
"ids_first_difference": -1,
|
| 508 |
+
"expected_serialized_state": null,
|
| 509 |
+
"actual_serialized_state": null
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"build": "chrome",
|
| 513 |
+
"name": "noul-False-10",
|
| 514 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 515 |
+
"passed": true,
|
| 516 |
+
"checks": {
|
| 517 |
+
"rendered_options": true,
|
| 518 |
+
"input_ids": true,
|
| 519 |
+
"markers": true,
|
| 520 |
+
"serialized_state": true,
|
| 521 |
+
"temperature": true,
|
| 522 |
+
"public_answer": true,
|
| 523 |
+
"answer_schema": true
|
| 524 |
+
},
|
| 525 |
+
"actual_answer": {
|
| 526 |
+
"type": "noul",
|
| 527 |
+
"noul": 0.6666666666666666
|
| 528 |
+
},
|
| 529 |
+
"expected_answer": {
|
| 530 |
+
"type": "noul",
|
| 531 |
+
"noul": 0.6666666666666666
|
| 532 |
+
},
|
| 533 |
+
"answer_contract_error": null,
|
| 534 |
+
"token_count": {
|
| 535 |
+
"actual": 26,
|
| 536 |
+
"expected": 26
|
| 537 |
+
},
|
| 538 |
+
"ids_first_difference": -1,
|
| 539 |
+
"expected_serialized_state": null,
|
| 540 |
+
"actual_serialized_state": null
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"build": "chrome",
|
| 544 |
+
"name": "noul-False-11",
|
| 545 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 546 |
+
"passed": true,
|
| 547 |
+
"checks": {
|
| 548 |
+
"rendered_options": true,
|
| 549 |
+
"input_ids": true,
|
| 550 |
+
"markers": true,
|
| 551 |
+
"serialized_state": true,
|
| 552 |
+
"temperature": true,
|
| 553 |
+
"public_answer": true,
|
| 554 |
+
"answer_schema": true
|
| 555 |
+
},
|
| 556 |
+
"actual_answer": {
|
| 557 |
+
"type": "noul",
|
| 558 |
+
"noul": 0.6666666666666666
|
| 559 |
+
},
|
| 560 |
+
"expected_answer": {
|
| 561 |
+
"type": "noul",
|
| 562 |
+
"noul": 0.6666666666666666
|
| 563 |
+
},
|
| 564 |
+
"answer_contract_error": null,
|
| 565 |
+
"token_count": {
|
| 566 |
+
"actual": 35,
|
| 567 |
+
"expected": 35
|
| 568 |
+
},
|
| 569 |
+
"ids_first_difference": -1,
|
| 570 |
+
"expected_serialized_state": null,
|
| 571 |
+
"actual_serialized_state": null
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"build": "chrome",
|
| 575 |
+
"name": "noul-True-12",
|
| 576 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 577 |
+
"passed": true,
|
| 578 |
+
"checks": {
|
| 579 |
+
"rendered_options": true,
|
| 580 |
+
"input_ids": true,
|
| 581 |
+
"markers": true,
|
| 582 |
+
"serialized_state": true,
|
| 583 |
+
"temperature": true,
|
| 584 |
+
"public_answer": true,
|
| 585 |
+
"answer_schema": true
|
| 586 |
+
},
|
| 587 |
+
"actual_answer": {
|
| 588 |
+
"type": "noul",
|
| 589 |
+
"noul": 0.6666666666666666
|
| 590 |
+
},
|
| 591 |
+
"expected_answer": {
|
| 592 |
+
"type": "noul",
|
| 593 |
+
"noul": 0.6666666666666666
|
| 594 |
+
},
|
| 595 |
+
"answer_contract_error": null,
|
| 596 |
+
"token_count": {
|
| 597 |
+
"actual": 25,
|
| 598 |
+
"expected": 25
|
| 599 |
+
},
|
| 600 |
+
"ids_first_difference": -1,
|
| 601 |
+
"expected_serialized_state": null,
|
| 602 |
+
"actual_serialized_state": null
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"build": "chrome",
|
| 606 |
+
"name": "noul-True-13",
|
| 607 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 608 |
+
"passed": true,
|
| 609 |
+
"checks": {
|
| 610 |
+
"rendered_options": true,
|
| 611 |
+
"input_ids": true,
|
| 612 |
+
"markers": true,
|
| 613 |
+
"serialized_state": true,
|
| 614 |
+
"temperature": true,
|
| 615 |
+
"public_answer": true,
|
| 616 |
+
"answer_schema": true
|
| 617 |
+
},
|
| 618 |
+
"actual_answer": {
|
| 619 |
+
"type": "noul",
|
| 620 |
+
"noul": 0.6666666666666666
|
| 621 |
+
},
|
| 622 |
+
"expected_answer": {
|
| 623 |
+
"type": "noul",
|
| 624 |
+
"noul": 0.6666666666666666
|
| 625 |
+
},
|
| 626 |
+
"answer_contract_error": null,
|
| 627 |
+
"token_count": {
|
| 628 |
+
"actual": 27,
|
| 629 |
+
"expected": 27
|
| 630 |
+
},
|
| 631 |
+
"ids_first_difference": -1,
|
| 632 |
+
"expected_serialized_state": null,
|
| 633 |
+
"actual_serialized_state": null
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"build": "chrome",
|
| 637 |
+
"name": "noul-True-14",
|
| 638 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 639 |
+
"passed": true,
|
| 640 |
+
"checks": {
|
| 641 |
+
"rendered_options": true,
|
| 642 |
+
"input_ids": true,
|
| 643 |
+
"markers": true,
|
| 644 |
+
"serialized_state": true,
|
| 645 |
+
"temperature": true,
|
| 646 |
+
"public_answer": true,
|
| 647 |
+
"answer_schema": true
|
| 648 |
+
},
|
| 649 |
+
"actual_answer": {
|
| 650 |
+
"type": "noul",
|
| 651 |
+
"noul": 0.6666666666666666
|
| 652 |
+
},
|
| 653 |
+
"expected_answer": {
|
| 654 |
+
"type": "noul",
|
| 655 |
+
"noul": 0.6666666666666666
|
| 656 |
+
},
|
| 657 |
+
"answer_contract_error": null,
|
| 658 |
+
"token_count": {
|
| 659 |
+
"actual": 26,
|
| 660 |
+
"expected": 26
|
| 661 |
+
},
|
| 662 |
+
"ids_first_difference": -1,
|
| 663 |
+
"expected_serialized_state": null,
|
| 664 |
+
"actual_serialized_state": null
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"build": "chrome",
|
| 668 |
+
"name": "noul-True-15",
|
| 669 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 670 |
+
"passed": true,
|
| 671 |
+
"checks": {
|
| 672 |
+
"rendered_options": true,
|
| 673 |
+
"input_ids": true,
|
| 674 |
+
"markers": true,
|
| 675 |
+
"serialized_state": true,
|
| 676 |
+
"temperature": true,
|
| 677 |
+
"public_answer": true,
|
| 678 |
+
"answer_schema": true
|
| 679 |
+
},
|
| 680 |
+
"actual_answer": {
|
| 681 |
+
"type": "noul",
|
| 682 |
+
"noul": 0.6666666666666666
|
| 683 |
+
},
|
| 684 |
+
"expected_answer": {
|
| 685 |
+
"type": "noul",
|
| 686 |
+
"noul": 0.6666666666666666
|
| 687 |
+
},
|
| 688 |
+
"answer_contract_error": null,
|
| 689 |
+
"token_count": {
|
| 690 |
+
"actual": 35,
|
| 691 |
+
"expected": 35
|
| 692 |
+
},
|
| 693 |
+
"ids_first_difference": -1,
|
| 694 |
+
"expected_serialized_state": null,
|
| 695 |
+
"actual_serialized_state": null
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"build": "chrome",
|
| 699 |
+
"name": "structured-score-legend",
|
| 700 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 701 |
+
"passed": true,
|
| 702 |
+
"checks": {
|
| 703 |
+
"rendered_options": true,
|
| 704 |
+
"input_ids": true,
|
| 705 |
+
"markers": true,
|
| 706 |
+
"serialized_state": true,
|
| 707 |
+
"temperature": true,
|
| 708 |
+
"public_answer": true,
|
| 709 |
+
"answer_schema": true
|
| 710 |
+
},
|
| 711 |
+
"actual_answer": {
|
| 712 |
+
"type": "score",
|
| 713 |
+
"confidence": 0.6666666666666666,
|
| 714 |
+
"probabilities": {
|
| 715 |
+
"0": 0.3333333333333333,
|
| 716 |
+
"1": 0.6666666666666666
|
| 717 |
+
},
|
| 718 |
+
"score": 0.6666666666666666,
|
| 719 |
+
"legend": {
|
| 720 |
+
"0": "{\"evidence\": \"absent\", \"count\": 0}",
|
| 721 |
+
"1": "{\"evidence\": \"present\", \"count\": 1}"
|
| 722 |
+
}
|
| 723 |
+
},
|
| 724 |
+
"expected_answer": {
|
| 725 |
+
"type": "score",
|
| 726 |
+
"score": 0.6666666666666666,
|
| 727 |
+
"confidence": 0.6666666666666666,
|
| 728 |
+
"probabilities": {
|
| 729 |
+
"0": 0.3333333333333333,
|
| 730 |
+
"1": 0.6666666666666666
|
| 731 |
+
},
|
| 732 |
+
"legend": {
|
| 733 |
+
"0": "{\"evidence\": \"absent\", \"count\": 0}",
|
| 734 |
+
"1": "{\"evidence\": \"present\", \"count\": 1}"
|
| 735 |
+
}
|
| 736 |
+
},
|
| 737 |
+
"answer_contract_error": null,
|
| 738 |
+
"token_count": {
|
| 739 |
+
"actual": 49,
|
| 740 |
+
"expected": 49
|
| 741 |
+
},
|
| 742 |
+
"ids_first_difference": -1,
|
| 743 |
+
"expected_serialized_state": null,
|
| 744 |
+
"actual_serialized_state": null
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"build": "chrome",
|
| 748 |
+
"name": "escaped-markers-unicode",
|
| 749 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 750 |
+
"passed": true,
|
| 751 |
+
"checks": {
|
| 752 |
+
"rendered_options": true,
|
| 753 |
+
"input_ids": true,
|
| 754 |
+
"markers": true,
|
| 755 |
+
"serialized_state": true,
|
| 756 |
+
"temperature": true,
|
| 757 |
+
"public_answer": true,
|
| 758 |
+
"answer_schema": true
|
| 759 |
+
},
|
| 760 |
+
"actual_answer": {
|
| 761 |
+
"type": "choice",
|
| 762 |
+
"confidence": 0.6666666666666666,
|
| 763 |
+
"probabilities": {
|
| 764 |
+
"red": 0.3333333333333333,
|
| 765 |
+
"green": 0.6666666666666666
|
| 766 |
+
},
|
| 767 |
+
"choice": "green"
|
| 768 |
+
},
|
| 769 |
+
"expected_answer": {
|
| 770 |
+
"type": "choice",
|
| 771 |
+
"choice": "green",
|
| 772 |
+
"confidence": 0.6666666666666666,
|
| 773 |
+
"probabilities": {
|
| 774 |
+
"red": 0.3333333333333333,
|
| 775 |
+
"green": 0.6666666666666666
|
| 776 |
+
}
|
| 777 |
+
},
|
| 778 |
+
"answer_contract_error": null,
|
| 779 |
+
"token_count": {
|
| 780 |
+
"actual": 53,
|
| 781 |
+
"expected": 53
|
| 782 |
+
},
|
| 783 |
+
"ids_first_difference": -1,
|
| 784 |
+
"expected_serialized_state": null,
|
| 785 |
+
"actual_serialized_state": null
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"build": "chrome",
|
| 789 |
+
"name": "long-state-truncation",
|
| 790 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 791 |
+
"passed": true,
|
| 792 |
+
"checks": {
|
| 793 |
+
"rendered_options": true,
|
| 794 |
+
"input_ids": true,
|
| 795 |
+
"markers": true,
|
| 796 |
+
"serialized_state": true,
|
| 797 |
+
"temperature": true,
|
| 798 |
+
"public_answer": true,
|
| 799 |
+
"answer_schema": true
|
| 800 |
+
},
|
| 801 |
+
"actual_answer": {
|
| 802 |
+
"type": "choice",
|
| 803 |
+
"confidence": 0.6666666666666666,
|
| 804 |
+
"probabilities": {
|
| 805 |
+
"a": 0.3333333333333333,
|
| 806 |
+
"b": 0.6666666666666666
|
| 807 |
+
},
|
| 808 |
+
"choice": "b"
|
| 809 |
+
},
|
| 810 |
+
"expected_answer": {
|
| 811 |
+
"type": "choice",
|
| 812 |
+
"choice": "b",
|
| 813 |
+
"confidence": 0.6666666666666666,
|
| 814 |
+
"probabilities": {
|
| 815 |
+
"a": 0.3333333333333333,
|
| 816 |
+
"b": 0.6666666666666666
|
| 817 |
+
}
|
| 818 |
+
},
|
| 819 |
+
"answer_contract_error": null,
|
| 820 |
+
"token_count": {
|
| 821 |
+
"actual": 896,
|
| 822 |
+
"expected": 896
|
| 823 |
+
},
|
| 824 |
+
"ids_first_difference": -1,
|
| 825 |
+
"expected_serialized_state": null,
|
| 826 |
+
"actual_serialized_state": null
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"build": "chrome",
|
| 830 |
+
"name": "structured-numeric-state",
|
| 831 |
+
"scope": "serializer_numeric_edge",
|
| 832 |
+
"passed": true,
|
| 833 |
+
"checks": {
|
| 834 |
+
"rendered_options": true,
|
| 835 |
+
"input_ids": true,
|
| 836 |
+
"markers": true,
|
| 837 |
+
"serialized_state": true,
|
| 838 |
+
"temperature": true,
|
| 839 |
+
"public_answer": true,
|
| 840 |
+
"answer_schema": true
|
| 841 |
+
},
|
| 842 |
+
"actual_answer": {
|
| 843 |
+
"type": "choice",
|
| 844 |
+
"confidence": 0.6666666666666666,
|
| 845 |
+
"probabilities": {
|
| 846 |
+
"a": 0.3333333333333333,
|
| 847 |
+
"b": 0.6666666666666666
|
| 848 |
+
},
|
| 849 |
+
"choice": "b"
|
| 850 |
+
},
|
| 851 |
+
"expected_answer": {
|
| 852 |
+
"type": "choice",
|
| 853 |
+
"choice": "b",
|
| 854 |
+
"confidence": 0.6666666666666666,
|
| 855 |
+
"probabilities": {
|
| 856 |
+
"a": 0.3333333333333333,
|
| 857 |
+
"b": 0.6666666666666666
|
| 858 |
+
}
|
| 859 |
+
},
|
| 860 |
+
"answer_contract_error": null,
|
| 861 |
+
"token_count": {
|
| 862 |
+
"actual": 39,
|
| 863 |
+
"expected": 39
|
| 864 |
+
},
|
| 865 |
+
"ids_first_difference": -1,
|
| 866 |
+
"expected_serialized_state": "{\"small\": 1e-07, \"decimal\": 1e-05}",
|
| 867 |
+
"actual_serialized_state": "{\"small\": 1e-07, \"decimal\": 1e-05}"
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"build": "firefox",
|
| 871 |
+
"name": "choice-2",
|
| 872 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 873 |
+
"passed": true,
|
| 874 |
+
"checks": {
|
| 875 |
+
"rendered_options": true,
|
| 876 |
+
"input_ids": true,
|
| 877 |
+
"markers": true,
|
| 878 |
+
"serialized_state": true,
|
| 879 |
+
"temperature": true,
|
| 880 |
+
"public_answer": true,
|
| 881 |
+
"answer_schema": true
|
| 882 |
+
},
|
| 883 |
+
"actual_answer": {
|
| 884 |
+
"type": "choice",
|
| 885 |
+
"confidence": 0.6666666666666666,
|
| 886 |
+
"probabilities": {
|
| 887 |
+
"option_0": 0.3333333333333333,
|
| 888 |
+
"option_1": 0.6666666666666666
|
| 889 |
+
},
|
| 890 |
+
"choice": "option_1"
|
| 891 |
+
},
|
| 892 |
+
"expected_answer": {
|
| 893 |
+
"type": "choice",
|
| 894 |
+
"choice": "option_1",
|
| 895 |
+
"confidence": 0.6666666666666666,
|
| 896 |
+
"probabilities": {
|
| 897 |
+
"option_0": 0.3333333333333333,
|
| 898 |
+
"option_1": 0.6666666666666666
|
| 899 |
+
}
|
| 900 |
+
},
|
| 901 |
+
"answer_contract_error": null,
|
| 902 |
+
"token_count": {
|
| 903 |
+
"actual": 43,
|
| 904 |
+
"expected": 43
|
| 905 |
+
},
|
| 906 |
+
"ids_first_difference": -1,
|
| 907 |
+
"expected_serialized_state": null,
|
| 908 |
+
"actual_serialized_state": null
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"build": "firefox",
|
| 912 |
+
"name": "choice-3",
|
| 913 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 914 |
+
"passed": true,
|
| 915 |
+
"checks": {
|
| 916 |
+
"rendered_options": true,
|
| 917 |
+
"input_ids": true,
|
| 918 |
+
"markers": true,
|
| 919 |
+
"serialized_state": true,
|
| 920 |
+
"temperature": true,
|
| 921 |
+
"public_answer": true,
|
| 922 |
+
"answer_schema": true
|
| 923 |
+
},
|
| 924 |
+
"actual_answer": {
|
| 925 |
+
"type": "choice",
|
| 926 |
+
"confidence": 0.5,
|
| 927 |
+
"probabilities": {
|
| 928 |
+
"option_0": 0.16666666666666666,
|
| 929 |
+
"option_1": 0.3333333333333333,
|
| 930 |
+
"option_2": 0.5
|
| 931 |
+
},
|
| 932 |
+
"choice": "option_2"
|
| 933 |
+
},
|
| 934 |
+
"expected_answer": {
|
| 935 |
+
"type": "choice",
|
| 936 |
+
"choice": "option_2",
|
| 937 |
+
"confidence": 0.5,
|
| 938 |
+
"probabilities": {
|
| 939 |
+
"option_0": 0.16666666666666666,
|
| 940 |
+
"option_1": 0.3333333333333333,
|
| 941 |
+
"option_2": 0.5
|
| 942 |
+
}
|
| 943 |
+
},
|
| 944 |
+
"answer_contract_error": null,
|
| 945 |
+
"token_count": {
|
| 946 |
+
"actual": 54,
|
| 947 |
+
"expected": 54
|
| 948 |
+
},
|
| 949 |
+
"ids_first_difference": -1,
|
| 950 |
+
"expected_serialized_state": null,
|
| 951 |
+
"actual_serialized_state": null
|
| 952 |
+
},
|
| 953 |
+
{
|
| 954 |
+
"build": "firefox",
|
| 955 |
+
"name": "choice-5",
|
| 956 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 957 |
+
"passed": true,
|
| 958 |
+
"checks": {
|
| 959 |
+
"rendered_options": true,
|
| 960 |
+
"input_ids": true,
|
| 961 |
+
"markers": true,
|
| 962 |
+
"serialized_state": true,
|
| 963 |
+
"temperature": true,
|
| 964 |
+
"public_answer": true,
|
| 965 |
+
"answer_schema": true
|
| 966 |
+
},
|
| 967 |
+
"actual_answer": {
|
| 968 |
+
"type": "choice",
|
| 969 |
+
"confidence": 0.3333333333333333,
|
| 970 |
+
"probabilities": {
|
| 971 |
+
"option_0": 0.06666666666666667,
|
| 972 |
+
"option_1": 0.13333333333333333,
|
| 973 |
+
"option_2": 0.2,
|
| 974 |
+
"option_3": 0.26666666666666666,
|
| 975 |
+
"option_4": 0.3333333333333333
|
| 976 |
+
},
|
| 977 |
+
"choice": "option_4"
|
| 978 |
+
},
|
| 979 |
+
"expected_answer": {
|
| 980 |
+
"type": "choice",
|
| 981 |
+
"choice": "option_4",
|
| 982 |
+
"confidence": 0.3333333333333333,
|
| 983 |
+
"probabilities": {
|
| 984 |
+
"option_0": 0.06666666666666667,
|
| 985 |
+
"option_1": 0.13333333333333333,
|
| 986 |
+
"option_2": 0.2,
|
| 987 |
+
"option_3": 0.26666666666666666,
|
| 988 |
+
"option_4": 0.3333333333333333
|
| 989 |
+
}
|
| 990 |
+
},
|
| 991 |
+
"answer_contract_error": null,
|
| 992 |
+
"token_count": {
|
| 993 |
+
"actual": 76,
|
| 994 |
+
"expected": 76
|
| 995 |
+
},
|
| 996 |
+
"ids_first_difference": -1,
|
| 997 |
+
"expected_serialized_state": null,
|
| 998 |
+
"actual_serialized_state": null
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"build": "firefox",
|
| 1002 |
+
"name": "choice-11",
|
| 1003 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1004 |
+
"passed": true,
|
| 1005 |
+
"checks": {
|
| 1006 |
+
"rendered_options": true,
|
| 1007 |
+
"input_ids": true,
|
| 1008 |
+
"markers": true,
|
| 1009 |
+
"serialized_state": true,
|
| 1010 |
+
"temperature": true,
|
| 1011 |
+
"public_answer": true,
|
| 1012 |
+
"answer_schema": true
|
| 1013 |
+
},
|
| 1014 |
+
"actual_answer": {
|
| 1015 |
+
"type": "choice",
|
| 1016 |
+
"confidence": 0.16666666666666666,
|
| 1017 |
+
"probabilities": {
|
| 1018 |
+
"option_0": 0.015151515151515152,
|
| 1019 |
+
"option_1": 0.030303030303030304,
|
| 1020 |
+
"option_2": 0.045454545454545456,
|
| 1021 |
+
"option_3": 0.06060606060606061,
|
| 1022 |
+
"option_4": 0.07575757575757576,
|
| 1023 |
+
"option_5": 0.09090909090909091,
|
| 1024 |
+
"option_6": 0.10606060606060606,
|
| 1025 |
+
"option_7": 0.12121212121212122,
|
| 1026 |
+
"option_8": 0.13636363636363635,
|
| 1027 |
+
"option_9": 0.15151515151515152,
|
| 1028 |
+
"option_10": 0.16666666666666666
|
| 1029 |
+
},
|
| 1030 |
+
"choice": "option_10"
|
| 1031 |
+
},
|
| 1032 |
+
"expected_answer": {
|
| 1033 |
+
"type": "choice",
|
| 1034 |
+
"choice": "option_10",
|
| 1035 |
+
"confidence": 0.16666666666666666,
|
| 1036 |
+
"probabilities": {
|
| 1037 |
+
"option_0": 0.015151515151515152,
|
| 1038 |
+
"option_1": 0.030303030303030304,
|
| 1039 |
+
"option_2": 0.045454545454545456,
|
| 1040 |
+
"option_3": 0.06060606060606061,
|
| 1041 |
+
"option_4": 0.07575757575757576,
|
| 1042 |
+
"option_5": 0.09090909090909091,
|
| 1043 |
+
"option_6": 0.10606060606060606,
|
| 1044 |
+
"option_7": 0.12121212121212122,
|
| 1045 |
+
"option_8": 0.13636363636363635,
|
| 1046 |
+
"option_9": 0.15151515151515152,
|
| 1047 |
+
"option_10": 0.16666666666666666
|
| 1048 |
+
}
|
| 1049 |
+
},
|
| 1050 |
+
"answer_contract_error": null,
|
| 1051 |
+
"token_count": {
|
| 1052 |
+
"actual": 142,
|
| 1053 |
+
"expected": 142
|
| 1054 |
+
},
|
| 1055 |
+
"ids_first_difference": -1,
|
| 1056 |
+
"expected_serialized_state": null,
|
| 1057 |
+
"actual_serialized_state": null
|
| 1058 |
+
},
|
| 1059 |
+
{
|
| 1060 |
+
"build": "firefox",
|
| 1061 |
+
"name": "score-2",
|
| 1062 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1063 |
+
"passed": true,
|
| 1064 |
+
"checks": {
|
| 1065 |
+
"rendered_options": true,
|
| 1066 |
+
"input_ids": true,
|
| 1067 |
+
"markers": true,
|
| 1068 |
+
"serialized_state": true,
|
| 1069 |
+
"temperature": true,
|
| 1070 |
+
"public_answer": true,
|
| 1071 |
+
"answer_schema": true
|
| 1072 |
+
},
|
| 1073 |
+
"actual_answer": {
|
| 1074 |
+
"type": "score",
|
| 1075 |
+
"confidence": 0.6666666666666666,
|
| 1076 |
+
"probabilities": {
|
| 1077 |
+
"0": 0.3333333333333333,
|
| 1078 |
+
"1": 0.6666666666666666
|
| 1079 |
+
},
|
| 1080 |
+
"score": 0.6666666666666666,
|
| 1081 |
+
"legend": {
|
| 1082 |
+
"0": "Evidence level 0",
|
| 1083 |
+
"1": "Evidence level 1"
|
| 1084 |
+
}
|
| 1085 |
+
},
|
| 1086 |
+
"expected_answer": {
|
| 1087 |
+
"type": "score",
|
| 1088 |
+
"score": 0.6666666666666666,
|
| 1089 |
+
"confidence": 0.6666666666666666,
|
| 1090 |
+
"probabilities": {
|
| 1091 |
+
"0": 0.3333333333333333,
|
| 1092 |
+
"1": 0.6666666666666666
|
| 1093 |
+
},
|
| 1094 |
+
"legend": {
|
| 1095 |
+
"0": "Evidence level 0",
|
| 1096 |
+
"1": "Evidence level 1"
|
| 1097 |
+
}
|
| 1098 |
+
},
|
| 1099 |
+
"answer_contract_error": null,
|
| 1100 |
+
"token_count": {
|
| 1101 |
+
"actual": 32,
|
| 1102 |
+
"expected": 32
|
| 1103 |
+
},
|
| 1104 |
+
"ids_first_difference": -1,
|
| 1105 |
+
"expected_serialized_state": null,
|
| 1106 |
+
"actual_serialized_state": null
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"build": "firefox",
|
| 1110 |
+
"name": "score-3",
|
| 1111 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1112 |
+
"passed": true,
|
| 1113 |
+
"checks": {
|
| 1114 |
+
"rendered_options": true,
|
| 1115 |
+
"input_ids": true,
|
| 1116 |
+
"markers": true,
|
| 1117 |
+
"serialized_state": true,
|
| 1118 |
+
"temperature": true,
|
| 1119 |
+
"public_answer": true,
|
| 1120 |
+
"answer_schema": true
|
| 1121 |
+
},
|
| 1122 |
+
"actual_answer": {
|
| 1123 |
+
"type": "score",
|
| 1124 |
+
"confidence": 0.5,
|
| 1125 |
+
"probabilities": {
|
| 1126 |
+
"0": 0.16666666666666666,
|
| 1127 |
+
"1": 0.3333333333333333,
|
| 1128 |
+
"2": 0.5
|
| 1129 |
+
},
|
| 1130 |
+
"score": 1.3333333333333333,
|
| 1131 |
+
"legend": {
|
| 1132 |
+
"0": "Evidence level 0",
|
| 1133 |
+
"1": "Evidence level 1",
|
| 1134 |
+
"2": "Evidence level 2"
|
| 1135 |
+
}
|
| 1136 |
+
},
|
| 1137 |
+
"expected_answer": {
|
| 1138 |
+
"type": "score",
|
| 1139 |
+
"score": 1.3333333333333333,
|
| 1140 |
+
"confidence": 0.5,
|
| 1141 |
+
"probabilities": {
|
| 1142 |
+
"0": 0.16666666666666666,
|
| 1143 |
+
"1": 0.3333333333333333,
|
| 1144 |
+
"2": 0.5
|
| 1145 |
+
},
|
| 1146 |
+
"legend": {
|
| 1147 |
+
"0": "Evidence level 0",
|
| 1148 |
+
"1": "Evidence level 1",
|
| 1149 |
+
"2": "Evidence level 2"
|
| 1150 |
+
}
|
| 1151 |
+
},
|
| 1152 |
+
"answer_contract_error": null,
|
| 1153 |
+
"token_count": {
|
| 1154 |
+
"actual": 43,
|
| 1155 |
+
"expected": 43
|
| 1156 |
+
},
|
| 1157 |
+
"ids_first_difference": -1,
|
| 1158 |
+
"expected_serialized_state": null,
|
| 1159 |
+
"actual_serialized_state": null
|
| 1160 |
+
},
|
| 1161 |
+
{
|
| 1162 |
+
"build": "firefox",
|
| 1163 |
+
"name": "score-5",
|
| 1164 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1165 |
+
"passed": true,
|
| 1166 |
+
"checks": {
|
| 1167 |
+
"rendered_options": true,
|
| 1168 |
+
"input_ids": true,
|
| 1169 |
+
"markers": true,
|
| 1170 |
+
"serialized_state": true,
|
| 1171 |
+
"temperature": true,
|
| 1172 |
+
"public_answer": true,
|
| 1173 |
+
"answer_schema": true
|
| 1174 |
+
},
|
| 1175 |
+
"actual_answer": {
|
| 1176 |
+
"type": "score",
|
| 1177 |
+
"confidence": 0.3333333333333333,
|
| 1178 |
+
"probabilities": {
|
| 1179 |
+
"0": 0.06666666666666667,
|
| 1180 |
+
"1": 0.13333333333333333,
|
| 1181 |
+
"2": 0.2,
|
| 1182 |
+
"3": 0.26666666666666666,
|
| 1183 |
+
"4": 0.3333333333333333
|
| 1184 |
+
},
|
| 1185 |
+
"score": 2.666666666666667,
|
| 1186 |
+
"legend": {
|
| 1187 |
+
"0": "Evidence level 0",
|
| 1188 |
+
"1": "Evidence level 1",
|
| 1189 |
+
"2": "Evidence level 2",
|
| 1190 |
+
"3": "Evidence level 3",
|
| 1191 |
+
"4": "Evidence level 4"
|
| 1192 |
+
}
|
| 1193 |
+
},
|
| 1194 |
+
"expected_answer": {
|
| 1195 |
+
"type": "score",
|
| 1196 |
+
"score": 2.666666666666667,
|
| 1197 |
+
"confidence": 0.3333333333333333,
|
| 1198 |
+
"probabilities": {
|
| 1199 |
+
"0": 0.06666666666666667,
|
| 1200 |
+
"1": 0.13333333333333333,
|
| 1201 |
+
"2": 0.2,
|
| 1202 |
+
"3": 0.26666666666666666,
|
| 1203 |
+
"4": 0.3333333333333333
|
| 1204 |
+
},
|
| 1205 |
+
"legend": {
|
| 1206 |
+
"0": "Evidence level 0",
|
| 1207 |
+
"1": "Evidence level 1",
|
| 1208 |
+
"2": "Evidence level 2",
|
| 1209 |
+
"3": "Evidence level 3",
|
| 1210 |
+
"4": "Evidence level 4"
|
| 1211 |
+
}
|
| 1212 |
+
},
|
| 1213 |
+
"answer_contract_error": null,
|
| 1214 |
+
"token_count": {
|
| 1215 |
+
"actual": 65,
|
| 1216 |
+
"expected": 65
|
| 1217 |
+
},
|
| 1218 |
+
"ids_first_difference": -1,
|
| 1219 |
+
"expected_serialized_state": null,
|
| 1220 |
+
"actual_serialized_state": null
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"build": "firefox",
|
| 1224 |
+
"name": "score-10",
|
| 1225 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1226 |
+
"passed": true,
|
| 1227 |
+
"checks": {
|
| 1228 |
+
"rendered_options": true,
|
| 1229 |
+
"input_ids": true,
|
| 1230 |
+
"markers": true,
|
| 1231 |
+
"serialized_state": true,
|
| 1232 |
+
"temperature": true,
|
| 1233 |
+
"public_answer": true,
|
| 1234 |
+
"answer_schema": true
|
| 1235 |
+
},
|
| 1236 |
+
"actual_answer": {
|
| 1237 |
+
"type": "score",
|
| 1238 |
+
"confidence": 0.18181818181818182,
|
| 1239 |
+
"probabilities": {
|
| 1240 |
+
"0": 0.01818181818181818,
|
| 1241 |
+
"1": 0.03636363636363636,
|
| 1242 |
+
"2": 0.05454545454545454,
|
| 1243 |
+
"3": 0.07272727272727272,
|
| 1244 |
+
"4": 0.09090909090909091,
|
| 1245 |
+
"5": 0.10909090909090909,
|
| 1246 |
+
"6": 0.12727272727272726,
|
| 1247 |
+
"7": 0.14545454545454545,
|
| 1248 |
+
"8": 0.16363636363636364,
|
| 1249 |
+
"9": 0.18181818181818182
|
| 1250 |
+
},
|
| 1251 |
+
"score": 6,
|
| 1252 |
+
"legend": {
|
| 1253 |
+
"0": "Evidence level 0",
|
| 1254 |
+
"1": "Evidence level 1",
|
| 1255 |
+
"2": "Evidence level 2",
|
| 1256 |
+
"3": "Evidence level 3",
|
| 1257 |
+
"4": "Evidence level 4",
|
| 1258 |
+
"5": "Evidence level 5",
|
| 1259 |
+
"6": "Evidence level 6",
|
| 1260 |
+
"7": "Evidence level 7",
|
| 1261 |
+
"8": "Evidence level 8",
|
| 1262 |
+
"9": "Evidence level 9"
|
| 1263 |
+
}
|
| 1264 |
+
},
|
| 1265 |
+
"expected_answer": {
|
| 1266 |
+
"type": "score",
|
| 1267 |
+
"score": 6,
|
| 1268 |
+
"confidence": 0.18181818181818182,
|
| 1269 |
+
"probabilities": {
|
| 1270 |
+
"0": 0.01818181818181818,
|
| 1271 |
+
"1": 0.03636363636363636,
|
| 1272 |
+
"2": 0.05454545454545454,
|
| 1273 |
+
"3": 0.07272727272727272,
|
| 1274 |
+
"4": 0.09090909090909091,
|
| 1275 |
+
"5": 0.10909090909090909,
|
| 1276 |
+
"6": 0.12727272727272726,
|
| 1277 |
+
"7": 0.14545454545454545,
|
| 1278 |
+
"8": 0.16363636363636364,
|
| 1279 |
+
"9": 0.18181818181818182
|
| 1280 |
+
},
|
| 1281 |
+
"legend": {
|
| 1282 |
+
"0": "Evidence level 0",
|
| 1283 |
+
"1": "Evidence level 1",
|
| 1284 |
+
"2": "Evidence level 2",
|
| 1285 |
+
"3": "Evidence level 3",
|
| 1286 |
+
"4": "Evidence level 4",
|
| 1287 |
+
"5": "Evidence level 5",
|
| 1288 |
+
"6": "Evidence level 6",
|
| 1289 |
+
"7": "Evidence level 7",
|
| 1290 |
+
"8": "Evidence level 8",
|
| 1291 |
+
"9": "Evidence level 9"
|
| 1292 |
+
}
|
| 1293 |
+
},
|
| 1294 |
+
"answer_contract_error": null,
|
| 1295 |
+
"token_count": {
|
| 1296 |
+
"actual": 120,
|
| 1297 |
+
"expected": 120
|
| 1298 |
+
},
|
| 1299 |
+
"ids_first_difference": -1,
|
| 1300 |
+
"expected_serialized_state": null,
|
| 1301 |
+
"actual_serialized_state": null
|
| 1302 |
+
},
|
| 1303 |
+
{
|
| 1304 |
+
"build": "firefox",
|
| 1305 |
+
"name": "noul-False-8",
|
| 1306 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1307 |
+
"passed": true,
|
| 1308 |
+
"checks": {
|
| 1309 |
+
"rendered_options": true,
|
| 1310 |
+
"input_ids": true,
|
| 1311 |
+
"markers": true,
|
| 1312 |
+
"serialized_state": true,
|
| 1313 |
+
"temperature": true,
|
| 1314 |
+
"public_answer": true,
|
| 1315 |
+
"answer_schema": true
|
| 1316 |
+
},
|
| 1317 |
+
"actual_answer": {
|
| 1318 |
+
"type": "noul",
|
| 1319 |
+
"noul": 0.6666666666666666
|
| 1320 |
+
},
|
| 1321 |
+
"expected_answer": {
|
| 1322 |
+
"type": "noul",
|
| 1323 |
+
"noul": 0.6666666666666666
|
| 1324 |
+
},
|
| 1325 |
+
"answer_contract_error": null,
|
| 1326 |
+
"token_count": {
|
| 1327 |
+
"actual": 35,
|
| 1328 |
+
"expected": 35
|
| 1329 |
+
},
|
| 1330 |
+
"ids_first_difference": -1,
|
| 1331 |
+
"expected_serialized_state": null,
|
| 1332 |
+
"actual_serialized_state": null
|
| 1333 |
+
},
|
| 1334 |
+
{
|
| 1335 |
+
"build": "firefox",
|
| 1336 |
+
"name": "noul-False-9",
|
| 1337 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1338 |
+
"passed": true,
|
| 1339 |
+
"checks": {
|
| 1340 |
+
"rendered_options": true,
|
| 1341 |
+
"input_ids": true,
|
| 1342 |
+
"markers": true,
|
| 1343 |
+
"serialized_state": true,
|
| 1344 |
+
"temperature": true,
|
| 1345 |
+
"public_answer": true,
|
| 1346 |
+
"answer_schema": true
|
| 1347 |
+
},
|
| 1348 |
+
"actual_answer": {
|
| 1349 |
+
"type": "noul",
|
| 1350 |
+
"noul": 0.6666666666666666
|
| 1351 |
+
},
|
| 1352 |
+
"expected_answer": {
|
| 1353 |
+
"type": "noul",
|
| 1354 |
+
"noul": 0.6666666666666666
|
| 1355 |
+
},
|
| 1356 |
+
"answer_contract_error": null,
|
| 1357 |
+
"token_count": {
|
| 1358 |
+
"actual": 27,
|
| 1359 |
+
"expected": 27
|
| 1360 |
+
},
|
| 1361 |
+
"ids_first_difference": -1,
|
| 1362 |
+
"expected_serialized_state": null,
|
| 1363 |
+
"actual_serialized_state": null
|
| 1364 |
+
},
|
| 1365 |
+
{
|
| 1366 |
+
"build": "firefox",
|
| 1367 |
+
"name": "noul-False-10",
|
| 1368 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1369 |
+
"passed": true,
|
| 1370 |
+
"checks": {
|
| 1371 |
+
"rendered_options": true,
|
| 1372 |
+
"input_ids": true,
|
| 1373 |
+
"markers": true,
|
| 1374 |
+
"serialized_state": true,
|
| 1375 |
+
"temperature": true,
|
| 1376 |
+
"public_answer": true,
|
| 1377 |
+
"answer_schema": true
|
| 1378 |
+
},
|
| 1379 |
+
"actual_answer": {
|
| 1380 |
+
"type": "noul",
|
| 1381 |
+
"noul": 0.6666666666666666
|
| 1382 |
+
},
|
| 1383 |
+
"expected_answer": {
|
| 1384 |
+
"type": "noul",
|
| 1385 |
+
"noul": 0.6666666666666666
|
| 1386 |
+
},
|
| 1387 |
+
"answer_contract_error": null,
|
| 1388 |
+
"token_count": {
|
| 1389 |
+
"actual": 26,
|
| 1390 |
+
"expected": 26
|
| 1391 |
+
},
|
| 1392 |
+
"ids_first_difference": -1,
|
| 1393 |
+
"expected_serialized_state": null,
|
| 1394 |
+
"actual_serialized_state": null
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"build": "firefox",
|
| 1398 |
+
"name": "noul-False-11",
|
| 1399 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1400 |
+
"passed": true,
|
| 1401 |
+
"checks": {
|
| 1402 |
+
"rendered_options": true,
|
| 1403 |
+
"input_ids": true,
|
| 1404 |
+
"markers": true,
|
| 1405 |
+
"serialized_state": true,
|
| 1406 |
+
"temperature": true,
|
| 1407 |
+
"public_answer": true,
|
| 1408 |
+
"answer_schema": true
|
| 1409 |
+
},
|
| 1410 |
+
"actual_answer": {
|
| 1411 |
+
"type": "noul",
|
| 1412 |
+
"noul": 0.6666666666666666
|
| 1413 |
+
},
|
| 1414 |
+
"expected_answer": {
|
| 1415 |
+
"type": "noul",
|
| 1416 |
+
"noul": 0.6666666666666666
|
| 1417 |
+
},
|
| 1418 |
+
"answer_contract_error": null,
|
| 1419 |
+
"token_count": {
|
| 1420 |
+
"actual": 35,
|
| 1421 |
+
"expected": 35
|
| 1422 |
+
},
|
| 1423 |
+
"ids_first_difference": -1,
|
| 1424 |
+
"expected_serialized_state": null,
|
| 1425 |
+
"actual_serialized_state": null
|
| 1426 |
+
},
|
| 1427 |
+
{
|
| 1428 |
+
"build": "firefox",
|
| 1429 |
+
"name": "noul-True-12",
|
| 1430 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1431 |
+
"passed": true,
|
| 1432 |
+
"checks": {
|
| 1433 |
+
"rendered_options": true,
|
| 1434 |
+
"input_ids": true,
|
| 1435 |
+
"markers": true,
|
| 1436 |
+
"serialized_state": true,
|
| 1437 |
+
"temperature": true,
|
| 1438 |
+
"public_answer": true,
|
| 1439 |
+
"answer_schema": true
|
| 1440 |
+
},
|
| 1441 |
+
"actual_answer": {
|
| 1442 |
+
"type": "noul",
|
| 1443 |
+
"noul": 0.6666666666666666
|
| 1444 |
+
},
|
| 1445 |
+
"expected_answer": {
|
| 1446 |
+
"type": "noul",
|
| 1447 |
+
"noul": 0.6666666666666666
|
| 1448 |
+
},
|
| 1449 |
+
"answer_contract_error": null,
|
| 1450 |
+
"token_count": {
|
| 1451 |
+
"actual": 25,
|
| 1452 |
+
"expected": 25
|
| 1453 |
+
},
|
| 1454 |
+
"ids_first_difference": -1,
|
| 1455 |
+
"expected_serialized_state": null,
|
| 1456 |
+
"actual_serialized_state": null
|
| 1457 |
+
},
|
| 1458 |
+
{
|
| 1459 |
+
"build": "firefox",
|
| 1460 |
+
"name": "noul-True-13",
|
| 1461 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1462 |
+
"passed": true,
|
| 1463 |
+
"checks": {
|
| 1464 |
+
"rendered_options": true,
|
| 1465 |
+
"input_ids": true,
|
| 1466 |
+
"markers": true,
|
| 1467 |
+
"serialized_state": true,
|
| 1468 |
+
"temperature": true,
|
| 1469 |
+
"public_answer": true,
|
| 1470 |
+
"answer_schema": true
|
| 1471 |
+
},
|
| 1472 |
+
"actual_answer": {
|
| 1473 |
+
"type": "noul",
|
| 1474 |
+
"noul": 0.6666666666666666
|
| 1475 |
+
},
|
| 1476 |
+
"expected_answer": {
|
| 1477 |
+
"type": "noul",
|
| 1478 |
+
"noul": 0.6666666666666666
|
| 1479 |
+
},
|
| 1480 |
+
"answer_contract_error": null,
|
| 1481 |
+
"token_count": {
|
| 1482 |
+
"actual": 27,
|
| 1483 |
+
"expected": 27
|
| 1484 |
+
},
|
| 1485 |
+
"ids_first_difference": -1,
|
| 1486 |
+
"expected_serialized_state": null,
|
| 1487 |
+
"actual_serialized_state": null
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"build": "firefox",
|
| 1491 |
+
"name": "noul-True-14",
|
| 1492 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1493 |
+
"passed": true,
|
| 1494 |
+
"checks": {
|
| 1495 |
+
"rendered_options": true,
|
| 1496 |
+
"input_ids": true,
|
| 1497 |
+
"markers": true,
|
| 1498 |
+
"serialized_state": true,
|
| 1499 |
+
"temperature": true,
|
| 1500 |
+
"public_answer": true,
|
| 1501 |
+
"answer_schema": true
|
| 1502 |
+
},
|
| 1503 |
+
"actual_answer": {
|
| 1504 |
+
"type": "noul",
|
| 1505 |
+
"noul": 0.6666666666666666
|
| 1506 |
+
},
|
| 1507 |
+
"expected_answer": {
|
| 1508 |
+
"type": "noul",
|
| 1509 |
+
"noul": 0.6666666666666666
|
| 1510 |
+
},
|
| 1511 |
+
"answer_contract_error": null,
|
| 1512 |
+
"token_count": {
|
| 1513 |
+
"actual": 26,
|
| 1514 |
+
"expected": 26
|
| 1515 |
+
},
|
| 1516 |
+
"ids_first_difference": -1,
|
| 1517 |
+
"expected_serialized_state": null,
|
| 1518 |
+
"actual_serialized_state": null
|
| 1519 |
+
},
|
| 1520 |
+
{
|
| 1521 |
+
"build": "firefox",
|
| 1522 |
+
"name": "noul-True-15",
|
| 1523 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1524 |
+
"passed": true,
|
| 1525 |
+
"checks": {
|
| 1526 |
+
"rendered_options": true,
|
| 1527 |
+
"input_ids": true,
|
| 1528 |
+
"markers": true,
|
| 1529 |
+
"serialized_state": true,
|
| 1530 |
+
"temperature": true,
|
| 1531 |
+
"public_answer": true,
|
| 1532 |
+
"answer_schema": true
|
| 1533 |
+
},
|
| 1534 |
+
"actual_answer": {
|
| 1535 |
+
"type": "noul",
|
| 1536 |
+
"noul": 0.6666666666666666
|
| 1537 |
+
},
|
| 1538 |
+
"expected_answer": {
|
| 1539 |
+
"type": "noul",
|
| 1540 |
+
"noul": 0.6666666666666666
|
| 1541 |
+
},
|
| 1542 |
+
"answer_contract_error": null,
|
| 1543 |
+
"token_count": {
|
| 1544 |
+
"actual": 35,
|
| 1545 |
+
"expected": 35
|
| 1546 |
+
},
|
| 1547 |
+
"ids_first_difference": -1,
|
| 1548 |
+
"expected_serialized_state": null,
|
| 1549 |
+
"actual_serialized_state": null
|
| 1550 |
+
},
|
| 1551 |
+
{
|
| 1552 |
+
"build": "firefox",
|
| 1553 |
+
"name": "structured-score-legend",
|
| 1554 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1555 |
+
"passed": true,
|
| 1556 |
+
"checks": {
|
| 1557 |
+
"rendered_options": true,
|
| 1558 |
+
"input_ids": true,
|
| 1559 |
+
"markers": true,
|
| 1560 |
+
"serialized_state": true,
|
| 1561 |
+
"temperature": true,
|
| 1562 |
+
"public_answer": true,
|
| 1563 |
+
"answer_schema": true
|
| 1564 |
+
},
|
| 1565 |
+
"actual_answer": {
|
| 1566 |
+
"type": "score",
|
| 1567 |
+
"confidence": 0.6666666666666666,
|
| 1568 |
+
"probabilities": {
|
| 1569 |
+
"0": 0.3333333333333333,
|
| 1570 |
+
"1": 0.6666666666666666
|
| 1571 |
+
},
|
| 1572 |
+
"score": 0.6666666666666666,
|
| 1573 |
+
"legend": {
|
| 1574 |
+
"0": "{\"evidence\": \"absent\", \"count\": 0}",
|
| 1575 |
+
"1": "{\"evidence\": \"present\", \"count\": 1}"
|
| 1576 |
+
}
|
| 1577 |
+
},
|
| 1578 |
+
"expected_answer": {
|
| 1579 |
+
"type": "score",
|
| 1580 |
+
"score": 0.6666666666666666,
|
| 1581 |
+
"confidence": 0.6666666666666666,
|
| 1582 |
+
"probabilities": {
|
| 1583 |
+
"0": 0.3333333333333333,
|
| 1584 |
+
"1": 0.6666666666666666
|
| 1585 |
+
},
|
| 1586 |
+
"legend": {
|
| 1587 |
+
"0": "{\"evidence\": \"absent\", \"count\": 0}",
|
| 1588 |
+
"1": "{\"evidence\": \"present\", \"count\": 1}"
|
| 1589 |
+
}
|
| 1590 |
+
},
|
| 1591 |
+
"answer_contract_error": null,
|
| 1592 |
+
"token_count": {
|
| 1593 |
+
"actual": 49,
|
| 1594 |
+
"expected": 49
|
| 1595 |
+
},
|
| 1596 |
+
"ids_first_difference": -1,
|
| 1597 |
+
"expected_serialized_state": null,
|
| 1598 |
+
"actual_serialized_state": null
|
| 1599 |
+
},
|
| 1600 |
+
{
|
| 1601 |
+
"build": "firefox",
|
| 1602 |
+
"name": "escaped-markers-unicode",
|
| 1603 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1604 |
+
"passed": true,
|
| 1605 |
+
"checks": {
|
| 1606 |
+
"rendered_options": true,
|
| 1607 |
+
"input_ids": true,
|
| 1608 |
+
"markers": true,
|
| 1609 |
+
"serialized_state": true,
|
| 1610 |
+
"temperature": true,
|
| 1611 |
+
"public_answer": true,
|
| 1612 |
+
"answer_schema": true
|
| 1613 |
+
},
|
| 1614 |
+
"actual_answer": {
|
| 1615 |
+
"type": "choice",
|
| 1616 |
+
"confidence": 0.6666666666666666,
|
| 1617 |
+
"probabilities": {
|
| 1618 |
+
"red": 0.3333333333333333,
|
| 1619 |
+
"green": 0.6666666666666666
|
| 1620 |
+
},
|
| 1621 |
+
"choice": "green"
|
| 1622 |
+
},
|
| 1623 |
+
"expected_answer": {
|
| 1624 |
+
"type": "choice",
|
| 1625 |
+
"choice": "green",
|
| 1626 |
+
"confidence": 0.6666666666666666,
|
| 1627 |
+
"probabilities": {
|
| 1628 |
+
"red": 0.3333333333333333,
|
| 1629 |
+
"green": 0.6666666666666666
|
| 1630 |
+
}
|
| 1631 |
+
},
|
| 1632 |
+
"answer_contract_error": null,
|
| 1633 |
+
"token_count": {
|
| 1634 |
+
"actual": 53,
|
| 1635 |
+
"expected": 53
|
| 1636 |
+
},
|
| 1637 |
+
"ids_first_difference": -1,
|
| 1638 |
+
"expected_serialized_state": null,
|
| 1639 |
+
"actual_serialized_state": null
|
| 1640 |
+
},
|
| 1641 |
+
{
|
| 1642 |
+
"build": "firefox",
|
| 1643 |
+
"name": "long-state-truncation",
|
| 1644 |
+
"scope": "ordinary_and_source_schema_edges",
|
| 1645 |
+
"passed": true,
|
| 1646 |
+
"checks": {
|
| 1647 |
+
"rendered_options": true,
|
| 1648 |
+
"input_ids": true,
|
| 1649 |
+
"markers": true,
|
| 1650 |
+
"serialized_state": true,
|
| 1651 |
+
"temperature": true,
|
| 1652 |
+
"public_answer": true,
|
| 1653 |
+
"answer_schema": true
|
| 1654 |
+
},
|
| 1655 |
+
"actual_answer": {
|
| 1656 |
+
"type": "choice",
|
| 1657 |
+
"confidence": 0.6666666666666666,
|
| 1658 |
+
"probabilities": {
|
| 1659 |
+
"a": 0.3333333333333333,
|
| 1660 |
+
"b": 0.6666666666666666
|
| 1661 |
+
},
|
| 1662 |
+
"choice": "b"
|
| 1663 |
+
},
|
| 1664 |
+
"expected_answer": {
|
| 1665 |
+
"type": "choice",
|
| 1666 |
+
"choice": "b",
|
| 1667 |
+
"confidence": 0.6666666666666666,
|
| 1668 |
+
"probabilities": {
|
| 1669 |
+
"a": 0.3333333333333333,
|
| 1670 |
+
"b": 0.6666666666666666
|
| 1671 |
+
}
|
| 1672 |
+
},
|
| 1673 |
+
"answer_contract_error": null,
|
| 1674 |
+
"token_count": {
|
| 1675 |
+
"actual": 896,
|
| 1676 |
+
"expected": 896
|
| 1677 |
+
},
|
| 1678 |
+
"ids_first_difference": -1,
|
| 1679 |
+
"expected_serialized_state": null,
|
| 1680 |
+
"actual_serialized_state": null
|
| 1681 |
+
},
|
| 1682 |
+
{
|
| 1683 |
+
"build": "firefox",
|
| 1684 |
+
"name": "structured-numeric-state",
|
| 1685 |
+
"scope": "serializer_numeric_edge",
|
| 1686 |
+
"passed": true,
|
| 1687 |
+
"checks": {
|
| 1688 |
+
"rendered_options": true,
|
| 1689 |
+
"input_ids": true,
|
| 1690 |
+
"markers": true,
|
| 1691 |
+
"serialized_state": true,
|
| 1692 |
+
"temperature": true,
|
| 1693 |
+
"public_answer": true,
|
| 1694 |
+
"answer_schema": true
|
| 1695 |
+
},
|
| 1696 |
+
"actual_answer": {
|
| 1697 |
+
"type": "choice",
|
| 1698 |
+
"confidence": 0.6666666666666666,
|
| 1699 |
+
"probabilities": {
|
| 1700 |
+
"a": 0.3333333333333333,
|
| 1701 |
+
"b": 0.6666666666666666
|
| 1702 |
+
},
|
| 1703 |
+
"choice": "b"
|
| 1704 |
+
},
|
| 1705 |
+
"expected_answer": {
|
| 1706 |
+
"type": "choice",
|
| 1707 |
+
"choice": "b",
|
| 1708 |
+
"confidence": 0.6666666666666666,
|
| 1709 |
+
"probabilities": {
|
| 1710 |
+
"a": 0.3333333333333333,
|
| 1711 |
+
"b": 0.6666666666666666
|
| 1712 |
+
}
|
| 1713 |
+
},
|
| 1714 |
+
"answer_contract_error": null,
|
| 1715 |
+
"token_count": {
|
| 1716 |
+
"actual": 39,
|
| 1717 |
+
"expected": 39
|
| 1718 |
+
},
|
| 1719 |
+
"ids_first_difference": -1,
|
| 1720 |
+
"expected_serialized_state": "{\"small\": 1e-07, \"decimal\": 1e-05}",
|
| 1721 |
+
"actual_serialized_state": "{\"small\": 1e-07, \"decimal\": 1e-05}"
|
| 1722 |
+
}
|
| 1723 |
+
],
|
| 1724 |
+
"fixture": {
|
| 1725 |
+
"path": "d1-webbrain-release/validation/integration-fixtures.json",
|
| 1726 |
+
"bytes": 90107,
|
| 1727 |
+
"sha256": "99f103de740e6e8d9c60b121471810d45bce6f5f22ec38370d4c2c3f5053a7f4"
|
| 1728 |
+
},
|
| 1729 |
+
"source_bindings": [
|
| 1730 |
+
{
|
| 1731 |
+
"path": "../webbrain/src/chrome/src/providers/d1-preprocess.js",
|
| 1732 |
+
"bytes": 9407,
|
| 1733 |
+
"sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e"
|
| 1734 |
+
},
|
| 1735 |
+
{
|
| 1736 |
+
"path": "../webbrain/src/chrome/src/providers/d1-runtime.js",
|
| 1737 |
+
"bytes": 8578,
|
| 1738 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"path": "../webbrain/src/chrome/src/providers/d1-worker.js",
|
| 1742 |
+
"bytes": 8338,
|
| 1743 |
+
"sha256": "d92040caf871cb7976546824fef3e2a0a03f7625fb041fe648c1f6f4f119bfee"
|
| 1744 |
+
},
|
| 1745 |
+
{
|
| 1746 |
+
"path": "../webbrain/src/chrome/src/providers/d1-host.js",
|
| 1747 |
+
"bytes": 1456,
|
| 1748 |
+
"sha256": "53357b046940842559394bc8eb9c82487f4a522611da8cadb4c59813876bff8d"
|
| 1749 |
+
},
|
| 1750 |
+
{
|
| 1751 |
+
"path": "../webbrain/src/chrome/src/providers/d1.js",
|
| 1752 |
+
"bytes": 1845,
|
| 1753 |
+
"sha256": "6c87d57f6fc6dd1da6de05edc2d6d4627e587c77c4d8198f15fe619b747bea44"
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"path": "../webbrain/src/chrome/src/providers/d1-config.js",
|
| 1757 |
+
"bytes": 1822,
|
| 1758 |
+
"sha256": "478391b33ba638558a7b6ecb42b7a9ced43b075b5687d2825bc42ded1ab11ca1"
|
| 1759 |
+
},
|
| 1760 |
+
{
|
| 1761 |
+
"path": "../webbrain/src/chrome/src/providers/d1-cache.js",
|
| 1762 |
+
"bytes": 5318,
|
| 1763 |
+
"sha256": "f187892c457727a42b559866a6dc1e9668fc3d458734c9e6c26a5565c4f9e221"
|
| 1764 |
+
},
|
| 1765 |
+
{
|
| 1766 |
+
"path": "../webbrain/src/firefox/src/providers/d1-preprocess.js",
|
| 1767 |
+
"bytes": 9407,
|
| 1768 |
+
"sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e"
|
| 1769 |
+
},
|
| 1770 |
+
{
|
| 1771 |
+
"path": "../webbrain/src/firefox/src/providers/d1-runtime.js",
|
| 1772 |
+
"bytes": 8578,
|
| 1773 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 1774 |
+
},
|
| 1775 |
+
{
|
| 1776 |
+
"path": "../webbrain/src/firefox/src/providers/d1-worker.js",
|
| 1777 |
+
"bytes": 8338,
|
| 1778 |
+
"sha256": "d92040caf871cb7976546824fef3e2a0a03f7625fb041fe648c1f6f4f119bfee"
|
| 1779 |
+
},
|
| 1780 |
+
{
|
| 1781 |
+
"path": "../webbrain/src/firefox/src/providers/d1-host.js",
|
| 1782 |
+
"bytes": 1456,
|
| 1783 |
+
"sha256": "53357b046940842559394bc8eb9c82487f4a522611da8cadb4c59813876bff8d"
|
| 1784 |
+
},
|
| 1785 |
+
{
|
| 1786 |
+
"path": "../webbrain/src/firefox/src/providers/d1.js",
|
| 1787 |
+
"bytes": 1845,
|
| 1788 |
+
"sha256": "6c87d57f6fc6dd1da6de05edc2d6d4627e587c77c4d8198f15fe619b747bea44"
|
| 1789 |
+
},
|
| 1790 |
+
{
|
| 1791 |
+
"path": "../webbrain/src/firefox/src/providers/d1-config.js",
|
| 1792 |
+
"bytes": 1822,
|
| 1793 |
+
"sha256": "478391b33ba638558a7b6ecb42b7a9ced43b075b5687d2825bc42ded1ab11ca1"
|
| 1794 |
+
},
|
| 1795 |
+
{
|
| 1796 |
+
"path": "../webbrain/src/firefox/src/providers/d1-cache.js",
|
| 1797 |
+
"bytes": 5318,
|
| 1798 |
+
"sha256": "f187892c457727a42b559866a6dc1e9668fc3d458734c9e6c26a5565c4f9e221"
|
| 1799 |
+
}
|
| 1800 |
+
],
|
| 1801 |
+
"tokenizer_module": {
|
| 1802 |
+
"path": "../webbrain/src/chrome/vendor/d1/transformers.web.js",
|
| 1803 |
+
"bytes": 1156776,
|
| 1804 |
+
"sha256": "539590a6de78977caa3d28a4669df919c909a485388a870d4da67cdea8aa5698"
|
| 1805 |
+
},
|
| 1806 |
+
"runner": {
|
| 1807 |
+
"path": "d1-webbrain-release/validation/integration_contract.mjs",
|
| 1808 |
+
"bytes": 5007,
|
| 1809 |
+
"sha256": "5c526ea39ea5d3992e5b9272489f5cdd207419a86e046d83a28fc9d3601a5155"
|
| 1810 |
+
},
|
| 1811 |
+
"checked_at_utc": "2026-10-08T22:59:46.736Z"
|
| 1812 |
+
}
|
provenance/integration-numeric-ids.json
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"complete": true,
|
| 3 |
+
"passed": true,
|
| 4 |
+
"scope": "Exact pinned-tokenizer rows and integer-ID routing through mock outputs, not neural inference",
|
| 5 |
+
"model_calls": 0,
|
| 6 |
+
"gpu_calls": 0,
|
| 7 |
+
"browser_calls": 0,
|
| 8 |
+
"ort_sessions_created": 0,
|
| 9 |
+
"protected_writes": 0,
|
| 10 |
+
"records": [
|
| 11 |
+
{
|
| 12 |
+
"build": "chrome",
|
| 13 |
+
"passed": true,
|
| 14 |
+
"checks": {
|
| 15 |
+
"all32_exact_source_rows": true,
|
| 16 |
+
"probabilities_remapped_by_question_id": true,
|
| 17 |
+
"source_budget": true,
|
| 18 |
+
"actual_reordered_feed_detected": true,
|
| 19 |
+
"all_answers_belong_to_original_ids": true,
|
| 20 |
+
"no_generated_tokens": true
|
| 21 |
+
},
|
| 22 |
+
"calls": [
|
| 23 |
+
{
|
| 24 |
+
"ids": [
|
| 25 |
+
"31",
|
| 26 |
+
"30",
|
| 27 |
+
"29",
|
| 28 |
+
"28",
|
| 29 |
+
"27",
|
| 30 |
+
"26",
|
| 31 |
+
"25",
|
| 32 |
+
"24"
|
| 33 |
+
],
|
| 34 |
+
"batch": 8,
|
| 35 |
+
"length": 7984,
|
| 36 |
+
"padded_tokens": 63872
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"ids": [
|
| 40 |
+
"23",
|
| 41 |
+
"22",
|
| 42 |
+
"21",
|
| 43 |
+
"20",
|
| 44 |
+
"19",
|
| 45 |
+
"18",
|
| 46 |
+
"17",
|
| 47 |
+
"16"
|
| 48 |
+
],
|
| 49 |
+
"batch": 8,
|
| 50 |
+
"length": 7968,
|
| 51 |
+
"padded_tokens": 63744
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"ids": [
|
| 55 |
+
"15",
|
| 56 |
+
"14",
|
| 57 |
+
"13",
|
| 58 |
+
"12",
|
| 59 |
+
"11",
|
| 60 |
+
"10",
|
| 61 |
+
"9",
|
| 62 |
+
"8"
|
| 63 |
+
],
|
| 64 |
+
"batch": 8,
|
| 65 |
+
"length": 7952,
|
| 66 |
+
"padded_tokens": 63616
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"ids": [
|
| 70 |
+
"7",
|
| 71 |
+
"6",
|
| 72 |
+
"5",
|
| 73 |
+
"4",
|
| 74 |
+
"3",
|
| 75 |
+
"2",
|
| 76 |
+
"1",
|
| 77 |
+
"0"
|
| 78 |
+
],
|
| 79 |
+
"batch": 8,
|
| 80 |
+
"length": 7936,
|
| 81 |
+
"padded_tokens": 63488
|
| 82 |
+
}
|
| 83 |
+
],
|
| 84 |
+
"per_question": [
|
| 85 |
+
{
|
| 86 |
+
"id": "0",
|
| 87 |
+
"expected_p_first": 0.01,
|
| 88 |
+
"actual_p_first": 0.009999999776482582,
|
| 89 |
+
"max_abs": 2.2351741811588166e-10
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"id": "1",
|
| 93 |
+
"expected_p_first": 0.02,
|
| 94 |
+
"actual_p_first": 0.019999999552965164,
|
| 95 |
+
"max_abs": 4.470348362317633e-10
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"id": "2",
|
| 99 |
+
"expected_p_first": 0.03,
|
| 100 |
+
"actual_p_first": 0.029999999329447746,
|
| 101 |
+
"max_abs": 6.705522526129215e-10
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"id": "3",
|
| 105 |
+
"expected_p_first": 0.04,
|
| 106 |
+
"actual_p_first": 0.03999999910593033,
|
| 107 |
+
"max_abs": 8.940696724635266e-10
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"id": "4",
|
| 111 |
+
"expected_p_first": 0.05,
|
| 112 |
+
"actual_p_first": 0.05000000074505806,
|
| 113 |
+
"max_abs": 7.450580569168253e-10
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"id": "5",
|
| 117 |
+
"expected_p_first": 0.06,
|
| 118 |
+
"actual_p_first": 0.05999999865889549,
|
| 119 |
+
"max_abs": 1.341104505225843e-9
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"id": "6",
|
| 123 |
+
"expected_p_first": 0.07,
|
| 124 |
+
"actual_p_first": 0.07000000029802322,
|
| 125 |
+
"max_abs": 2.98023217215615e-10
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"id": "7",
|
| 129 |
+
"expected_p_first": 0.08,
|
| 130 |
+
"actual_p_first": 0.07999999821186066,
|
| 131 |
+
"max_abs": 1.7881393449270533e-9
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"id": "8",
|
| 135 |
+
"expected_p_first": 0.09,
|
| 136 |
+
"actual_p_first": 0.09000000357627869,
|
| 137 |
+
"max_abs": 3.5762786898541066e-9
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"id": "9",
|
| 141 |
+
"expected_p_first": 0.1,
|
| 142 |
+
"actual_p_first": 0.10000000149011612,
|
| 143 |
+
"max_abs": 1.4901161138336505e-9
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"id": "10",
|
| 147 |
+
"expected_p_first": 0.11,
|
| 148 |
+
"actual_p_first": 0.10999999940395355,
|
| 149 |
+
"max_abs": 5.960464483090178e-10
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"id": "11",
|
| 153 |
+
"expected_p_first": 0.12,
|
| 154 |
+
"actual_p_first": 0.11999999731779099,
|
| 155 |
+
"max_abs": 2.682209010451686e-9
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"id": "12",
|
| 159 |
+
"expected_p_first": 0.13,
|
| 160 |
+
"actual_p_first": 0.12999999523162842,
|
| 161 |
+
"max_abs": 4.768371586472142e-9
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"id": "13",
|
| 165 |
+
"expected_p_first": 0.14,
|
| 166 |
+
"actual_p_first": 0.14000000059604645,
|
| 167 |
+
"max_abs": 5.9604643443123e-10
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"id": "14",
|
| 171 |
+
"expected_p_first": 0.15,
|
| 172 |
+
"actual_p_first": 0.15000000596046448,
|
| 173 |
+
"max_abs": 5.960464483090178e-9
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"id": "15",
|
| 177 |
+
"expected_p_first": 0.16,
|
| 178 |
+
"actual_p_first": 0.1599999964237213,
|
| 179 |
+
"max_abs": 3.5762786898541066e-9
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"id": "16",
|
| 183 |
+
"expected_p_first": 0.17,
|
| 184 |
+
"actual_p_first": 0.17000000178813934,
|
| 185 |
+
"max_abs": 1.7881393310492655e-9
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"id": "17",
|
| 189 |
+
"expected_p_first": 0.18,
|
| 190 |
+
"actual_p_first": 0.18000000715255737,
|
| 191 |
+
"max_abs": 7.152557379708213e-9
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"id": "18",
|
| 195 |
+
"expected_p_first": 0.19,
|
| 196 |
+
"actual_p_first": 0.1899999976158142,
|
| 197 |
+
"max_abs": 2.384185793236071e-9
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"id": "19",
|
| 201 |
+
"expected_p_first": 0.2,
|
| 202 |
+
"actual_p_first": 0.20000000298023224,
|
| 203 |
+
"max_abs": 2.980232227667301e-9
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"id": "20",
|
| 207 |
+
"expected_p_first": 0.21,
|
| 208 |
+
"actual_p_first": 0.20999999344348907,
|
| 209 |
+
"max_abs": 6.5565109175214076e-9
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"id": "21",
|
| 213 |
+
"expected_p_first": 0.22,
|
| 214 |
+
"actual_p_first": 0.2199999988079071,
|
| 215 |
+
"max_abs": 1.1920928966180355e-9
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"id": "22",
|
| 219 |
+
"expected_p_first": 0.23,
|
| 220 |
+
"actual_p_first": 0.23000000417232513,
|
| 221 |
+
"max_abs": 4.1723251242853365e-9
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"id": "23",
|
| 225 |
+
"expected_p_first": 0.24,
|
| 226 |
+
"actual_p_first": 0.23999999463558197,
|
| 227 |
+
"max_abs": 5.364418020903372e-9
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"id": "24",
|
| 231 |
+
"expected_p_first": 0.25,
|
| 232 |
+
"actual_p_first": 0.25,
|
| 233 |
+
"max_abs": 0
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"id": "25",
|
| 237 |
+
"expected_p_first": 0.26,
|
| 238 |
+
"actual_p_first": 0.25999999046325684,
|
| 239 |
+
"max_abs": 9.536743172944284e-9
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"id": "26",
|
| 243 |
+
"expected_p_first": 0.27,
|
| 244 |
+
"actual_p_first": 0.27000001072883606,
|
| 245 |
+
"max_abs": 1.0728836041806744e-8
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"id": "27",
|
| 249 |
+
"expected_p_first": 0.28,
|
| 250 |
+
"actual_p_first": 0.2800000011920929,
|
| 251 |
+
"max_abs": 1.19209286886246e-9
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"id": "28",
|
| 255 |
+
"expected_p_first": 0.29,
|
| 256 |
+
"actual_p_first": 0.28999999165534973,
|
| 257 |
+
"max_abs": 8.344650248570673e-9
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"id": "29",
|
| 261 |
+
"expected_p_first": 0.3,
|
| 262 |
+
"actual_p_first": 0.30000001192092896,
|
| 263 |
+
"max_abs": 1.1920928966180355e-8
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"id": "30",
|
| 267 |
+
"expected_p_first": 0.31,
|
| 268 |
+
"actual_p_first": 0.3100000023841858,
|
| 269 |
+
"max_abs": 2.384185793236071e-9
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"id": "31",
|
| 273 |
+
"expected_p_first": 0.32,
|
| 274 |
+
"actual_p_first": 0.3199999928474426,
|
| 275 |
+
"max_abs": 7.152557379708213e-9
|
| 276 |
+
}
|
| 277 |
+
],
|
| 278 |
+
"source": {
|
| 279 |
+
"path": "../webbrain/src/chrome/src/providers/d1-runtime.js",
|
| 280 |
+
"bytes": 8578,
|
| 281 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 282 |
+
},
|
| 283 |
+
"preprocess": {
|
| 284 |
+
"path": "../webbrain/src/chrome/src/providers/d1-preprocess.js",
|
| 285 |
+
"bytes": 9407,
|
| 286 |
+
"sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e"
|
| 287 |
+
}
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"build": "firefox",
|
| 291 |
+
"passed": true,
|
| 292 |
+
"checks": {
|
| 293 |
+
"all32_exact_source_rows": true,
|
| 294 |
+
"probabilities_remapped_by_question_id": true,
|
| 295 |
+
"source_budget": true,
|
| 296 |
+
"actual_reordered_feed_detected": true,
|
| 297 |
+
"all_answers_belong_to_original_ids": true,
|
| 298 |
+
"no_generated_tokens": true
|
| 299 |
+
},
|
| 300 |
+
"calls": [
|
| 301 |
+
{
|
| 302 |
+
"ids": [
|
| 303 |
+
"31",
|
| 304 |
+
"30",
|
| 305 |
+
"29",
|
| 306 |
+
"28",
|
| 307 |
+
"27",
|
| 308 |
+
"26",
|
| 309 |
+
"25",
|
| 310 |
+
"24"
|
| 311 |
+
],
|
| 312 |
+
"batch": 8,
|
| 313 |
+
"length": 7984,
|
| 314 |
+
"padded_tokens": 63872
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"ids": [
|
| 318 |
+
"23",
|
| 319 |
+
"22",
|
| 320 |
+
"21",
|
| 321 |
+
"20",
|
| 322 |
+
"19",
|
| 323 |
+
"18",
|
| 324 |
+
"17",
|
| 325 |
+
"16"
|
| 326 |
+
],
|
| 327 |
+
"batch": 8,
|
| 328 |
+
"length": 7968,
|
| 329 |
+
"padded_tokens": 63744
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"ids": [
|
| 333 |
+
"15",
|
| 334 |
+
"14",
|
| 335 |
+
"13",
|
| 336 |
+
"12",
|
| 337 |
+
"11",
|
| 338 |
+
"10",
|
| 339 |
+
"9",
|
| 340 |
+
"8"
|
| 341 |
+
],
|
| 342 |
+
"batch": 8,
|
| 343 |
+
"length": 7952,
|
| 344 |
+
"padded_tokens": 63616
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"ids": [
|
| 348 |
+
"7",
|
| 349 |
+
"6",
|
| 350 |
+
"5",
|
| 351 |
+
"4",
|
| 352 |
+
"3",
|
| 353 |
+
"2",
|
| 354 |
+
"1",
|
| 355 |
+
"0"
|
| 356 |
+
],
|
| 357 |
+
"batch": 8,
|
| 358 |
+
"length": 7936,
|
| 359 |
+
"padded_tokens": 63488
|
| 360 |
+
}
|
| 361 |
+
],
|
| 362 |
+
"per_question": [
|
| 363 |
+
{
|
| 364 |
+
"id": "0",
|
| 365 |
+
"expected_p_first": 0.01,
|
| 366 |
+
"actual_p_first": 0.009999999776482582,
|
| 367 |
+
"max_abs": 2.2351741811588166e-10
|
| 368 |
+
},
|
| 369 |
+
{
|
| 370 |
+
"id": "1",
|
| 371 |
+
"expected_p_first": 0.02,
|
| 372 |
+
"actual_p_first": 0.019999999552965164,
|
| 373 |
+
"max_abs": 4.470348362317633e-10
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"id": "2",
|
| 377 |
+
"expected_p_first": 0.03,
|
| 378 |
+
"actual_p_first": 0.029999999329447746,
|
| 379 |
+
"max_abs": 6.705522526129215e-10
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"id": "3",
|
| 383 |
+
"expected_p_first": 0.04,
|
| 384 |
+
"actual_p_first": 0.03999999910593033,
|
| 385 |
+
"max_abs": 8.940696724635266e-10
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"id": "4",
|
| 389 |
+
"expected_p_first": 0.05,
|
| 390 |
+
"actual_p_first": 0.05000000074505806,
|
| 391 |
+
"max_abs": 7.450580569168253e-10
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"id": "5",
|
| 395 |
+
"expected_p_first": 0.06,
|
| 396 |
+
"actual_p_first": 0.05999999865889549,
|
| 397 |
+
"max_abs": 1.341104505225843e-9
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"id": "6",
|
| 401 |
+
"expected_p_first": 0.07,
|
| 402 |
+
"actual_p_first": 0.07000000029802322,
|
| 403 |
+
"max_abs": 2.98023217215615e-10
|
| 404 |
+
},
|
| 405 |
+
{
|
| 406 |
+
"id": "7",
|
| 407 |
+
"expected_p_first": 0.08,
|
| 408 |
+
"actual_p_first": 0.07999999821186066,
|
| 409 |
+
"max_abs": 1.7881393449270533e-9
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"id": "8",
|
| 413 |
+
"expected_p_first": 0.09,
|
| 414 |
+
"actual_p_first": 0.09000000357627869,
|
| 415 |
+
"max_abs": 3.5762786898541066e-9
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"id": "9",
|
| 419 |
+
"expected_p_first": 0.1,
|
| 420 |
+
"actual_p_first": 0.10000000149011612,
|
| 421 |
+
"max_abs": 1.4901161138336505e-9
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"id": "10",
|
| 425 |
+
"expected_p_first": 0.11,
|
| 426 |
+
"actual_p_first": 0.10999999940395355,
|
| 427 |
+
"max_abs": 5.960464483090178e-10
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"id": "11",
|
| 431 |
+
"expected_p_first": 0.12,
|
| 432 |
+
"actual_p_first": 0.11999999731779099,
|
| 433 |
+
"max_abs": 2.682209010451686e-9
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"id": "12",
|
| 437 |
+
"expected_p_first": 0.13,
|
| 438 |
+
"actual_p_first": 0.12999999523162842,
|
| 439 |
+
"max_abs": 4.768371586472142e-9
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"id": "13",
|
| 443 |
+
"expected_p_first": 0.14,
|
| 444 |
+
"actual_p_first": 0.14000000059604645,
|
| 445 |
+
"max_abs": 5.9604643443123e-10
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"id": "14",
|
| 449 |
+
"expected_p_first": 0.15,
|
| 450 |
+
"actual_p_first": 0.15000000596046448,
|
| 451 |
+
"max_abs": 5.960464483090178e-9
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"id": "15",
|
| 455 |
+
"expected_p_first": 0.16,
|
| 456 |
+
"actual_p_first": 0.1599999964237213,
|
| 457 |
+
"max_abs": 3.5762786898541066e-9
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"id": "16",
|
| 461 |
+
"expected_p_first": 0.17,
|
| 462 |
+
"actual_p_first": 0.17000000178813934,
|
| 463 |
+
"max_abs": 1.7881393310492655e-9
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"id": "17",
|
| 467 |
+
"expected_p_first": 0.18,
|
| 468 |
+
"actual_p_first": 0.18000000715255737,
|
| 469 |
+
"max_abs": 7.152557379708213e-9
|
| 470 |
+
},
|
| 471 |
+
{
|
| 472 |
+
"id": "18",
|
| 473 |
+
"expected_p_first": 0.19,
|
| 474 |
+
"actual_p_first": 0.1899999976158142,
|
| 475 |
+
"max_abs": 2.384185793236071e-9
|
| 476 |
+
},
|
| 477 |
+
{
|
| 478 |
+
"id": "19",
|
| 479 |
+
"expected_p_first": 0.2,
|
| 480 |
+
"actual_p_first": 0.20000000298023224,
|
| 481 |
+
"max_abs": 2.980232227667301e-9
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"id": "20",
|
| 485 |
+
"expected_p_first": 0.21,
|
| 486 |
+
"actual_p_first": 0.20999999344348907,
|
| 487 |
+
"max_abs": 6.5565109175214076e-9
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"id": "21",
|
| 491 |
+
"expected_p_first": 0.22,
|
| 492 |
+
"actual_p_first": 0.2199999988079071,
|
| 493 |
+
"max_abs": 1.1920928966180355e-9
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"id": "22",
|
| 497 |
+
"expected_p_first": 0.23,
|
| 498 |
+
"actual_p_first": 0.23000000417232513,
|
| 499 |
+
"max_abs": 4.1723251242853365e-9
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"id": "23",
|
| 503 |
+
"expected_p_first": 0.24,
|
| 504 |
+
"actual_p_first": 0.23999999463558197,
|
| 505 |
+
"max_abs": 5.364418020903372e-9
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"id": "24",
|
| 509 |
+
"expected_p_first": 0.25,
|
| 510 |
+
"actual_p_first": 0.25,
|
| 511 |
+
"max_abs": 0
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"id": "25",
|
| 515 |
+
"expected_p_first": 0.26,
|
| 516 |
+
"actual_p_first": 0.25999999046325684,
|
| 517 |
+
"max_abs": 9.536743172944284e-9
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"id": "26",
|
| 521 |
+
"expected_p_first": 0.27,
|
| 522 |
+
"actual_p_first": 0.27000001072883606,
|
| 523 |
+
"max_abs": 1.0728836041806744e-8
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"id": "27",
|
| 527 |
+
"expected_p_first": 0.28,
|
| 528 |
+
"actual_p_first": 0.2800000011920929,
|
| 529 |
+
"max_abs": 1.19209286886246e-9
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"id": "28",
|
| 533 |
+
"expected_p_first": 0.29,
|
| 534 |
+
"actual_p_first": 0.28999999165534973,
|
| 535 |
+
"max_abs": 8.344650248570673e-9
|
| 536 |
+
},
|
| 537 |
+
{
|
| 538 |
+
"id": "29",
|
| 539 |
+
"expected_p_first": 0.3,
|
| 540 |
+
"actual_p_first": 0.30000001192092896,
|
| 541 |
+
"max_abs": 1.1920928966180355e-8
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"id": "30",
|
| 545 |
+
"expected_p_first": 0.31,
|
| 546 |
+
"actual_p_first": 0.3100000023841858,
|
| 547 |
+
"max_abs": 2.384185793236071e-9
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"id": "31",
|
| 551 |
+
"expected_p_first": 0.32,
|
| 552 |
+
"actual_p_first": 0.3199999928474426,
|
| 553 |
+
"max_abs": 7.152557379708213e-9
|
| 554 |
+
}
|
| 555 |
+
],
|
| 556 |
+
"source": {
|
| 557 |
+
"path": "../webbrain/src/firefox/src/providers/d1-runtime.js",
|
| 558 |
+
"bytes": 8578,
|
| 559 |
+
"sha256": "7837201f7a2a8e2edc8045a13cc36e722d125f3c135cc448219c9dc7cdc6a0ba"
|
| 560 |
+
},
|
| 561 |
+
"preprocess": {
|
| 562 |
+
"path": "../webbrain/src/firefox/src/providers/d1-preprocess.js",
|
| 563 |
+
"bytes": 9407,
|
| 564 |
+
"sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e"
|
| 565 |
+
}
|
| 566 |
+
}
|
| 567 |
+
],
|
| 568 |
+
"runner": {
|
| 569 |
+
"path": "d1-webbrain-release/validation/integration_numeric_ids.mjs",
|
| 570 |
+
"bytes": 4374,
|
| 571 |
+
"sha256": "6fe2f311d1991bf4119ed8132740769941d7de97dac9a93f9bd645360fdb0386"
|
| 572 |
+
},
|
| 573 |
+
"checked_at_utc": "2026-10-08T22:59:41.409Z"
|
| 574 |
+
}
|
provenance/model-identity.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
provenance/prepare-copy-records.json
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"created_at_utc": "2026-10-08T22:49:13.451069+00:00",
|
| 3 |
+
"records": [
|
| 4 |
+
{
|
| 5 |
+
"source": {
|
| 6 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/model.safetensors",
|
| 7 |
+
"bytes": 1899912876,
|
| 8 |
+
"sha256": "75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940"
|
| 9 |
+
},
|
| 10 |
+
"destination": {
|
| 11 |
+
"path": "model.safetensors",
|
| 12 |
+
"bytes": 1899912876,
|
| 13 |
+
"sha256": "75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940"
|
| 14 |
+
},
|
| 15 |
+
"copy_byte_exact": true
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"source": {
|
| 19 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/config.json",
|
| 20 |
+
"bytes": 1765,
|
| 21 |
+
"sha256": "68ddf4bd4f3e489455211f80836b36281115cb9206b8e8d47858d062bdb6508d"
|
| 22 |
+
},
|
| 23 |
+
"destination": {
|
| 24 |
+
"path": "config.json",
|
| 25 |
+
"bytes": 1765,
|
| 26 |
+
"sha256": "68ddf4bd4f3e489455211f80836b36281115cb9206b8e8d47858d062bdb6508d"
|
| 27 |
+
},
|
| 28 |
+
"copy_byte_exact": true
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"source": {
|
| 32 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/tokenizer.json",
|
| 33 |
+
"bytes": 4733371,
|
| 34 |
+
"sha256": "1efc3a6609abf6b63b1f47188d139f3b59973a6a434dffe970a7261a51ed2711"
|
| 35 |
+
},
|
| 36 |
+
"destination": {
|
| 37 |
+
"path": "tokenizer.json",
|
| 38 |
+
"bytes": 4733371,
|
| 39 |
+
"sha256": "1efc3a6609abf6b63b1f47188d139f3b59973a6a434dffe970a7261a51ed2711"
|
| 40 |
+
},
|
| 41 |
+
"copy_byte_exact": true
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"source": {
|
| 45 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/tokenizer_config.json",
|
| 46 |
+
"bytes": 259,
|
| 47 |
+
"sha256": "03efc74b752b899b6292ff7e607738be59e6f206fec9aca32bbc05e9184090fc"
|
| 48 |
+
},
|
| 49 |
+
"destination": {
|
| 50 |
+
"path": "tokenizer_config.json",
|
| 51 |
+
"bytes": 259,
|
| 52 |
+
"sha256": "03efc74b752b899b6292ff7e607738be59e6f206fec9aca32bbc05e9184090fc"
|
| 53 |
+
},
|
| 54 |
+
"copy_byte_exact": true
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"source": {
|
| 58 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/tiling-ratios.json",
|
| 59 |
+
"bytes": 681,
|
| 60 |
+
"sha256": "256b18bf3b533c9aaa34099b049e688893282341fb078b772b3ecb7b59ab43b6"
|
| 61 |
+
},
|
| 62 |
+
"destination": {
|
| 63 |
+
"path": "tiling-ratios.json",
|
| 64 |
+
"bytes": 681,
|
| 65 |
+
"sha256": "256b18bf3b533c9aaa34099b049e688893282341fb078b772b3ecb7b59ab43b6"
|
| 66 |
+
},
|
| 67 |
+
"copy_byte_exact": true
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"source": {
|
| 71 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/decision.onnx",
|
| 72 |
+
"bytes": 366403,
|
| 73 |
+
"sha256": "ef66e7aa7f288fd71578cb6f6b71a04d6f531ad7755536487e155f66f605baf9"
|
| 74 |
+
},
|
| 75 |
+
"destination": {
|
| 76 |
+
"path": "onnx/decision.onnx",
|
| 77 |
+
"bytes": 366403,
|
| 78 |
+
"sha256": "ef66e7aa7f288fd71578cb6f6b71a04d6f531ad7755536487e155f66f605baf9"
|
| 79 |
+
},
|
| 80 |
+
"copy_byte_exact": true
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"source": {
|
| 84 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/decision.data",
|
| 85 |
+
"bytes": 1522925568,
|
| 86 |
+
"sha256": "631417aa49dacb602b7e099062cd44c89e3747533a4094a61ff5f1cb3ccb0daf"
|
| 87 |
+
},
|
| 88 |
+
"destination": {
|
| 89 |
+
"path": "onnx/decision.data",
|
| 90 |
+
"bytes": 1522925568,
|
| 91 |
+
"sha256": "631417aa49dacb602b7e099062cd44c89e3747533a4094a61ff5f1cb3ccb0daf"
|
| 92 |
+
},
|
| 93 |
+
"copy_byte_exact": true
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"source": {
|
| 97 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/vision.onnx",
|
| 98 |
+
"bytes": 119183,
|
| 99 |
+
"sha256": "aa7cbbabc0ee925ab4dd44a6c85dd7bf92ef36da5f2ebcdf1066f918d1a2ea89"
|
| 100 |
+
},
|
| 101 |
+
"destination": {
|
| 102 |
+
"path": "onnx/vision.onnx",
|
| 103 |
+
"bytes": 119183,
|
| 104 |
+
"sha256": "aa7cbbabc0ee925ab4dd44a6c85dd7bf92ef36da5f2ebcdf1066f918d1a2ea89"
|
| 105 |
+
},
|
| 106 |
+
"copy_byte_exact": true
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"source": {
|
| 110 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/vision.data",
|
| 111 |
+
"bytes": 343372800,
|
| 112 |
+
"sha256": "490b694cf9a8770793e1cccc3d698bfb076f4b177216f9036e82eb0735b09390"
|
| 113 |
+
},
|
| 114 |
+
"destination": {
|
| 115 |
+
"path": "onnx/vision.data",
|
| 116 |
+
"bytes": 343372800,
|
| 117 |
+
"sha256": "490b694cf9a8770793e1cccc3d698bfb076f4b177216f9036e82eb0735b09390"
|
| 118 |
+
},
|
| 119 |
+
"copy_byte_exact": true
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"source": {
|
| 123 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/projector.onnx",
|
| 124 |
+
"bytes": 5712,
|
| 125 |
+
"sha256": "5489cd6636df06e474866ea55a37b06ec30a9fffcc993c89caff76639cc07d1e"
|
| 126 |
+
},
|
| 127 |
+
"destination": {
|
| 128 |
+
"path": "onnx/projector.onnx",
|
| 129 |
+
"bytes": 5712,
|
| 130 |
+
"sha256": "5489cd6636df06e474866ea55a37b06ec30a9fffcc993c89caff76639cc07d1e"
|
| 131 |
+
},
|
| 132 |
+
"copy_byte_exact": true
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"source": {
|
| 136 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/projector.data",
|
| 137 |
+
"bytes": 33566720,
|
| 138 |
+
"sha256": "e52c40550fbce097580870a7ddcca3f6992d93942931039ea717878514dd7a47"
|
| 139 |
+
},
|
| 140 |
+
"destination": {
|
| 141 |
+
"path": "onnx/projector.data",
|
| 142 |
+
"bytes": 33566720,
|
| 143 |
+
"sha256": "e52c40550fbce097580870a7ddcca3f6992d93942931039ea717878514dd7a47"
|
| 144 |
+
},
|
| 145 |
+
"copy_byte_exact": true
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"source": {
|
| 149 |
+
"path": "source/LICENSE",
|
| 150 |
+
"bytes": 10572,
|
| 151 |
+
"sha256": "9953509cbd8c1c6ce7b06ddf74fcc204a892692316201dd8f7400a84790d4120"
|
| 152 |
+
},
|
| 153 |
+
"destination": {
|
| 154 |
+
"path": "LICENSE",
|
| 155 |
+
"bytes": 10572,
|
| 156 |
+
"sha256": "9953509cbd8c1c6ce7b06ddf74fcc204a892692316201dd8f7400a84790d4120"
|
| 157 |
+
},
|
| 158 |
+
"copy_byte_exact": true
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"source": {
|
| 162 |
+
"path": "node_modules/@huggingface/transformers/LICENSE",
|
| 163 |
+
"bytes": 11358,
|
| 164 |
+
"sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"
|
| 165 |
+
},
|
| 166 |
+
"destination": {
|
| 167 |
+
"path": "licenses/transformers/LICENSE",
|
| 168 |
+
"bytes": 11358,
|
| 169 |
+
"sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"
|
| 170 |
+
},
|
| 171 |
+
"copy_byte_exact": true
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"source": {
|
| 175 |
+
"path": "source/README.md",
|
| 176 |
+
"bytes": 10384,
|
| 177 |
+
"sha256": "6577bee7b8cb23b595a90e99aa82007f57214d447f0ebcdfb2e812a7123d57bf"
|
| 178 |
+
},
|
| 179 |
+
"destination": {
|
| 180 |
+
"path": "provenance/upstream-source/README.md",
|
| 181 |
+
"bytes": 10384,
|
| 182 |
+
"sha256": "6577bee7b8cb23b595a90e99aa82007f57214d447f0ebcdfb2e812a7123d57bf"
|
| 183 |
+
},
|
| 184 |
+
"copy_byte_exact": true
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"source": {
|
| 188 |
+
"path": "source/config.json",
|
| 189 |
+
"bytes": 1993,
|
| 190 |
+
"sha256": "dfccae241822f81752426629c88c8b8d7efdd03dd19418b6645c604fad43d619"
|
| 191 |
+
},
|
| 192 |
+
"destination": {
|
| 193 |
+
"path": "provenance/upstream-source/config.json",
|
| 194 |
+
"bytes": 1993,
|
| 195 |
+
"sha256": "dfccae241822f81752426629c88c8b8d7efdd03dd19418b6645c604fad43d619"
|
| 196 |
+
},
|
| 197 |
+
"copy_byte_exact": true
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"source": {
|
| 201 |
+
"path": "source/modeling_d1.py",
|
| 202 |
+
"bytes": 8655,
|
| 203 |
+
"sha256": "2b71a5c909ec5d3aa6307378a41a0fd24af1e17d5c1c1f8d510582147051a686"
|
| 204 |
+
},
|
| 205 |
+
"destination": {
|
| 206 |
+
"path": "provenance/upstream-source/modeling_d1.py",
|
| 207 |
+
"bytes": 8655,
|
| 208 |
+
"sha256": "2b71a5c909ec5d3aa6307378a41a0fd24af1e17d5c1c1f8d510582147051a686"
|
| 209 |
+
},
|
| 210 |
+
"copy_byte_exact": true
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"source": {
|
| 214 |
+
"path": "source/encoder.py",
|
| 215 |
+
"bytes": 7732,
|
| 216 |
+
"sha256": "5f2e20319ee42a7367febf06c7653d7b3f9b28ef99a64cb9ec7739563dcfcffe"
|
| 217 |
+
},
|
| 218 |
+
"destination": {
|
| 219 |
+
"path": "provenance/upstream-source/encoder.py",
|
| 220 |
+
"bytes": 7732,
|
| 221 |
+
"sha256": "5f2e20319ee42a7367febf06c7653d7b3f9b28ef99a64cb9ec7739563dcfcffe"
|
| 222 |
+
},
|
| 223 |
+
"copy_byte_exact": true
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"source": {
|
| 227 |
+
"path": "source/vision.py",
|
| 228 |
+
"bytes": 5233,
|
| 229 |
+
"sha256": "43ad71029f82e20fd26b97574627773d47639d7a3742c8b04fe5bf55f41c4c28"
|
| 230 |
+
},
|
| 231 |
+
"destination": {
|
| 232 |
+
"path": "provenance/upstream-source/vision.py",
|
| 233 |
+
"bytes": 5233,
|
| 234 |
+
"sha256": "43ad71029f82e20fd26b97574627773d47639d7a3742c8b04fe5bf55f41c4c28"
|
| 235 |
+
},
|
| 236 |
+
"copy_byte_exact": true
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"source": {
|
| 240 |
+
"path": "source/prompt.py",
|
| 241 |
+
"bytes": 6309,
|
| 242 |
+
"sha256": "a6b29a55ec8345f1fc1fdbfcc4b64d80d473dc4316f095a62c51cb6cce1194cf"
|
| 243 |
+
},
|
| 244 |
+
"destination": {
|
| 245 |
+
"path": "provenance/upstream-source/prompt.py",
|
| 246 |
+
"bytes": 6309,
|
| 247 |
+
"sha256": "a6b29a55ec8345f1fc1fdbfcc4b64d80d473dc4316f095a62c51cb6cce1194cf"
|
| 248 |
+
},
|
| 249 |
+
"copy_byte_exact": true
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"source": {
|
| 253 |
+
"path": "source/audio.py",
|
| 254 |
+
"bytes": 11829,
|
| 255 |
+
"sha256": "c5ff09d52d6a079e79d0505c89dbd0582ba2bc9abf2b26595d8d5b1d0c347bdf"
|
| 256 |
+
},
|
| 257 |
+
"destination": {
|
| 258 |
+
"path": "provenance/upstream-source/audio.py",
|
| 259 |
+
"bytes": 11829,
|
| 260 |
+
"sha256": "c5ff09d52d6a079e79d0505c89dbd0582ba2bc9abf2b26595d8d5b1d0c347bdf"
|
| 261 |
+
},
|
| 262 |
+
"copy_byte_exact": true
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"source": {
|
| 266 |
+
"url": "https://raw.githubusercontent.com/microsoft/onnxruntime/8d85527a010e294a26b274749f74294b2a32cec5/LICENSE",
|
| 267 |
+
"bytes": 1073,
|
| 268 |
+
"sha256": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c"
|
| 269 |
+
},
|
| 270 |
+
"destination": {
|
| 271 |
+
"path": "licenses/onnxruntime/LICENSE",
|
| 272 |
+
"bytes": 1073,
|
| 273 |
+
"sha256": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c"
|
| 274 |
+
},
|
| 275 |
+
"copy_byte_exact": true
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"source": {
|
| 279 |
+
"url": "https://raw.githubusercontent.com/microsoft/onnxruntime/8d85527a010e294a26b274749f74294b2a32cec5/ThirdPartyNotices.txt",
|
| 280 |
+
"bytes": 338088,
|
| 281 |
+
"sha256": "143764b952fdb1a7c69ce653bfba74a7744d6a8a573bfb73e235fba356c83de3"
|
| 282 |
+
},
|
| 283 |
+
"destination": {
|
| 284 |
+
"path": "licenses/onnxruntime/ThirdPartyNotices.txt",
|
| 285 |
+
"bytes": 338088,
|
| 286 |
+
"sha256": "143764b952fdb1a7c69ce653bfba74a7744d6a8a573bfb73e235fba356c83de3"
|
| 287 |
+
},
|
| 288 |
+
"copy_byte_exact": true
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"source": {
|
| 292 |
+
"url": "https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M/resolve/b886781f7c6f10ca9b7096e21b83e30a073c2f39/LICENSE",
|
| 293 |
+
"bytes": 10574,
|
| 294 |
+
"sha256": "4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c"
|
| 295 |
+
},
|
| 296 |
+
"destination": {
|
| 297 |
+
"path": "licenses/LFM2.5-Encoder-350M/LICENSE",
|
| 298 |
+
"bytes": 10574,
|
| 299 |
+
"sha256": "4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c"
|
| 300 |
+
},
|
| 301 |
+
"copy_byte_exact": true
|
| 302 |
+
}
|
| 303 |
+
],
|
| 304 |
+
"package_script": {
|
| 305 |
+
"path": "d1-webbrain-release/package.py",
|
| 306 |
+
"bytes": 17027,
|
| 307 |
+
"sha256": "12003f5d80359c0d77e2eae9b1c9d362989f9db70270db29d7941e97576bca30"
|
| 308 |
+
},
|
| 309 |
+
"old_files_written": 0,
|
| 310 |
+
"training_model_GPU_browser_calls": 0,
|
| 311 |
+
"finalized": false,
|
| 312 |
+
"runtime_adapter_pending": true
|
| 313 |
+
}
|
provenance/preprocessing-adapter-change.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"original_protected_helper": {
|
| 3 |
+
"path": "browser/preprocess.mjs",
|
| 4 |
+
"bytes": 9084,
|
| 5 |
+
"sha256": "ecac4508ce345ccc0dde47b51e1692f1c3f43348181f52d1551814fcbcbd6a13"
|
| 6 |
+
},
|
| 7 |
+
"new_helper": {
|
| 8 |
+
"source": "../../webbrain/src/chrome/src/providers/d1-preprocess.js",
|
| 9 |
+
"destination": "runtime/d1-preprocess.js",
|
| 10 |
+
"bytes": 9407,
|
| 11 |
+
"sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e"
|
| 12 |
+
},
|
| 13 |
+
"changes": [
|
| 14 |
+
{
|
| 15 |
+
"before": "const no=c.false ?? c.no,yes=c.true ?? c.yes;",
|
| 16 |
+
"after": "const no=Object.hasOwn(c,'false')?c.false:c.no,yes=Object.hasOwn(c,'true')?c.true:c.yes;",
|
| 17 |
+
"purpose": "Python dict.get present-null false/true criteria semantics"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"before": " return JSON.stringify(value);\n}",
|
| 21 |
+
"after": " if(typeof value==='number') {\n if(!Number.isFinite(value)) throw new Error('D1 JSON numbers must be finite');\n if(!Number.isInteger(value)&&Math.abs(value)<1e-4) return value.toExponential().replace(/e([+-])(\\d+)$/,(all,sign,digits)=>'e'+sign+digits.padStart(2,'0'));\n }\n return JSON.stringify(value);\n}",
|
| 22 |
+
"purpose": "Finite small fractional Python-style exponent serialization"
|
| 23 |
+
}
|
| 24 |
+
],
|
| 25 |
+
"numeric_type_caveat": "JS Number cannot recover Python int versus integral-float distinctions; use preformatted strings for exact source lexical semantics",
|
| 26 |
+
"old_helper_untouched": true,
|
| 27 |
+
"other_helper_bytes_exact": true
|
| 28 |
+
}
|
provenance/selected-release-audit.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
provenance/selection.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"selection_lock": {
|
| 3 |
+
"path": "d1-visual-adaptation-balanced-v3/selection-lock.json",
|
| 4 |
+
"bytes": 22579,
|
| 5 |
+
"sha256": "4ab2441d9b3cf7742957a374988fc50fc400b29081b7c38b6920be88cd65bb19"
|
| 6 |
+
},
|
| 7 |
+
"epoch": 6,
|
| 8 |
+
"stage": "projector_head_text_lora",
|
| 9 |
+
"validation_only": true,
|
| 10 |
+
"test_used_for_selection": false,
|
| 11 |
+
"source_A_sha256": "34c45c2f4cb8f488f9b17d7497bdadd392fc10fe79f8bd9d31590f1605c751b7",
|
| 12 |
+
"selected_delta": {
|
| 13 |
+
"path": "d1-visual-adaptation-balanced-v3/runs/projector_head_text_lora/epoch-06.safetensors",
|
| 14 |
+
"bytes": 138678764,
|
| 15 |
+
"sha256": "82b6844524adf1ff1f7add1c9ef57475af5fcfa07ada10b9edf70c4d24c1ba35"
|
| 16 |
+
},
|
| 17 |
+
"merged_checkpoint_file": {
|
| 18 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/model.safetensors",
|
| 19 |
+
"bytes": 1899912876,
|
| 20 |
+
"sha256": "75ab6d7d0ec2966c969a95c548b91f4015b07cba82fa839fcfb5c19b40e9f940"
|
| 21 |
+
},
|
| 22 |
+
"source_pin": {
|
| 23 |
+
"model_id": "LiquidAI/d1-omni-600M",
|
| 24 |
+
"revision": "02b55d7076f15129e59ab3f94783f32c4b088674"
|
| 25 |
+
},
|
| 26 |
+
"policy_sha256": "1689b1b3b8091c8008599b2bfa60a4aa4b683b5d83aecb4161ab991de0b9e78e",
|
| 27 |
+
"source_artifact_manifest": {
|
| 28 |
+
"path": "d1-visual-adaptation-balanced-v3/artifacts/runtime/projector_head_text_lora/manifest.json",
|
| 29 |
+
"bytes": 136085,
|
| 30 |
+
"sha256": "5c2937de72434a36977d8b4ad1365860046706a04891a2d7cdaa55e1386fa11a"
|
| 31 |
+
}
|
| 32 |
+
}
|
provenance/synthetic-evaluation.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
provenance/upstream-source/README.md
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: other
|
| 4 |
+
license_name: lfm1.0
|
| 5 |
+
license_link: LICENSE
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- de
|
| 9 |
+
- es
|
| 10 |
+
- fr
|
| 11 |
+
- it
|
| 12 |
+
- nl
|
| 13 |
+
- pl
|
| 14 |
+
- pt
|
| 15 |
+
- ar
|
| 16 |
+
- hi
|
| 17 |
+
- ja
|
| 18 |
+
- ru
|
| 19 |
+
- tr
|
| 20 |
+
- vi
|
| 21 |
+
- zh
|
| 22 |
+
pipeline_tag: image-text-to-text
|
| 23 |
+
base_model: LiquidAI/LFM2.5-Encoder-350M
|
| 24 |
+
tags:
|
| 25 |
+
- liquid
|
| 26 |
+
- lfm2.5
|
| 27 |
+
- edge
|
| 28 |
+
- decision
|
| 29 |
+
- classification
|
| 30 |
+
- calibration
|
| 31 |
+
- system-one
|
| 32 |
+
- multimodal
|
| 33 |
+
- vision
|
| 34 |
+
- audio
|
| 35 |
+
- decision-model
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
<div align="center">
|
| 39 |
+
<img
|
| 40 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png"
|
| 41 |
+
alt="Liquid AI"
|
| 42 |
+
style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 43 |
+
/>
|
| 44 |
+
<div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
|
| 45 |
+
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> •
|
| 46 |
+
<a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> •
|
| 47 |
+
<a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
# d1-omni-600M
|
| 52 |
+
|
| 53 |
+
d1-omni-600M is a 600M parameter **decision model** built on [LFM2.5-Encoder-350M](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M).
|
| 54 |
+
You give it a state (text or JSON, with images or a voice clip) and a set of named questions. It returns typed
|
| 55 |
+
answers with **zero output tokens**: every answer is read directly from the model's distribution over the
|
| 56 |
+
options, with no generation and no parsing.
|
| 57 |
+
|
| 58 |
+
- **Vision-language**: text and images (tiled for large frames, several images per state) in a single forward pass.
|
| 59 |
+
- **Audio-language**: text and up to 30 s of speech in a single forward pass.
|
| 60 |
+
- **Edge-sized**: 587M parameters: a 381M shared trunk and decision head, a 94M vision encoder and a
|
| 61 |
+
112M audio encoder. Every modality runs the same trunk weights.
|
| 62 |
+
|
| 63 |
+
Find more information about open d1 in our [blog post](https://www.liquid.ai/blog/open-d1).
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
|
| 67 |
+
## 🗒️ Model Details
|
| 68 |
+
|
| 69 |
+
| Model | Parameters | Description |
|
| 70 |
+
|---|---|---|
|
| 71 |
+
| [LFM2.5-Encoder-350M](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M) | 350M | General-purpose encoder model (base) |
|
| 72 |
+
| **[d1-omni-600M](https://huggingface.co/LiquidAI/d1-omni-600M)** | 587M | Post-trained for single-pass decisions over text, images and speech |
|
| 73 |
+
|
| 74 |
+
- **Total parameters**: 587M
|
| 75 |
+
- **Vision encoder**: SigLIP2 vision tower from [LFM2.5-VL-450M](https://huggingface.co/LiquidAI/LFM2.5-VL-450M)
|
| 76 |
+
- **Audio encoder**: 17-layer FastConformer
|
| 77 |
+
- **Context length**: 16,384 tokens (text, image and audio positions together); with images, the state and question
|
| 78 |
+
text is cut to 896 tokens, as trained
|
| 79 |
+
- **Vocabulary size**: 65,536
|
| 80 |
+
|
| 81 |
+
We recommend d1-omni-600M wherever a pipeline needs a yes/no, a pick from named options, or a rating:
|
| 82 |
+
routing and triage, moderation, intent and topic classification, voice-command routing, extraction checks,
|
| 83 |
+
reranking, agent guardrails, and visual inspection. It is not a chat model and does not write text.
|
| 84 |
+
|
| 85 |
+
> [!WARNING]
|
| 86 |
+
> ⚠️ Audio capabilities were trained on requests between an English speaker and an assistant. Training tasks include what kind of utterance
|
| 87 |
+
> it is, its topic, and what the speaker wants. Clips are also cut at 30 seconds.
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
## 🏃 How to use
|
| 91 |
+
|
| 92 |
+
Install the dependencies (requires `transformers>=5.15`):
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
pip install "transformers>=5.15" torch torchvision pillow soundfile
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
The model ships its own code, so load it with `trust_remote_code=True`:
|
| 99 |
+
|
| 100 |
+
```python
|
| 101 |
+
import io
|
| 102 |
+
from urllib.request import urlopen
|
| 103 |
+
|
| 104 |
+
import soundfile as sf
|
| 105 |
+
import torch
|
| 106 |
+
from transformers import AutoModel
|
| 107 |
+
from transformers.image_utils import load_image
|
| 108 |
+
|
| 109 |
+
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
| 110 |
+
dtype = torch.float32 if device == "cpu" else torch.float16
|
| 111 |
+
model = AutoModel.from_pretrained("LiquidAI/d1-omni-600M", trust_remote_code=True, dtype=dtype).to(device)
|
| 112 |
+
|
| 113 |
+
# Text: several named questions over one state, answered in one pass
|
| 114 |
+
questions = {
|
| 115 |
+
"refund": {
|
| 116 |
+
"type": "noul",
|
| 117 |
+
"instructions": "Is the customer asking for a refund?",
|
| 118 |
+
},
|
| 119 |
+
"team": {
|
| 120 |
+
"type": "choice",
|
| 121 |
+
"instructions": "Which team should handle this?",
|
| 122 |
+
"criteria": {
|
| 123 |
+
"billing": "Charges, refunds, invoices",
|
| 124 |
+
"technical": "App or site faults",
|
| 125 |
+
"fraud": "Suspected unauthorised use",
|
| 126 |
+
},
|
| 127 |
+
},
|
| 128 |
+
"urgency": {
|
| 129 |
+
"type": "score",
|
| 130 |
+
"instructions": "How urgent is this?",
|
| 131 |
+
"criteria": ["Can wait", "Today", "Blocking the customer now"],
|
| 132 |
+
},
|
| 133 |
+
}
|
| 134 |
+
print(model.system_one("I was charged twice this month, please refund one of them.", questions))
|
| 135 |
+
|
| 136 |
+
# Image: the photo is the whole state
|
| 137 |
+
image = load_image("http://images.cocodataset.org/val2017/000000039769.jpg") # two cats on a sofa
|
| 138 |
+
cats = {
|
| 139 |
+
"type": "choice",
|
| 140 |
+
"instructions": "How many cats are there?",
|
| 141 |
+
"criteria": {"one": "One", "two": "Two", "more": "Three or more"},
|
| 142 |
+
}
|
| 143 |
+
print(model.system_one(None, {"cats": cats}, images=[image]))
|
| 144 |
+
|
| 145 |
+
# Text + audio: one 16 kHz mono clip
|
| 146 |
+
url = "https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac"
|
| 147 |
+
audio, rate = sf.read(io.BytesIO(urlopen(url).read()), dtype="int16")
|
| 148 |
+
topic = {
|
| 149 |
+
"type": "choice",
|
| 150 |
+
"instructions": "What is the speaker talking about?",
|
| 151 |
+
"criteria": {"food": "Food and meals", "travel": "Travel and transport", "weather": "The weather"},
|
| 152 |
+
}
|
| 153 |
+
print(model.system_one("Voice note from a user.", {"topic": topic}, audio=audio))
|
| 154 |
+
|
| 155 |
+
# Batch: many requests in one call
|
| 156 |
+
tickets = ["Where is my parcel? It was due Monday.", "The app crashes when I open settings."]
|
| 157 |
+
print(model.system_one_batch([(t, {"team": questions["team"]}) for t in tickets]))
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
| call | |
|
| 161 |
+
|---|---|
|
| 162 |
+
| `system_one(state, questions, images=None, audio=None)` | Named questions over one state, and its images or its audio clip. The media are encoded once for all questions. |
|
| 163 |
+
| `system_one_batch([(state, questions[, images[, audio]]), ...])` | Many requests, batched together. |
|
| 164 |
+
| `probabilities(state, questions, images=None, audio=None)` | The raw distributions, in option order. |
|
| 165 |
+
|
| 166 |
+
A state is a string, any JSON value, or `None` when the images or the audio are the whole state. `images` is a PIL
|
| 167 |
+
image or a list of them; `audio` is one 16 kHz mono clip as int16 or float samples. A request
|
| 168 |
+
carries images or audio, not both: passing both raises a `ValueError`.
|
| 169 |
+
|
| 170 |
+
The model was trained in float32. On GPUs, float16 is faster and keeps the float32 answers: on our checks it
|
| 171 |
+
gave the same top answer on every text (243), image (214) and audio (416) row. Avoid bfloat16, which changed the
|
| 172 |
+
top answer on 0.8% of text and 1.7% of audio rows.
|
| 173 |
+
|
| 174 |
+
### Questions and answers
|
| 175 |
+
|
| 176 |
+
Questions follow the Decision Index schema: `type`, `instructions`, and `criteria`.
|
| 177 |
+
|
| 178 |
+
| `type` | `criteria` | answer fields |
|
| 179 |
+
|---|---|---|
|
| 180 |
+
| `noul`: yes or no | optional: `{"true": "...", "false": "..."}` to define each side | `noul`: P(yes) |
|
| 181 |
+
| `choice`: one of named options | `{name: description}` | `choice`, `confidence`, `probabilities` |
|
| 182 |
+
| `score`: 2 to 10 ordered levels | a list of level descriptions, lowest first | `score` (the expected level), `confidence`, `probabilities`, `legend` |
|
| 183 |
+
|
| 184 |
+
With audio, questions are written the way the audio questions were trained: choice options by their description
|
| 185 |
+
(`option_000: ...`), yes/no as plain yes or no. Answers still come back under your option names.
|
| 186 |
+
|
| 187 |
+
Each call returns `{"answers": {name: answer}, "usage": {"input_tokens": n, "output_tokens": 0}}`, where
|
| 188 |
+
`input_tokens` counts every position the trunk read.
|
| 189 |
+
|
| 190 |
+
Text answers are calibrated with per-type temperatures stored in `config.json`; image and audio answers are the
|
| 191 |
+
model's softmax as trained.
|
| 192 |
+
|
| 193 |
+
## ⚡ Speed
|
| 194 |
+
|
| 195 |
+
We don't report inference numbers for d1-omni-600M as it is an early research release and is under active development.
|
| 196 |
+
|
| 197 |
+
## 📊 Performance
|
| 198 |
+
|
| 199 |
+
### Decision Index 0.2.1
|
| 200 |
+
|
| 201 |
+
We scored d1-omni-600M and d1-3B with the official scorer (not leaderboard submissions). All other rows come from the
|
| 202 |
+
public leaderboard v0.2.1.
|
| 203 |
+
|
| 204 |
+
| Model | Size | Decision Index | Knowledge | Language | Retrieval | Tools | Arts |
|
| 205 |
+
|---|---:|---:|---:|---:|---:|---:|---:|
|
| 206 |
+
| Winnow-12B | 12B | 50.02 | 33.8 | 56.0 | 54.0 | 71.0 | 30.0 |
|
| 207 |
+
| d1-3B | 3B | 48.57 | 23.8 | 56.4 | 52.8 | **74.5** | **36.3** |
|
| 208 |
+
| Decider 35B-A3B | 36B | 47.11 | 31.8 | 55.5 | 54.7 | 56.5 | 32.6 |
|
| 209 |
+
| JPT-9B | 9.7B | 46.89 | 31.7 | 56.7 | 44.6 | 67.0 | 28.6 |
|
| 210 |
+
| Decision 1.0 Lux | 9.7B | 43.49 | 30.9 | 48.0 | 50.0 | 57.2 | 26.4 |
|
| 211 |
+
| JPT-4B | 4.7B | 43.04 | 28.7 | 52.5 | 45.0 | 57.2 | 25.8 |
|
| 212 |
+
| Jet v6.2 | 4.7B | 42.60 | 28.7 | 43.9 | 48.2 | 62.9 | 27.0 |
|
| 213 |
+
| Decider 4B | 4.7B | 40.70 | 25.7 | 46.0 | 44.7 | 58.6 | 25.0 |
|
| 214 |
+
| Winnow-E4B | 8.0B | 39.89 | 22.3 | 45.1 | 43.8 | 62.5 | 22.8 |
|
| 215 |
+
| Decider 2B | 2.3B | 28.97 | 14.9 | 32.6 | 37.3 | 42.4 | 14.6 |
|
| 216 |
+
| **d1-omni-600M** | **587M** | **15.95** | 8.3 | 12.9 | 35.0 | 15.1 | 6.8 |
|
| 217 |
+
|
| 218 |
+
### Benchmarks as decisions
|
| 219 |
+
|
| 220 |
+
Besides the Decision Index, we added a few other internal evaluations based on public benchmarks. HelpSteer2 is
|
| 221 |
+
left out: it may overlap with d1-omni-600M's training data.
|
| 222 |
+
|
| 223 |
+
| Benchmark | d1-omni-600M | d1-3B | Decider 4B | Decider 2B |
|
| 224 |
+
|---|---:|---:|---:|---:|
|
| 225 |
+
| SQuAD 2.0 | 74.0 | **85.3** | 76.0 | 67.7 |
|
| 226 |
+
| Civil Comments | **95.8** | 93.0 | 92.8 | 93.6 |
|
| 227 |
+
| MASSIVE intent | 86.1 | 87.3 | **88.3** | 81.1 |
|
| 228 |
+
| PubMedQA | 61.3 | **66.0** | 63.3 | 65.7 |
|
| 229 |
+
| BoolQ | 77.7 | 86.7 | **89.0** | 87.3 |
|
| 230 |
+
| XNLI | 74.7 | 85.0 | **88.6** | 85.0 |
|
| 231 |
+
| PAWS-X | **79.5** | 76.9 | 69.8 | 59.5 |
|
| 232 |
+
| **Mean** | 78.4 | **82.9** | 81.1 | 77.1 |
|
| 233 |
+
|
| 234 |
+
d1-omni-600M also scores 76.9 on [Fast Decisions](https://huggingface.co/datasets/fastino/fast-decisions) (dev split).
|
| 235 |
+
|
| 236 |
+
## 📬 Contact
|
| 237 |
+
|
| 238 |
+
- Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
|
| 239 |
+
- If you are interested in custom solutions with edge deployment, please contact [our sales team](https://www.liquid.ai/contact).
|
| 240 |
+
|
| 241 |
+
## Citation
|
| 242 |
+
|
| 243 |
+
```bibtex
|
| 244 |
+
@article{liquidAI2026opend1,
|
| 245 |
+
author = {Liquid AI},
|
| 246 |
+
title = {Open d1: Edge decision models for text, vision, and audio},
|
| 247 |
+
journal = {Liquid AI Blog},
|
| 248 |
+
year = {2026},
|
| 249 |
+
note = {https://www.liquid.ai/blog/d1-open},
|
| 250 |
+
}
|
| 251 |
+
```
|
| 252 |
+
|
| 253 |
+
```bibtex
|
| 254 |
+
@article{liquidai2025lfm2,
|
| 255 |
+
title = {LFM2 Technical Report},
|
| 256 |
+
author = {Liquid AI},
|
| 257 |
+
journal = {arXiv preprint arXiv:2511.23404},
|
| 258 |
+
year = {2025}
|
| 259 |
+
}
|
| 260 |
+
```
|
provenance/upstream-source/audio.py
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Speech to prefix embeddings: a log-mel front end, a 17-layer FastConformer, an MLP adapter and a residual.
|
| 2 |
+
|
| 3 |
+
16 kHz mono audio (up to 30 s; clips under 0.5 s are padded) -> 128 normalised log-mel features every 10 ms ->
|
| 4 |
+
8x subsampling -> conformer -> adapter 512 -> 1024 -> residual correction. One prefix embedding per 80 ms.
|
| 5 |
+
The conformer and adapter come from LFM2-Audio (NVIDIA Canary FastConformer lineage), with NeMo's module names.
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
import math
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
import torch
|
| 14 |
+
import torch.nn as nn
|
| 15 |
+
import torch.nn.functional as F
|
| 16 |
+
|
| 17 |
+
SAMPLE_RATE, MIN_SAMPLES, MAX_SECONDS = 16000, 8000, 30
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def waveform(audio) -> torch.Tensor:
|
| 21 |
+
"""Mono 16 kHz int16 PCM or float samples in [-1, 1] -> float32 (1, N), cut to 30 s, padded to 0.5 s."""
|
| 22 |
+
x = audio.detach().cpu().numpy() if isinstance(audio, torch.Tensor) else np.asarray(audio)
|
| 23 |
+
if x.ndim != 1:
|
| 24 |
+
raise ValueError("audio must be mono: a 1-D array of 16 kHz samples")
|
| 25 |
+
x = x[: MAX_SECONDS * SAMPLE_RATE]
|
| 26 |
+
x = x.astype(np.float32) / np.float32(32768.0) if x.dtype == np.int16 else x.astype(np.float32)
|
| 27 |
+
if len(x) < MIN_SAMPLES:
|
| 28 |
+
x = np.pad(x, (0, MIN_SAMPLES - len(x)))
|
| 29 |
+
return torch.from_numpy(x)[None]
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def slaney_filterbank(sr: int = SAMPLE_RATE, n_fft: int = 512, n_mels: int = 128) -> np.ndarray:
|
| 33 |
+
"""librosa.filters.mel(sr, n_fft, n_mels, norm="slaney") in float32, computed as librosa computes it."""
|
| 34 |
+
f_sp, min_log_hz, logstep = 200.0 / 3, 1000.0, np.log(6.4) / 27.0
|
| 35 |
+
min_log_mel = min_log_hz / f_sp
|
| 36 |
+
|
| 37 |
+
def hz_to_mel(f):
|
| 38 |
+
f = np.asanyarray(f, dtype=np.float64)[()]
|
| 39 |
+
return min_log_mel + np.log(f / min_log_hz) / logstep if f >= min_log_hz else f / f_sp
|
| 40 |
+
|
| 41 |
+
def mel_to_hz(m):
|
| 42 |
+
m = np.asanyarray(m, dtype=np.float64)
|
| 43 |
+
f = f_sp * m
|
| 44 |
+
high = m >= min_log_mel
|
| 45 |
+
f[high] = min_log_hz * np.exp(logstep * (m[high] - min_log_mel))
|
| 46 |
+
return f
|
| 47 |
+
|
| 48 |
+
weights = np.zeros((n_mels, 1 + n_fft // 2), dtype=np.float32)
|
| 49 |
+
mel_f = mel_to_hz(np.linspace(hz_to_mel(0.0), hz_to_mel(sr / 2), n_mels + 2))
|
| 50 |
+
fdiff = np.diff(mel_f)
|
| 51 |
+
ramps = np.subtract.outer(mel_f, np.fft.rfftfreq(n=n_fft, d=1.0 / sr))
|
| 52 |
+
for i in range(n_mels):
|
| 53 |
+
weights[i] = np.maximum(0, np.minimum(-ramps[i] / fdiff[i], ramps[i + 2] / fdiff[i + 1]))
|
| 54 |
+
weights *= (2.0 / (mel_f[2:n_mels + 2] - mel_f[:n_mels]))[:, np.newaxis]
|
| 55 |
+
return weights
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
class MelFrontend(nn.Module):
|
| 59 |
+
"""NeMo's FilterbankFeatures in eval mode: preemphasis, |STFT|^2, Slaney mel, log, per-feature norm.
|
| 60 |
+
Always float32, whatever the model's dtype."""
|
| 61 |
+
|
| 62 |
+
def __init__(self, features: int = 128, n_fft: int = 512, window: int = 400, hop: int = 160):
|
| 63 |
+
super().__init__()
|
| 64 |
+
self.n_fft, self.window, self.hop, self.features = n_fft, window, hop, features
|
| 65 |
+
self._fb = None # built on first use, never a buffer, so it is never cast or put on the meta device
|
| 66 |
+
|
| 67 |
+
@torch.no_grad()
|
| 68 |
+
def forward(self, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:
|
| 69 |
+
x = x.float()
|
| 70 |
+
n = torch.tensor([x.shape[1]], device=x.device)
|
| 71 |
+
frames = torch.floor_divide(n + self.n_fft // 2 * 2 - self.n_fft, self.hop)
|
| 72 |
+
x = torch.cat((x[:, :1], x[:, 1:] - 0.97 * x[:, :-1]), dim=1)
|
| 73 |
+
window = torch.hann_window(self.window, periodic=False).to(x.device) # built on the CPU, as NeMo does
|
| 74 |
+
x = torch.stft(x, n_fft=self.n_fft, hop_length=self.hop, win_length=self.window, center=True,
|
| 75 |
+
window=window, return_complex=True, pad_mode="constant")
|
| 76 |
+
x = torch.sqrt(torch.view_as_real(x).pow(2).sum(-1)).pow(2.0)
|
| 77 |
+
if self._fb is None or self._fb.device != x.device:
|
| 78 |
+
self._fb = torch.from_numpy(slaney_filterbank(n_fft=self.n_fft, n_mels=self.features))[None].to(x.device)
|
| 79 |
+
x = torch.log(torch.matmul(self._fb, x) + 2**-24)
|
| 80 |
+
valid = torch.arange(x.shape[2], device=x.device)[None] < frames[:, None]
|
| 81 |
+
count = valid.sum(1)
|
| 82 |
+
mean = torch.where(valid[:, None], x, 0.0).sum(2) / count[:, None]
|
| 83 |
+
std = torch.sqrt(torch.where(valid[:, None], x - mean[:, :, None], 0.0).pow(2).sum(2) / (count[:, None] - 1.0))
|
| 84 |
+
x = (x - mean[:, :, None]) / (std.masked_fill(std.isnan(), 0.0) + 1e-5)[:, :, None]
|
| 85 |
+
return x.masked_fill(~valid[:, None], 0.0), frames
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
class ConvSubsampling(nn.Module):
|
| 89 |
+
"""8x time subsampling: a 3x3 stride-2 conv, then two depthwise-separable stride-2 convs, then a linear."""
|
| 90 |
+
|
| 91 |
+
def __init__(self, feat_in: int, channels: int, d_model: int):
|
| 92 |
+
super().__init__()
|
| 93 |
+
self.conv = nn.Sequential(
|
| 94 |
+
nn.Conv2d(1, channels, 3, 2, 1), nn.ReLU(True),
|
| 95 |
+
nn.Conv2d(channels, channels, 3, 2, 1, groups=channels), nn.Conv2d(channels, channels, 1), nn.ReLU(True),
|
| 96 |
+
nn.Conv2d(channels, channels, 3, 2, 1, groups=channels), nn.Conv2d(channels, channels, 1), nn.ReLU(True))
|
| 97 |
+
freq = feat_in
|
| 98 |
+
for _ in range(3):
|
| 99 |
+
freq = (freq - 1) // 2 + 1
|
| 100 |
+
self.out = nn.Linear(channels * freq, d_model)
|
| 101 |
+
|
| 102 |
+
def forward(self, x: torch.Tensor, lengths: torch.Tensor):
|
| 103 |
+
x = x.unsqueeze(1)
|
| 104 |
+
lengths = lengths.float()
|
| 105 |
+
for layer in self.conv:
|
| 106 |
+
x = x * _time_mask(x, lengths)
|
| 107 |
+
x = layer(x)
|
| 108 |
+
if isinstance(layer, nn.Conv2d) and layer.stride != (1, 1):
|
| 109 |
+
lengths = torch.div(lengths + 2 - 3, 2, rounding_mode="floor") + 1
|
| 110 |
+
x = x * _time_mask(x, lengths)
|
| 111 |
+
b, c, t, f = x.shape
|
| 112 |
+
return self.out(x.transpose(1, 2).reshape(b, t, c * f)), lengths.long()
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _time_mask(x: torch.Tensor, lengths: torch.Tensor) -> torch.Tensor:
|
| 116 |
+
t = torch.arange(x.shape[2], device=x.device)[None] < lengths.long()[:, None]
|
| 117 |
+
return t[:, None, :, None].to(x.dtype)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
class FeedForward(nn.Module):
|
| 121 |
+
def __init__(self, d: int, d_ff: int):
|
| 122 |
+
super().__init__()
|
| 123 |
+
self.linear1, self.linear2 = nn.Linear(d, d_ff), nn.Linear(d_ff, d)
|
| 124 |
+
|
| 125 |
+
def forward(self, x):
|
| 126 |
+
return self.linear2(F.silu(self.linear1(x)))
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
class RelPositionAttention(nn.Module):
|
| 130 |
+
"""Transformer-XL relative-position attention with per-layer biases u and v."""
|
| 131 |
+
|
| 132 |
+
def __init__(self, d: int, heads: int):
|
| 133 |
+
super().__init__()
|
| 134 |
+
self.h, self.d_k = heads, d // heads
|
| 135 |
+
self.linear_q, self.linear_k, self.linear_v = nn.Linear(d, d), nn.Linear(d, d), nn.Linear(d, d)
|
| 136 |
+
self.linear_out = nn.Linear(d, d)
|
| 137 |
+
self.linear_pos = nn.Linear(d, d, bias=False)
|
| 138 |
+
self.pos_bias_u = nn.Parameter(torch.zeros(heads, self.d_k))
|
| 139 |
+
self.pos_bias_v = nn.Parameter(torch.zeros(heads, self.d_k))
|
| 140 |
+
|
| 141 |
+
def forward(self, x, pos_emb, mask):
|
| 142 |
+
b, t, _ = x.shape
|
| 143 |
+
q = self.linear_q(x).view(b, t, self.h, self.d_k)
|
| 144 |
+
k = self.linear_k(x).view(b, t, self.h, self.d_k).transpose(1, 2)
|
| 145 |
+
v = self.linear_v(x).view(b, t, self.h, self.d_k).transpose(1, 2)
|
| 146 |
+
p = self.linear_pos(pos_emb).view(1, -1, self.h, self.d_k).transpose(1, 2)
|
| 147 |
+
ac = torch.matmul((q + self.pos_bias_u).transpose(1, 2), k.transpose(-2, -1))
|
| 148 |
+
bd = torch.matmul((q + self.pos_bias_v).transpose(1, 2), p.transpose(-2, -1))
|
| 149 |
+
bh, hh, qlen, pos_len = bd.shape
|
| 150 |
+
bd = F.pad(bd, (1, 0)).view(bh, hh, pos_len + 1, qlen)[:, :, 1:].view(bh, hh, qlen, pos_len)
|
| 151 |
+
scores = (ac + bd[:, :, :, :t]) / math.sqrt(self.d_k)
|
| 152 |
+
scores = scores.masked_fill(mask[:, None], -10000.0)
|
| 153 |
+
attn = torch.softmax(scores, dim=-1).masked_fill(mask[:, None], 0.0)
|
| 154 |
+
return self.linear_out(torch.matmul(attn, v).transpose(1, 2).reshape(b, t, -1))
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
class ConvModule(nn.Module):
|
| 158 |
+
def __init__(self, d: int, kernel: int):
|
| 159 |
+
super().__init__()
|
| 160 |
+
self.pointwise_conv1 = nn.Conv1d(d, 2 * d, 1)
|
| 161 |
+
self.depthwise_conv = nn.Conv1d(d, d, kernel, groups=d)
|
| 162 |
+
self.batch_norm = nn.BatchNorm1d(d)
|
| 163 |
+
self.pointwise_conv2 = nn.Conv1d(d, d, 1)
|
| 164 |
+
self.pad = (kernel - 1) // 2
|
| 165 |
+
|
| 166 |
+
def forward(self, x, pad_mask):
|
| 167 |
+
x = F.glu(self.pointwise_conv1(x.transpose(1, 2)), dim=1)
|
| 168 |
+
x = self.depthwise_conv(F.pad(x.masked_fill(pad_mask[:, None], 0.0), (self.pad, self.pad)))
|
| 169 |
+
return self.pointwise_conv2(F.silu(self.batch_norm(x))).transpose(1, 2)
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
class ConformerLayer(nn.Module):
|
| 173 |
+
def __init__(self, d: int, d_ff: int, heads: int, kernel: int):
|
| 174 |
+
super().__init__()
|
| 175 |
+
self.norm_feed_forward1, self.feed_forward1 = nn.LayerNorm(d), FeedForward(d, d_ff)
|
| 176 |
+
self.norm_self_att, self.self_attn = nn.LayerNorm(d), RelPositionAttention(d, heads)
|
| 177 |
+
self.norm_conv, self.conv = nn.LayerNorm(d), ConvModule(d, kernel)
|
| 178 |
+
self.norm_feed_forward2, self.feed_forward2 = nn.LayerNorm(d), FeedForward(d, d_ff)
|
| 179 |
+
self.norm_out = nn.LayerNorm(d)
|
| 180 |
+
|
| 181 |
+
def forward(self, x, pos_emb, att_mask, pad_mask):
|
| 182 |
+
x = x + self.feed_forward1(self.norm_feed_forward1(x)) * 0.5
|
| 183 |
+
x = x + self.self_attn(self.norm_self_att(x), pos_emb, att_mask)
|
| 184 |
+
x = x + self.conv(self.norm_conv(x), pad_mask)
|
| 185 |
+
x = x + self.feed_forward2(self.norm_feed_forward2(x)) * 0.5
|
| 186 |
+
return self.norm_out(x)
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
class Conformer(nn.Module):
|
| 190 |
+
def __init__(self, cfg: dict):
|
| 191 |
+
super().__init__()
|
| 192 |
+
d = cfg["d_model"]
|
| 193 |
+
self.d_model = d
|
| 194 |
+
self.pre_encode = ConvSubsampling(cfg["feat_in"], cfg["subsampling_conv_channels"], d)
|
| 195 |
+
self.layers = nn.ModuleList(ConformerLayer(d, d * cfg["ff_expansion_factor"], cfg["n_heads"],
|
| 196 |
+
cfg["conv_kernel_size"]) for _ in range(cfg["n_layers"]))
|
| 197 |
+
|
| 198 |
+
def pos_emb(self, t: int, device) -> torch.Tensor:
|
| 199 |
+
"""Sinusoids for relative positions t-1 .. -(t-1), built on the CPU, as NeMo does."""
|
| 200 |
+
positions = torch.arange(t - 1, -t, -1, dtype=torch.float32)[:, None]
|
| 201 |
+
div = torch.exp(torch.arange(0, self.d_model, 2, dtype=torch.float32) * -(math.log(10000.0) / self.d_model))
|
| 202 |
+
pe = torch.zeros(len(positions), self.d_model)
|
| 203 |
+
pe[:, 0::2], pe[:, 1::2] = torch.sin(positions * div), torch.cos(positions * div)
|
| 204 |
+
return pe[None].to(device)
|
| 205 |
+
|
| 206 |
+
def forward(self, mel: torch.Tensor, lengths: torch.Tensor):
|
| 207 |
+
x, lengths = self.pre_encode(mel.transpose(1, 2), lengths)
|
| 208 |
+
t = x.shape[1]
|
| 209 |
+
valid = torch.arange(t, device=x.device)[None] < lengths[:, None]
|
| 210 |
+
att_mask = ~(valid[:, None, :] & valid[:, :, None])
|
| 211 |
+
pos_emb = self.pos_emb(t, x.device).to(x.dtype)
|
| 212 |
+
for layer in self.layers:
|
| 213 |
+
x = layer(x, pos_emb, att_mask, ~valid)
|
| 214 |
+
return x, lengths
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
class Adapter(nn.Module):
|
| 218 |
+
def __init__(self, d_in: int, d_out: int):
|
| 219 |
+
super().__init__()
|
| 220 |
+
self.norm, self.linear_1, self.linear_2 = nn.LayerNorm(d_in), nn.Linear(d_in, d_out), nn.Linear(d_out, d_out)
|
| 221 |
+
|
| 222 |
+
def forward(self, x):
|
| 223 |
+
return self.linear_2(F.gelu(self.linear_1(self.norm(x))))
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
class Residual(nn.Module):
|
| 227 |
+
"""x + up(GELU(down(LN(x)))), trained with the trunk to fit the adapter's output to it."""
|
| 228 |
+
|
| 229 |
+
def __init__(self, d: int, width: int):
|
| 230 |
+
super().__init__()
|
| 231 |
+
self.ln, self.down, self.up = nn.LayerNorm(d), nn.Linear(d, width), nn.Linear(width, d)
|
| 232 |
+
|
| 233 |
+
def forward(self, x):
|
| 234 |
+
return x + self.up(F.gelu(self.down(self.ln(x))))
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
class Audio(nn.Module):
|
| 238 |
+
def __init__(self, cfg: dict, out: int):
|
| 239 |
+
super().__init__()
|
| 240 |
+
self.frontend = MelFrontend(cfg["feat_in"])
|
| 241 |
+
self.encoder = Conformer(cfg)
|
| 242 |
+
self.adapter = Adapter(cfg["d_model"], out)
|
| 243 |
+
self.residual = Residual(out, cfg["residual_width"])
|
| 244 |
+
|
| 245 |
+
def forward(self, audio) -> torch.Tensor:
|
| 246 |
+
"""One clip -> (1, P, D) prefix embeddings."""
|
| 247 |
+
param = next(self.encoder.parameters())
|
| 248 |
+
mel, frames = self.frontend(waveform(audio).to(param.device))
|
| 249 |
+
x, lengths = self.encoder(mel.to(param.dtype), frames)
|
| 250 |
+
return self.residual(self.adapter(x[:, : int(lengths[0])]))
|
provenance/upstream-source/config.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"D1OmniModel"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "modeling_d1.D1OmniConfig",
|
| 7 |
+
"AutoModel": "modeling_d1.D1OmniModel"
|
| 8 |
+
},
|
| 9 |
+
"model_type": "d1_omni",
|
| 10 |
+
"dtype": "float32",
|
| 11 |
+
"max_length": 16384,
|
| 12 |
+
"image_text_length": 896,
|
| 13 |
+
"audio_text_length": 15360,
|
| 14 |
+
"head_layers": 2,
|
| 15 |
+
"projector_hidden_size": 2048,
|
| 16 |
+
"temperatures": {
|
| 17 |
+
"choice:11+": 1.372515082359314,
|
| 18 |
+
"choice:2": 1.7465145587921143,
|
| 19 |
+
"choice:3-5": 1.3998981714248657,
|
| 20 |
+
"choice:6-10": 1.1751071214675903,
|
| 21 |
+
"noul:2": 1.6663223505020142,
|
| 22 |
+
"score:3-5": 1.7301132678985596,
|
| 23 |
+
"score:6-10": 1.0,
|
| 24 |
+
"choice": 1.0,
|
| 25 |
+
"score": 1.0,
|
| 26 |
+
"noul": 1.0
|
| 27 |
+
},
|
| 28 |
+
"bos_token_id": 1,
|
| 29 |
+
"pad_token_id": 0,
|
| 30 |
+
"text_config": {
|
| 31 |
+
"vocab_size": 65536,
|
| 32 |
+
"hidden_size": 1024,
|
| 33 |
+
"intermediate_size": 6656,
|
| 34 |
+
"num_hidden_layers": 16,
|
| 35 |
+
"num_attention_heads": 16,
|
| 36 |
+
"num_key_value_heads": 8,
|
| 37 |
+
"layer_types": [
|
| 38 |
+
"conv",
|
| 39 |
+
"conv",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"conv",
|
| 42 |
+
"conv",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"conv",
|
| 45 |
+
"conv",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"conv",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"conv",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"conv",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"conv"
|
| 54 |
+
],
|
| 55 |
+
"norm_eps": 1e-05,
|
| 56 |
+
"conv_L_cache": 3,
|
| 57 |
+
"block_ffn_dim_multiplier": 1.0,
|
| 58 |
+
"block_multiple_of": 256,
|
| 59 |
+
"max_position_embeddings": 128000,
|
| 60 |
+
"rope_theta": 1000000.0
|
| 61 |
+
},
|
| 62 |
+
"vision_config": {
|
| 63 |
+
"attention_dropout": 0.0,
|
| 64 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 65 |
+
"hidden_size": 768,
|
| 66 |
+
"intermediate_size": 3072,
|
| 67 |
+
"layer_norm_eps": 1e-06,
|
| 68 |
+
"model_type": "siglip2_vision_model",
|
| 69 |
+
"num_attention_heads": 12,
|
| 70 |
+
"num_channels": 3,
|
| 71 |
+
"num_hidden_layers": 12,
|
| 72 |
+
"num_patches": 256,
|
| 73 |
+
"patch_size": 16,
|
| 74 |
+
"vision_use_head": false
|
| 75 |
+
},
|
| 76 |
+
"audio_config": {
|
| 77 |
+
"feat_in": 128,
|
| 78 |
+
"n_layers": 17,
|
| 79 |
+
"d_model": 512,
|
| 80 |
+
"subsampling_conv_channels": 256,
|
| 81 |
+
"ff_expansion_factor": 4,
|
| 82 |
+
"n_heads": 8,
|
| 83 |
+
"conv_kernel_size": 9,
|
| 84 |
+
"residual_width": 512
|
| 85 |
+
}
|
| 86 |
+
}
|
provenance/upstream-source/encoder.py
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The shared trunk and the decision head.
|
| 2 |
+
|
| 3 |
+
The trunk is LFM2.5-Encoder-350M: LFM2 blocks (10 short convolutions, 6 GQA attention layers) made bidirectional,
|
| 4 |
+
with a centred 3-tap convolution and no causal mask. Module names follow Hugging Face's LFM2.
|
| 5 |
+
|
| 6 |
+
An image or audio clip enters as a prefix of embeddings in front of the text. Prefix positions attend only to the
|
| 7 |
+
prefix and the convolution never lets them read the text, so the prefix is a function of the media alone; text
|
| 8 |
+
positions read everything. Text, image and audio calls run the same weights.
|
| 9 |
+
|
| 10 |
+
The head adds a question-type embedding, runs two pre-norm transformer layers over the text positions, and scores
|
| 11 |
+
the hidden state at each option marker with one shared MLP.
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
from __future__ import annotations
|
| 15 |
+
|
| 16 |
+
import torch
|
| 17 |
+
import torch.nn as nn
|
| 18 |
+
import torch.nn.functional as F
|
| 19 |
+
|
| 20 |
+
NEG = -1e9
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class RMSNorm(nn.Module):
|
| 24 |
+
def __init__(self, dim: int, eps: float):
|
| 25 |
+
super().__init__()
|
| 26 |
+
self.weight = nn.Parameter(torch.ones(dim))
|
| 27 |
+
self.eps = eps
|
| 28 |
+
|
| 29 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 30 |
+
dtype = x.dtype
|
| 31 |
+
x = x.float()
|
| 32 |
+
x = x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)
|
| 33 |
+
return self.weight * x.to(dtype)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
class Attention(nn.Module):
|
| 37 |
+
def __init__(self, cfg):
|
| 38 |
+
super().__init__()
|
| 39 |
+
d = cfg["hidden_size"]
|
| 40 |
+
self.heads, self.kv_heads = cfg["num_attention_heads"], cfg["num_key_value_heads"]
|
| 41 |
+
self.head_dim = d // self.heads
|
| 42 |
+
self.q_proj = nn.Linear(d, self.heads * self.head_dim, bias=False)
|
| 43 |
+
self.k_proj = nn.Linear(d, self.kv_heads * self.head_dim, bias=False)
|
| 44 |
+
self.v_proj = nn.Linear(d, self.kv_heads * self.head_dim, bias=False)
|
| 45 |
+
self.out_proj = nn.Linear(self.heads * self.head_dim, d, bias=False)
|
| 46 |
+
self.q_layernorm = RMSNorm(self.head_dim, cfg["norm_eps"])
|
| 47 |
+
self.k_layernorm = RMSNorm(self.head_dim, cfg["norm_eps"])
|
| 48 |
+
|
| 49 |
+
def forward(self, x, cos, sin, mask):
|
| 50 |
+
b, length, _ = x.shape
|
| 51 |
+
shape = (b, length, -1, self.head_dim)
|
| 52 |
+
q = self.q_layernorm(self.q_proj(x).view(shape)).transpose(1, 2)
|
| 53 |
+
k = self.k_layernorm(self.k_proj(x).view(shape)).transpose(1, 2)
|
| 54 |
+
v = self.v_proj(x).view(shape).transpose(1, 2)
|
| 55 |
+
q, k = q * cos + _rotate_half(q) * sin, k * cos + _rotate_half(k) * sin
|
| 56 |
+
groups = self.heads // self.kv_heads
|
| 57 |
+
k, v = k.repeat_interleave(groups, dim=1), v.repeat_interleave(groups, dim=1)
|
| 58 |
+
y = F.scaled_dot_product_attention(q, k, v, attn_mask=mask, scale=self.head_dim**-0.5)
|
| 59 |
+
return self.out_proj(y.transpose(1, 2).reshape(b, length, -1))
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
class ShortConv(nn.Module):
|
| 63 |
+
"""`out(C * conv(B * x))` with a centred 3-tap depthwise convolution."""
|
| 64 |
+
|
| 65 |
+
def __init__(self, cfg):
|
| 66 |
+
super().__init__()
|
| 67 |
+
d = cfg["hidden_size"]
|
| 68 |
+
self.conv = nn.Conv1d(d, d, cfg["conv_L_cache"], groups=d, bias=False, padding=cfg["conv_L_cache"] - 1)
|
| 69 |
+
self.in_proj = nn.Linear(d, 3 * d, bias=False)
|
| 70 |
+
self.out_proj = nn.Linear(d, d, bias=False)
|
| 71 |
+
|
| 72 |
+
def forward(self, x, pad, keep_right):
|
| 73 |
+
b, c, u = self.in_proj(x * pad[:, :, None]).transpose(-1, -2).chunk(3, dim=-2)
|
| 74 |
+
bx = b * u
|
| 75 |
+
w = self.conv.weight[:, 0, :]
|
| 76 |
+
length = bx.shape[-1]
|
| 77 |
+
xp = F.pad(bx, (1, 1))
|
| 78 |
+
right = xp[..., 2:2 + length] * keep_right[:, None, :] # media never reads the text
|
| 79 |
+
y = xp[..., 0:length] * w[:, 0, None]
|
| 80 |
+
y = y + xp[..., 1:1 + length] * w[:, 1, None]
|
| 81 |
+
y = y + right * w[:, 2, None]
|
| 82 |
+
return self.out_proj((c * y).transpose(-1, -2))
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
class MLP(nn.Module):
|
| 86 |
+
def __init__(self, cfg):
|
| 87 |
+
super().__init__()
|
| 88 |
+
hidden = int(2 * cfg["intermediate_size"] / 3)
|
| 89 |
+
hidden = int(cfg["block_ffn_dim_multiplier"] * hidden)
|
| 90 |
+
hidden = cfg["block_multiple_of"] * ((hidden + cfg["block_multiple_of"] - 1) // cfg["block_multiple_of"])
|
| 91 |
+
d = cfg["hidden_size"]
|
| 92 |
+
self.w1 = nn.Linear(d, hidden, bias=False)
|
| 93 |
+
self.w3 = nn.Linear(d, hidden, bias=False)
|
| 94 |
+
self.w2 = nn.Linear(hidden, d, bias=False)
|
| 95 |
+
|
| 96 |
+
def forward(self, x):
|
| 97 |
+
return self.w2(F.silu(self.w1(x)) * self.w3(x))
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
class Layer(nn.Module):
|
| 101 |
+
def __init__(self, cfg, kind: str):
|
| 102 |
+
super().__init__()
|
| 103 |
+
self.is_attention_layer = kind == "full_attention"
|
| 104 |
+
if self.is_attention_layer:
|
| 105 |
+
self.self_attn = Attention(cfg)
|
| 106 |
+
else:
|
| 107 |
+
self.conv = ShortConv(cfg)
|
| 108 |
+
self.feed_forward = MLP(cfg)
|
| 109 |
+
self.operator_norm = RMSNorm(cfg["hidden_size"], cfg["norm_eps"])
|
| 110 |
+
self.ffn_norm = RMSNorm(cfg["hidden_size"], cfg["norm_eps"])
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
class Trunk(nn.Module):
|
| 114 |
+
def __init__(self, cfg):
|
| 115 |
+
super().__init__()
|
| 116 |
+
self.embed_tokens = nn.Embedding(cfg["vocab_size"], cfg["hidden_size"])
|
| 117 |
+
self.layers = nn.ModuleList(Layer(cfg, kind) for kind in cfg["layer_types"])
|
| 118 |
+
self.embedding_norm = RMSNorm(cfg["hidden_size"], cfg["norm_eps"])
|
| 119 |
+
self.rope_theta = cfg["rope_theta"]
|
| 120 |
+
self.head_dim = cfg["hidden_size"] // cfg["num_attention_heads"]
|
| 121 |
+
|
| 122 |
+
def rope(self, length: int, x: torch.Tensor):
|
| 123 |
+
exponent = torch.arange(0, self.head_dim, 2, dtype=torch.int64).float() / self.head_dim
|
| 124 |
+
inv_freq = (1.0 / (self.rope_theta**exponent)).to(x.device) # on the CPU, as HF's LFM2 builds it
|
| 125 |
+
positions = torch.arange(length, device=x.device).float()
|
| 126 |
+
freqs = (inv_freq[None, :, None] @ positions[None, None, :]).transpose(1, 2)
|
| 127 |
+
emb = torch.cat((freqs, freqs), dim=-1)
|
| 128 |
+
return emb.cos().to(x.dtype)[:, None], emb.sin().to(x.dtype)[:, None]
|
| 129 |
+
|
| 130 |
+
def forward(self, h: torch.Tensor, pad: torch.Tensor, prefix: torch.Tensor) -> torch.Tensor:
|
| 131 |
+
"""`h` (B, L, D) embeddings, `pad` (B, L) True on real tokens, `prefix` (B,) media lengths (0 for text)."""
|
| 132 |
+
batch, length, _ = h.shape
|
| 133 |
+
t = torch.arange(length, device=h.device)[None]
|
| 134 |
+
media_query = t < prefix[:, None]
|
| 135 |
+
text_key = t >= prefix[:, None]
|
| 136 |
+
neg = max(NEG, torch.finfo(h.dtype).min) # -1e9 does not fit in float16
|
| 137 |
+
mask = torch.zeros(batch, 1, length, length, device=h.device, dtype=h.dtype)
|
| 138 |
+
mask = mask + ((~pad).float() * neg).to(h.dtype)[:, None, None, :]
|
| 139 |
+
mask = mask.masked_fill((media_query[:, :, None] & text_key[:, None, :])[:, None], neg)
|
| 140 |
+
keep_right = (t != prefix[:, None] - 1).to(h.dtype)
|
| 141 |
+
padf = pad.to(h.dtype)
|
| 142 |
+
cos, sin = self.rope(length, h)
|
| 143 |
+
for layer in self.layers:
|
| 144 |
+
x = layer.operator_norm(h)
|
| 145 |
+
if layer.is_attention_layer:
|
| 146 |
+
x = layer.self_attn(x, cos, sin, mask)
|
| 147 |
+
else:
|
| 148 |
+
x = layer.conv(x, padf, keep_right)
|
| 149 |
+
h = h + x
|
| 150 |
+
h = h + layer.feed_forward(layer.ffn_norm(h))
|
| 151 |
+
return self.embedding_norm(h)
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
class DecisionHead(nn.Module):
|
| 155 |
+
def __init__(self, d: int, layers: int):
|
| 156 |
+
super().__init__()
|
| 157 |
+
self.type_emb = nn.Embedding(3, d)
|
| 158 |
+
layer = nn.TransformerEncoderLayer(d, d // 64, 4 * d, 0.0, batch_first=True, norm_first=True)
|
| 159 |
+
self.head = nn.TransformerEncoder(layer, layers, enable_nested_tensor=False)
|
| 160 |
+
self.scorer = nn.Sequential(nn.LayerNorm(d), nn.Linear(d, d), nn.GELU(), nn.Linear(d, 1))
|
| 161 |
+
|
| 162 |
+
def forward(self, h, pad, marker_pos, marker_mask, qtype):
|
| 163 |
+
h = h + self.type_emb(qtype)[:, None, :]
|
| 164 |
+
for layer in self.head.layers:
|
| 165 |
+
h = layer(h, src_key_padding_mask=~pad)
|
| 166 |
+
g = torch.gather(h, 1, marker_pos[:, :, None].expand(-1, -1, h.size(-1)))
|
| 167 |
+
return self.scorer(g).squeeze(-1).float().masked_fill(~marker_mask, -1e4)
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def _rotate_half(x: torch.Tensor) -> torch.Tensor:
|
| 171 |
+
x1, x2 = x.chunk(2, dim=-1)
|
| 172 |
+
return torch.cat((-x2, x1), dim=-1)
|
provenance/upstream-source/modeling_d1.py
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""`AutoModel.from_pretrained(repo, trust_remote_code=True)`: d1-omni with the System One API.
|
| 2 |
+
|
| 3 |
+
model.system_one(state, {name: question}, images=None, audio=None)
|
| 4 |
+
model.system_one_batch([(state, {name: question}[, images[, audio]]), ...])
|
| 5 |
+
|
| 6 |
+
A state is a string or any JSON value. `images` is a PIL image or a list of them (in order); `audio` is one 16 kHz mono
|
| 7 |
+
clip (int16 PCM or float samples). A request carries images or audio, not both.
|
| 8 |
+
"""
|
| 9 |
+
|
| 10 |
+
from __future__ import annotations
|
| 11 |
+
|
| 12 |
+
from collections.abc import Mapping, Sequence
|
| 13 |
+
from functools import cached_property
|
| 14 |
+
from typing import Any
|
| 15 |
+
|
| 16 |
+
import torch
|
| 17 |
+
from transformers import PretrainedConfig, PreTrainedModel
|
| 18 |
+
|
| 19 |
+
from .audio import Audio
|
| 20 |
+
from .encoder import DecisionHead, Trunk
|
| 21 |
+
from .prompt import QTYPES, Question, answer, as_question, encode, temperature_key
|
| 22 |
+
from .vision import Vision
|
| 23 |
+
|
| 24 |
+
YES_NO = {"false": "no", "true": "yes"} # how image and audio questions were trained
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class D1OmniConfig(PretrainedConfig):
|
| 28 |
+
model_type = "d1_omni"
|
| 29 |
+
|
| 30 |
+
def __init__(self, text_config=None, vision_config=None, audio_config=None, projector_hidden_size=2048,
|
| 31 |
+
head_layers=2, max_length=16384, image_text_length=896,
|
| 32 |
+
audio_text_length=15360, temperatures=None, **kwargs):
|
| 33 |
+
self.text_config, self.vision_config, self.audio_config = text_config or {}, vision_config or {}, audio_config or {}
|
| 34 |
+
self.projector_hidden_size = projector_hidden_size
|
| 35 |
+
self.head_layers, self.max_length = head_layers, max_length
|
| 36 |
+
self.image_text_length, self.audio_text_length = image_text_length, audio_text_length
|
| 37 |
+
self.temperatures = temperatures or {}
|
| 38 |
+
super().__init__(**kwargs)
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
class D1OmniModel(PreTrainedModel):
|
| 42 |
+
config_class = D1OmniConfig
|
| 43 |
+
base_model_prefix = "d1"
|
| 44 |
+
main_input_name = "input_ids"
|
| 45 |
+
|
| 46 |
+
def __init__(self, config: D1OmniConfig):
|
| 47 |
+
super().__init__(config)
|
| 48 |
+
d = config.text_config["hidden_size"]
|
| 49 |
+
self.encoder = Trunk(config.text_config)
|
| 50 |
+
self.head = DecisionHead(d, config.head_layers)
|
| 51 |
+
self.vision = Vision(config.vision_config, config.projector_hidden_size, d)
|
| 52 |
+
self.audio = Audio(config.audio_config, d)
|
| 53 |
+
self.post_init()
|
| 54 |
+
|
| 55 |
+
def _init_weights(self, module):
|
| 56 |
+
pass
|
| 57 |
+
|
| 58 |
+
@cached_property
|
| 59 |
+
def tokenizer(self):
|
| 60 |
+
from transformers import AutoTokenizer
|
| 61 |
+
|
| 62 |
+
return AutoTokenizer.from_pretrained(self.name_or_path, trust_remote_code=True)
|
| 63 |
+
|
| 64 |
+
# ------------------------------------------------------------------ API
|
| 65 |
+
|
| 66 |
+
def system_one(self, state: Any, questions: Mapping[str, Any], images: Sequence | None = None,
|
| 67 |
+
audio=None) -> dict:
|
| 68 |
+
"""Named questions over one state, and its images or audio if any:
|
| 69 |
+
`{"answers": {name: answer}, "usage": {"input_tokens": n, "output_tokens": 0}}`."""
|
| 70 |
+
return self.system_one_batch([(state, questions, images, audio)])[0]
|
| 71 |
+
|
| 72 |
+
def system_one_batch(self, requests: Sequence[tuple]) -> list[dict]:
|
| 73 |
+
"""`(state, questions)`, `(state, questions, images)` or `(state, questions, images, audio)` requests."""
|
| 74 |
+
named = [{n: as_question(q) for n, q in r[1].items()} for r in requests]
|
| 75 |
+
done = self.probabilities_batch([(r[0], list(qs.values()), *r[2:]) for r, qs in zip(requests, named)],
|
| 76 |
+
_usage=True)
|
| 77 |
+
return [{"answers": {n: answer(q, p) for (n, q), p in zip(qs.items(), probs)},
|
| 78 |
+
"usage": {"input_tokens": read, "output_tokens": 0}}
|
| 79 |
+
for qs, (probs, read) in zip(named, done)]
|
| 80 |
+
|
| 81 |
+
def probabilities(self, state: Any, questions: Sequence, images: Sequence | None = None, audio=None) -> list:
|
| 82 |
+
"""Each question's distribution over its options, in option order (`yes`, `no` for a noul)."""
|
| 83 |
+
return self.probabilities_batch([(state, questions, images, audio)])[0]
|
| 84 |
+
|
| 85 |
+
@torch.no_grad()
|
| 86 |
+
def probabilities_batch(self, requests: Sequence[tuple], _usage: bool = False) -> list:
|
| 87 |
+
tok, rows, read = self.tokenizer, [], []
|
| 88 |
+
for r in requests:
|
| 89 |
+
state, questions = r[0], [as_question(q) for q in r[1]]
|
| 90 |
+
images, audio = (r[2] if len(r) > 2 else None) or None, r[3] if len(r) > 3 else None
|
| 91 |
+
if images is not None and audio is not None:
|
| 92 |
+
raise ValueError("a request carries images or audio, not both")
|
| 93 |
+
if images is not None:
|
| 94 |
+
prefix = self.vision([images] if hasattr(images, "convert") else list(images))
|
| 95 |
+
max_len, noul, calibrate, spoken = self.config.image_text_length, YES_NO, False, False
|
| 96 |
+
elif audio is not None:
|
| 97 |
+
prefix = self.audio(audio)
|
| 98 |
+
max_len, noul, calibrate, spoken = self.config.audio_text_length, YES_NO, False, True
|
| 99 |
+
state = {} if state is None else state # how the audio questions were trained
|
| 100 |
+
else:
|
| 101 |
+
prefix, max_len, noul, calibrate, spoken = None, self.config.max_length, None, True, False
|
| 102 |
+
p = 0 if prefix is None else prefix.shape[1]
|
| 103 |
+
max_len = min(max_len, self.config.max_length - p)
|
| 104 |
+
if max_len < 64:
|
| 105 |
+
raise ValueError(f"the media take {p} of the {self.config.max_length} positions; send fewer images")
|
| 106 |
+
state = "" if state is None else state
|
| 107 |
+
seqs = [encode(tok, state, q, max_len, noul, spoken) for q in questions]
|
| 108 |
+
rows.append([(prefix, ids, markers, q, calibrate) for q, (ids, markers) in zip(questions, seqs)])
|
| 109 |
+
read.append(sum(p + len(ids) for ids, _ in seqs))
|
| 110 |
+
flat = [row for request in rows for row in request]
|
| 111 |
+
probs = self._run(flat)
|
| 112 |
+
out, i = [], 0
|
| 113 |
+
for request in rows:
|
| 114 |
+
out.append(probs[i:i + len(request)])
|
| 115 |
+
i += len(request)
|
| 116 |
+
return list(zip(out, read)) if _usage else out
|
| 117 |
+
|
| 118 |
+
# ------------------------------------------------------------------ forward
|
| 119 |
+
|
| 120 |
+
def _run(self, rows: list, max_tokens: int = 65536) -> list:
|
| 121 |
+
"""Rows (prefix, ids, markers, question, calibrate) -> probabilities, batched by token budget."""
|
| 122 |
+
results = [None] * len(rows)
|
| 123 |
+
order = sorted(range(len(rows)), key=lambda i: _length(rows[i]), reverse=True)
|
| 124 |
+
while order:
|
| 125 |
+
longest, size = _length(rows[order[0]]), 1
|
| 126 |
+
while size < len(order) and (size + 1) * longest <= max_tokens:
|
| 127 |
+
size += 1
|
| 128 |
+
batch, order = order[:size], order[size:]
|
| 129 |
+
for i, p in zip(batch, self._forward([rows[i] for i in batch])):
|
| 130 |
+
results[i] = p
|
| 131 |
+
return results
|
| 132 |
+
|
| 133 |
+
def _forward(self, rows: list) -> list:
|
| 134 |
+
device, dtype = self.device, self.encoder.embed_tokens.weight.dtype
|
| 135 |
+
seqs, lengths, offsets = [], [], []
|
| 136 |
+
for prefix, ids, *_ in rows:
|
| 137 |
+
text = self.encoder.embed_tokens(torch.tensor(ids, device=device))
|
| 138 |
+
seqs.append(text if prefix is None else torch.cat([prefix[0].to(dtype), text]))
|
| 139 |
+
offsets.append(0 if prefix is None else prefix.shape[1])
|
| 140 |
+
lengths.append(len(ids))
|
| 141 |
+
h = torch.nn.utils.rnn.pad_sequence(seqs, batch_first=True)
|
| 142 |
+
total = torch.tensor([len(s) for s in seqs], device=device)
|
| 143 |
+
pad = torch.arange(h.shape[1], device=device)[None] < total[:, None]
|
| 144 |
+
h = self.encoder(h, pad, torch.tensor(offsets, device=device))
|
| 145 |
+
text = torch.nn.utils.rnn.pad_sequence([h[i, o:o + n] for i, (o, n) in enumerate(zip(offsets, lengths))],
|
| 146 |
+
batch_first=True)
|
| 147 |
+
k = max(len(r[2]) for r in rows)
|
| 148 |
+
text_pad = torch.arange(text.shape[1], device=device)[None] < torch.tensor(lengths, device=device)[:, None]
|
| 149 |
+
marker_pos = torch.zeros(len(rows), k, dtype=torch.long, device=device)
|
| 150 |
+
marker_mask = torch.zeros(len(rows), k, dtype=torch.bool, device=device)
|
| 151 |
+
for i, r in enumerate(rows):
|
| 152 |
+
marker_pos[i, :len(r[2])] = torch.tensor(r[2], device=device)
|
| 153 |
+
marker_mask[i, :len(r[2])] = True
|
| 154 |
+
qtype = torch.tensor([QTYPES[r[3].type] for r in rows], device=device)
|
| 155 |
+
logits = self.head(text, text_pad, marker_pos, marker_mask, qtype)
|
| 156 |
+
out = []
|
| 157 |
+
for row, z in zip(rows, logits):
|
| 158 |
+
q: Question = row[3]
|
| 159 |
+
z = z[:q.options]
|
| 160 |
+
if row[4]:
|
| 161 |
+
z = z / self.config.temperatures.get(temperature_key(q), self.config.temperatures.get(q.type, 1.0))
|
| 162 |
+
p = z.softmax(-1).tolist()
|
| 163 |
+
out.append(p[::-1] if q.type == "noul" else p) # the model reads a noul as [false, true]
|
| 164 |
+
return out
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
def _length(row) -> int:
|
| 168 |
+
return (0 if row[0] is None else row[0].shape[1]) + len(row[1])
|
provenance/upstream-source/prompt.py
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Questions in, token sequences out, answers back.
|
| 2 |
+
|
| 3 |
+
A question is a dict in the Decision Index schema: `type` (noul, choice or score), `instructions`, and
|
| 4 |
+
`criteria`. Each question is rendered against the state as one sequence:
|
| 5 |
+
|
| 6 |
+
<bos> <state> state <q> instructions <opt> <mask> option_0 </opt> <opt> <mask> option_1 </opt> ... <decide>
|
| 7 |
+
|
| 8 |
+
The model scores the hidden state at every `<mask>` and softmaxes over the question's options. Delimiters come
|
| 9 |
+
from the tokenizer's reserved block, and `<|...|>` in caller text is rewritten so a state can never forge one.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from __future__ import annotations
|
| 13 |
+
|
| 14 |
+
import json
|
| 15 |
+
import re
|
| 16 |
+
from dataclasses import dataclass
|
| 17 |
+
from typing import Any
|
| 18 |
+
|
| 19 |
+
QTYPES = {"choice": 0, "score": 1, "noul": 2}
|
| 20 |
+
DELIM = {"state": "<|reserved_7|>", "q": "<|reserved_8|>", "opt": "<|reserved_9|>", "opt_end": "<|reserved_10|>",
|
| 21 |
+
"decide": "<|reserved_11|>"}
|
| 22 |
+
MARKER = "<|mask|>"
|
| 23 |
+
_SPECIAL = re.compile(r"<\|([A-Za-z0-9_]+)\|>")
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
@dataclass
|
| 27 |
+
class Question:
|
| 28 |
+
type: str
|
| 29 |
+
instructions: str
|
| 30 |
+
criteria: Any = None
|
| 31 |
+
|
| 32 |
+
def __post_init__(self):
|
| 33 |
+
if self.type not in QTYPES:
|
| 34 |
+
raise ValueError(f"question type must be one of {sorted(QTYPES)}, got {self.type!r}")
|
| 35 |
+
if self.type == "choice" and (not isinstance(self.criteria, dict) or len(self.criteria) < 2):
|
| 36 |
+
raise ValueError("a choice needs criteria {name: description} with at least two options")
|
| 37 |
+
if self.type == "score" and (not isinstance(self.criteria, (list, tuple)) or not 2 <= len(self.criteria) <= 10):
|
| 38 |
+
raise ValueError("a score needs criteria: a list of 2 to 10 level descriptions, lowest first")
|
| 39 |
+
if self.type == "noul" and self.criteria is not None and not isinstance(self.criteria, dict):
|
| 40 |
+
raise ValueError('noul criteria are optional: {"true": "...", "false": "..."} (or "yes", "no")')
|
| 41 |
+
|
| 42 |
+
@property
|
| 43 |
+
def options(self) -> int:
|
| 44 |
+
return 2 if self.type == "noul" else len(self.criteria)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def as_question(q: Any) -> Question:
|
| 48 |
+
if isinstance(q, Question):
|
| 49 |
+
return q
|
| 50 |
+
if not isinstance(q, dict) or "type" not in q or "instructions" not in q:
|
| 51 |
+
raise ValueError("a question is a dict with `type`, `instructions` and, for choice and score, `criteria`")
|
| 52 |
+
return Question(q["type"], str(q["instructions"]), q.get("criteria"))
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def escape(text: str) -> str:
|
| 56 |
+
"""`<|name|>` -> `<¦name¦>`, so caller text cannot emit a delimiter or marker token."""
|
| 57 |
+
return _SPECIAL.sub(r"<¦\1¦>", text)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def serialize(state: Any) -> str:
|
| 61 |
+
return state if isinstance(state, str) else json.dumps(state, ensure_ascii=False)
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def _criterion(value: Any) -> str:
|
| 65 |
+
return value if isinstance(value, str) else json.dumps(value, ensure_ascii=False, separators=(", ", ": "),
|
| 66 |
+
default=str)
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def render_options(q: Question, noul_default: dict | None = None, audio: bool = False) -> list[str]:
|
| 70 |
+
"""Option texts in the model's order. A noul is read as [false, true]. After an audio prefix, options are
|
| 71 |
+
written as the audio questions were trained: `option_000: text`, and a noul as `false: no`, `true: yes`."""
|
| 72 |
+
if q.type == "choice":
|
| 73 |
+
if audio:
|
| 74 |
+
return [f"option_{i:03d}: {_criterion(k if v is None or v == '' else v)}"
|
| 75 |
+
for i, (k, v) in enumerate(q.criteria.items())]
|
| 76 |
+
return [k if v is None or v == "" else f"{k}: {_criterion(v)}" for k, v in q.criteria.items()]
|
| 77 |
+
if q.type == "score":
|
| 78 |
+
return [f"level {i}: {_criterion(c)}" for i, c in enumerate(q.criteria)]
|
| 79 |
+
if audio:
|
| 80 |
+
return ["false: no", "true: yes"]
|
| 81 |
+
crit = q.criteria or noul_default or {}
|
| 82 |
+
false, true = crit.get("false", crit.get("no")), crit.get("true", crit.get("yes"))
|
| 83 |
+
return ["false: " + (_criterion(false) if false not in (None, "") else "no, the statement does not hold"),
|
| 84 |
+
"true: " + (_criterion(true) if true not in (None, "") else "yes, the statement holds")]
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def encode(tok, state: Any, q: Question, max_len: int, noul_default: dict | None = None, audio: bool = False,
|
| 88 |
+
per_option: int = 24) -> tuple[list[int], list[int]]:
|
| 89 |
+
"""Token ids of one question over one state, and the position of each option's marker.
|
| 90 |
+
|
| 91 |
+
The option block gets max(96, min(24k + 32, max_len / 2)) tokens, shared out evenly; the state is
|
| 92 |
+
truncated on the right to the room that is left.
|
| 93 |
+
"""
|
| 94 |
+
ids_of = tok.convert_tokens_to_ids
|
| 95 |
+
enc = lambda s: tok(escape(s), add_special_tokens=False)["input_ids"] # noqa: E731
|
| 96 |
+
opts = render_options(q, noul_default, audio)
|
| 97 |
+
budget = max(96, min(len(opts) * per_option + 32, max_len // 2))
|
| 98 |
+
per = max(2, (budget - 3 * len(opts)) // len(opts))
|
| 99 |
+
question = ([ids_of(DELIM["q"])] + enc(q.instructions))[: max(16, budget)]
|
| 100 |
+
markers = []
|
| 101 |
+
for text in opts:
|
| 102 |
+
markers.append(len(question) + 1)
|
| 103 |
+
question += [ids_of(DELIM["opt"]), ids_of(MARKER)] + enc(" " + text)[:per] + [ids_of(DELIM["opt_end"])]
|
| 104 |
+
question.append(ids_of(DELIM["decide"]))
|
| 105 |
+
room = max(0, max_len - len(question) - 2)
|
| 106 |
+
state_ids = [ids_of(DELIM["state"])] + enc(serialize(state))[:room]
|
| 107 |
+
ids = ([tok.bos_token_id] + state_ids + question)[:max_len]
|
| 108 |
+
markers = [m + 1 + len(state_ids) for m in markers]
|
| 109 |
+
if markers[-1] >= max_len:
|
| 110 |
+
raise ValueError("the options do not fit in the context")
|
| 111 |
+
return ids, markers
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
def answer(q: Question, probs: list[float]) -> dict:
|
| 115 |
+
"""A noul's P(yes) (its probabilities are [yes, no]); a choice's pick and its probabilities; a score's
|
| 116 |
+
expected level."""
|
| 117 |
+
if q.type == "noul":
|
| 118 |
+
return {"type": "noul", "noul": probs[0]}
|
| 119 |
+
best = max(range(len(probs)), key=probs.__getitem__)
|
| 120 |
+
if q.type == "choice":
|
| 121 |
+
names = list(q.criteria)
|
| 122 |
+
return {"type": "choice", "choice": names[best], "confidence": probs[best],
|
| 123 |
+
"probabilities": dict(zip(names, probs))}
|
| 124 |
+
return {"type": "score", "score": sum(i * p for i, p in enumerate(probs)), "confidence": probs[best],
|
| 125 |
+
"probabilities": {str(i): p for i, p in enumerate(probs)},
|
| 126 |
+
"legend": {str(i): _criterion(text) for i, text in enumerate(q.criteria)}}
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def temperature_key(q: Question) -> str:
|
| 130 |
+
k = q.options
|
| 131 |
+
return f"{q.type}:" + ("2" if k <= 2 else "3-5" if k <= 5 else "6-10" if k <= 10 else "11+")
|
provenance/upstream-source/vision.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Images to prefix embeddings: LFM2-VL's tiling, a SigLIP2 NaFlex tower, and a 2x2 pixel-unshuffle projector.
|
| 2 |
+
|
| 3 |
+
A large image is cut into up to ten 512 px tiles plus a thumbnail; a small one is read whole. Each crop becomes
|
| 4 |
+
(h/32) x (w/32) prefix embeddings, at most 256 per crop. Several images are concatenated in the order given.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import math
|
| 10 |
+
|
| 11 |
+
import torch
|
| 12 |
+
import torch.nn as nn
|
| 13 |
+
import torch.nn.functional as F
|
| 14 |
+
|
| 15 |
+
TILE, PATCH, MAX_PATCHES = 512, 16, 1024
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def layout(width: int, height: int) -> dict:
|
| 19 |
+
"""LFM2-VL's smart resize, tile grid and thumbnail (projected-patch budget 64 to 256 per crop)."""
|
| 20 |
+
if min(width, height) < 1:
|
| 21 |
+
raise ValueError("empty image")
|
| 22 |
+
factor, maximum, minimum = 32, 256 * 1024, 64 * 1024
|
| 23 |
+
h, w = max(factor, round(height / factor) * factor), max(factor, round(width / factor) * factor)
|
| 24 |
+
if h * w > maximum:
|
| 25 |
+
beta = math.sqrt(height * width / maximum)
|
| 26 |
+
h = max(factor, math.floor(height / beta / factor) * factor)
|
| 27 |
+
w = max(factor, math.floor(width / beta / factor) * factor)
|
| 28 |
+
elif h * w < minimum:
|
| 29 |
+
beta = math.sqrt(minimum / (height * width))
|
| 30 |
+
h = math.ceil(height * beta / factor) * factor
|
| 31 |
+
w = math.ceil(width * beta / factor) * factor
|
| 32 |
+
large = max(16, round(height / factor) * factor) * max(16, round(width / factor) * factor) > maximum * 2
|
| 33 |
+
grid = (1, 1)
|
| 34 |
+
if large:
|
| 35 |
+
ratios = sorted({(x, y) for n in range(2, 11) for x in range(1, n + 1) for y in range(1, n + 1)
|
| 36 |
+
if 2 <= x * y <= 10}, key=lambda r: r[0] * r[1])
|
| 37 |
+
best = float("inf")
|
| 38 |
+
for ratio in ratios:
|
| 39 |
+
diff = abs(width / height - ratio[0] / ratio[1])
|
| 40 |
+
if diff < best or (diff == best and width * height > 0.5 * TILE * TILE * ratio[0] * ratio[1]):
|
| 41 |
+
grid, best = ratio, diff
|
| 42 |
+
return {"grid": grid, "thumbnail": (h, w), "tiled": large}
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def preprocess(image) -> dict:
|
| 46 |
+
"""A PIL image -> SigLIP2 NaFlex inputs for its tiles and thumbnail (RGB in [-1, 1], 16 px patches)."""
|
| 47 |
+
from torchvision.transforms.v2 import functional as tvf
|
| 48 |
+
|
| 49 |
+
image = image.convert("RGB")
|
| 50 |
+
plan = layout(*image.size)
|
| 51 |
+
x = tvf.pil_to_tensor(image)
|
| 52 |
+
crops = []
|
| 53 |
+
if plan["tiled"]:
|
| 54 |
+
gw, gh = plan["grid"]
|
| 55 |
+
big = tvf.resize(x, [gh * TILE, gw * TILE], interpolation=tvf.InterpolationMode.BILINEAR, antialias=True)
|
| 56 |
+
crops = [big[:, r * TILE:(r + 1) * TILE, c * TILE:(c + 1) * TILE] for r in range(gh) for c in range(gw)]
|
| 57 |
+
crops.append(tvf.resize(x, list(plan["thumbnail"]), interpolation=tvf.InterpolationMode.BILINEAR, antialias=True))
|
| 58 |
+
pixels, shapes, masks = [], [], []
|
| 59 |
+
for crop in crops:
|
| 60 |
+
crop = tvf.normalize(crop.to(torch.float32), [127.5] * 3, [127.5] * 3)
|
| 61 |
+
_, h, w = crop.shape
|
| 62 |
+
ph, pw = h // PATCH, w // PATCH
|
| 63 |
+
patches = crop.reshape(3, ph, PATCH, pw, PATCH).permute(1, 3, 2, 4, 0).reshape(ph * pw, 3 * PATCH * PATCH)
|
| 64 |
+
pixels.append(F.pad(patches, (0, 0, 0, MAX_PATCHES - ph * pw)))
|
| 65 |
+
shapes.append([ph, pw])
|
| 66 |
+
masks.append(torch.arange(MAX_PATCHES) < ph * pw)
|
| 67 |
+
return {"pixel_values": torch.stack(pixels), "spatial_shapes": torch.tensor(shapes),
|
| 68 |
+
"pixel_attention_mask": torch.stack(masks).to(torch.int32)}
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
def prefix_length(inputs: dict) -> int:
|
| 72 |
+
return sum(h * w // 4 for h, w in inputs["spatial_shapes"].tolist())
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
class Projector(nn.Module):
|
| 76 |
+
"""LFM2-VL's 2x2 pixel unshuffle and two-layer GELU MLP into the trunk's width."""
|
| 77 |
+
|
| 78 |
+
def __init__(self, vision_dim: int, hidden: int, out: int, factor: int = 2):
|
| 79 |
+
super().__init__()
|
| 80 |
+
self.factor = factor
|
| 81 |
+
self.linear_1 = nn.Linear(vision_dim * factor**2, hidden)
|
| 82 |
+
self.linear_2 = nn.Linear(hidden, out)
|
| 83 |
+
|
| 84 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 85 |
+
b, h, w, c = x.shape
|
| 86 |
+
f = self.factor
|
| 87 |
+
x = x.reshape(b, h, w // f, c * f).permute(0, 2, 1, 3)
|
| 88 |
+
x = x.reshape(b, w // f, h // f, c * f * f).permute(0, 2, 1, 3)
|
| 89 |
+
return self.linear_2(F.gelu(self.linear_1(x))).reshape(b, -1, self.linear_2.out_features)
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
class Vision(nn.Module):
|
| 93 |
+
def __init__(self, vision_config: dict, projector_hidden: int, out: int):
|
| 94 |
+
super().__init__()
|
| 95 |
+
from transformers import Siglip2VisionConfig, Siglip2VisionModel
|
| 96 |
+
|
| 97 |
+
cfg = Siglip2VisionConfig(**vision_config)
|
| 98 |
+
cfg._attn_implementation = "sdpa"
|
| 99 |
+
self.tower = Siglip2VisionModel(cfg)
|
| 100 |
+
self.projector = Projector(cfg.hidden_size, projector_hidden, out)
|
| 101 |
+
|
| 102 |
+
def forward(self, images: list) -> torch.Tensor:
|
| 103 |
+
"""PIL images -> (1, P, D) prefix embeddings, every image's tiles then thumbnail, images in order."""
|
| 104 |
+
param = next(self.tower.parameters())
|
| 105 |
+
out = []
|
| 106 |
+
for image in images:
|
| 107 |
+
inputs = preprocess(image)
|
| 108 |
+
inputs = {k: v.to(param.device, dtype=param.dtype if k == "pixel_values" else v.dtype)
|
| 109 |
+
for k, v in inputs.items()}
|
| 110 |
+
hidden = self.tower(**inputs).last_hidden_state
|
| 111 |
+
for i, (h, w) in enumerate(inputs["spatial_shapes"].tolist()):
|
| 112 |
+
out.append(self.projector(hidden[i:i + 1, :h * w].reshape(1, h, w, -1)))
|
| 113 |
+
return torch.cat(out, dim=1)
|
runtime/NOTICE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Packaged experimental WebBrain d1 adapter source
|
| 2 |
+
|
| 3 |
+
The d1-runtime.js source is copied byte-identically from the newly integrated
|
| 4 |
+
WebBrain module src/chrome/src/providers/d1-runtime.js. The new d1-preprocess.js
|
| 5 |
+
differs from the preserved old helper by two source-semantic corrections: present
|
| 6 |
+
null false/true criteria use Object.hasOwn (Python dict.get semantics) instead of
|
| 7 |
+
falling through to alternative no/yes keys, and finite small fractional JSON
|
| 8 |
+
numbers use Python-style exponent formatting. All other old helper bytes remain
|
| 9 |
+
exact. JavaScript cannot recover Python int versus integral-float distinctions;
|
| 10 |
+
preformatted state/criterion strings are the exact-lexical escape hatch.
|
| 11 |
+
The actual WebBrain project copyright/license notice (Copyright 2026 Emre Sokullu,
|
| 12 |
+
GPL-3.0-or-later) is retained at licenses/webbrain/LICENSE. No permissive license is
|
| 13 |
+
silently substituted for that project notice. Source is included, not remote code.
|
| 14 |
+
|
| 15 |
+
The model weights, ONNX graphs and upstream reference code retain their separate
|
| 16 |
+
LFM Open License v1.0 notices. ONNX Runtime retains MIT notices and Transformers.js
|
| 17 |
+
retains Apache-2.0 notices. Separate notices are not a legal compatibility opinion.
|
| 18 |
+
Owner/legal commercial and distribution eligibility determination is separate.
|
| 19 |
+
|
| 20 |
+
The runtime/vendor/transformers.web.js module has exactly two documented relative
|
| 21 |
+
import-linkage changes; see runtime/vendor/vendor-manifest.json. No model bytes,
|
| 22 |
+
calibration, tokenizer behavior or answer semantics are changed by packaging.
|
runtime/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FP32 Decision Adapter
|
| 2 |
+
|
| 3 |
+
The package adapter is a byte-preserving copy of the actual WebBrain extension's
|
| 4 |
+
new `src/chrome/src/providers/d1-runtime.js` and `d1-preprocess.js`, not a demo UI.
|
| 5 |
+
The latter differs from the preserved old baseline helper only by present-null
|
| 6 |
+
noul criteria lookup (`Object.hasOwn`, matching Python `dict.get`) and finite small
|
| 7 |
+
fractional Python-style JSON exponent formatting. JS Number cannot recover Python
|
| 8 |
+
int-versus-integral-float lexical types; pass preformatted state/criterion strings
|
| 9 |
+
when exact source lexical representation matters.
|
| 10 |
+
This file describes wiring, not a claim of packed-extension execution or real-site
|
| 11 |
+
quality. The source bidirectional decision model generates zero output tokens.
|
| 12 |
+
|
| 13 |
+
## Local Runtime
|
| 14 |
+
|
| 15 |
+
Use `runtime/vendor/ort.webgpu.bundle.min.mjs` and
|
| 16 |
+
`runtime/vendor/transformers.web.js`. The tokenizer module has only two documented
|
| 17 |
+
import-linkage changes to the local ORT bundle, reproducing the verified runner's
|
| 18 |
+
import map. ORT `1.31.0-dev.20260914-8d85527a0` and Transformers `4.3.1` are isolated
|
| 19 |
+
from the extension's existing chat runtime. JavaScript and JSEP WASM are bundled
|
| 20 |
+
locally; no remote executable module loading is required.
|
| 21 |
+
|
| 22 |
+
Verify `package-manifest.json` against a trusted, separately pinned SHA-256 and
|
| 23 |
+
immutable HF revision before accepting its hashes. Verify every graph/external
|
| 24 |
+
data and tokenizer asset against its descriptor. For large data, contiguous
|
| 25 |
+
4 MiB `chunks` provide bounded per-chunk verification; do not allocate a second
|
| 26 |
+
1.5 GB buffer merely to run WebCrypto. Caching alone is not integrity verification.
|
| 27 |
+
The actual extension implements its own pinned download/cache/session orchestration.
|
| 28 |
+
|
| 29 |
+
```js
|
| 30 |
+
import * as ort from './vendor/ort.webgpu.bundle.min.mjs';
|
| 31 |
+
import { PreTrainedTokenizer } from './vendor/transformers.web.js';
|
| 32 |
+
import { createD1Runtime } from './d1-runtime.js';
|
| 33 |
+
|
| 34 |
+
ort.env.wasm.numThreads = 1;
|
| 35 |
+
ort.env.wasm.wasmPaths = {
|
| 36 |
+
mjs: new URL('./vendor/ort-wasm-simd-threaded.jsep.mjs', import.meta.url).href,
|
| 37 |
+
wasm: new URL('./vendor/ort-wasm-simd-threaded.jsep.wasm', import.meta.url).href
|
| 38 |
+
};
|
| 39 |
+
const tokenizer = new PreTrainedTokenizer(tokenizerJSON, tokenizerConfig);
|
| 40 |
+
const sessions = {};
|
| 41 |
+
for (const name of ['decision', 'vision', 'projector']) {
|
| 42 |
+
sessions[name] = await ort.InferenceSession.create(verifiedGraphs[name], {
|
| 43 |
+
executionProviders: [{ name: 'webgpu', device }],
|
| 44 |
+
graphOptimizationLevel: 'basic',
|
| 45 |
+
extra: { session: { disable_cpu_ep_fallback: '0' } },
|
| 46 |
+
externalData: [{ path: `${name}.data`, data: verifiedExternalData[name] }]
|
| 47 |
+
});
|
| 48 |
+
}
|
| 49 |
+
const judge = createD1Runtime({ ort, tokenizer, config, ratios, sessions, device, model });
|
| 50 |
+
const response = await judge.evaluate({ state, images: [inlinePngDataUrl], questions, signal });
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
The example assumes you already requested/checked the real WebGPU adapter/device
|
| 54 |
+
and fetched verified bytes/config/ratios. Ordinary Chrome may choose another GPU;
|
| 55 |
+
never label a software adapter or an unverified device as an RTX 5090 result.
|
| 56 |
+
CPU/WASM shape/control and floating mask/position construction remain possible.
|
| 57 |
+
Actual node placement requires a separate profile.
|
| 58 |
+
|
| 59 |
+
`questions` is an insertion-ordered object of named source-schema questions.
|
| 60 |
+
Choice criteria are an insertion-ordered name-to-description object; score
|
| 61 |
+
criteria are an ordinal array; noul follows source false/true marker scoring and
|
| 62 |
+
public yes/no answer semantics. Inline PNG/JPEG/WebP data URLs are accepted; the
|
| 63 |
+
adapter rejects page-chosen remote image URLs. A screenshot is encoded once and
|
| 64 |
+
each question becomes its own padded encoder row. The source 65,536 padded-token
|
| 65 |
+
subbatch budget is retained; named answers return in original order. No
|
| 66 |
+
generation/causal-mask path is involved.
|
| 67 |
+
|
| 68 |
+
Always use actual `float32` model/graph/feed precision. The unchanged root
|
| 69 |
+
`config.json` has a legacy `dtype: float16` label, which must not drive casting.
|
| 70 |
+
Do not alter temperatures, answer computation, option markers or token budget to
|
| 71 |
+
make a parity test pass. `dispose()` releases sessions/device owned by the adapter.
|
| 72 |
+
|
| 73 |
+
## Checkpoint
|
| 74 |
+
|
| 75 |
+
Root `model.safetensors` is the same clean 380-tensor FP32 artifact. Its file SHA
|
| 76 |
+
is distinct from the logical tensor-state SHA. No automatic Transformers Python
|
| 77 |
+
loader is advertised: legacy architecture metadata has no package `auto_map`.
|
| 78 |
+
`provenance/upstream-source/` is attribution/reference, not a native loading API;
|
| 79 |
+
the archived original audio.py is upstream source only, not audio runtime weights.
|
| 80 |
+
|
| 81 |
+
The original LFM model license and dependency notices remain mandatory. Synthetic
|
| 82 |
+
evaluation and finite runtime parity do not establish safe real-site automation,
|
| 83 |
+
completion reliability, or commercial eligibility.
|
| 84 |
+
The actual WebBrain GPL-3.0-or-later project notice is separately retained at
|
| 85 |
+
`../licenses/webbrain/LICENSE` for copied runtime source; `NOTICE` here describes
|
| 86 |
+
the component scopes. This package does not substitute MIT for that project notice
|
| 87 |
+
or offer a legal compatibility determination.
|
runtime/d1-preprocess.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const f32=Math.fround;
|
| 2 |
+
export function pyJSON(value) {
|
| 3 |
+
if(Array.isArray(value)) return '['+value.map(pyJSON).join(', ')+']';
|
| 4 |
+
if(value!==null && typeof value==='object') return '{'+Object.entries(value).map(([k,v])=>JSON.stringify(k)+': '+pyJSON(v)).join(', ')+'}';
|
| 5 |
+
if(typeof value==='number') {
|
| 6 |
+
if(!Number.isFinite(value)) throw new Error('D1 JSON numbers must be finite');
|
| 7 |
+
if(!Number.isInteger(value)&&Math.abs(value)<1e-4) return value.toExponential().replace(/e([+-])(\d+)$/,(all,sign,digits)=>'e'+sign+digits.padStart(2,'0'));
|
| 8 |
+
}
|
| 9 |
+
return JSON.stringify(value);
|
| 10 |
+
}
|
| 11 |
+
export function roundEven(x) {
|
| 12 |
+
const n=Math.floor(x),r=x-n;
|
| 13 |
+
return r===0.5 ? n+(n%2) : Math.round(x);
|
| 14 |
+
}
|
| 15 |
+
const escape=s=>s.replace(/<\|([A-Za-z0-9_]+)\|>/g,'<\u00a6$1\u00a6>');
|
| 16 |
+
const criterion=v=>typeof v==='string'?v:pyJSON(v);
|
| 17 |
+
export function renderOptions(q,image=false) {
|
| 18 |
+
if(q.type==='choice') return Object.entries(q.criteria).map(([k,v])=>v==null||v===''?k:`${k}: ${criterion(v)}`);
|
| 19 |
+
if(q.type==='score') return q.criteria.map((c,i)=>`level ${i}: ${criterion(c)}`);
|
| 20 |
+
const c=q.criteria&&Object.keys(q.criteria).length?q.criteria:(image?{false:'no',true:'yes'}:{});
|
| 21 |
+
const no=Object.hasOwn(c,'false')?c.false:c.no,yes=Object.hasOwn(c,'true')?c.true:c.yes;
|
| 22 |
+
return ['false: '+(no!=null&&no!==''?criterion(no):'no, the statement does not hold'),'true: '+(yes!=null&&yes!==''?criterion(yes):'yes, the statement holds')];
|
| 23 |
+
}
|
| 24 |
+
export function encode(tokenizer,state,q,maxLen,image=false) {
|
| 25 |
+
if(!['choice','noul','score'].includes(q.type)||typeof q.instructions!=='string')throw new Error('Invalid question type or instructions');
|
| 26 |
+
if(q.type==='choice'&&(!q.criteria||Array.isArray(q.criteria)||Object.keys(q.criteria).length<2))throw new Error('A choice requires at least two named criteria');
|
| 27 |
+
if(q.type==='score'&&(!Array.isArray(q.criteria)||q.criteria.length<2||q.criteria.length>10))throw new Error('A score requires 2 to 10 levels');
|
| 28 |
+
if(q.type==='noul'&&q.criteria!=null&&(Array.isArray(q.criteria)||typeof q.criteria!=='object'))throw new Error('noul criteria must be an object');
|
| 29 |
+
const id=s=>tokenizer.convert_tokens_to_ids(s);
|
| 30 |
+
const enc=s=>Array.from(tokenizer.encode(escape(s),{add_special_tokens:false}));
|
| 31 |
+
const options=renderOptions(q,image);
|
| 32 |
+
const budget=Math.max(96,Math.min(options.length*24+32,Math.floor(maxLen/2)));
|
| 33 |
+
const per=Math.max(2,Math.floor((budget-3*options.length)/options.length));
|
| 34 |
+
const question=[id('<|reserved_8|>'),...enc(q.instructions)].slice(0,Math.max(16,budget));
|
| 35 |
+
const markers=[];
|
| 36 |
+
for(const option of options) {
|
| 37 |
+
markers.push(question.length+1);
|
| 38 |
+
question.push(id('<|reserved_9|>'),id('<|mask|>'),...enc(' '+option).slice(0,per),id('<|reserved_10|>'));
|
| 39 |
+
}
|
| 40 |
+
question.push(id('<|reserved_11|>'));
|
| 41 |
+
const room=Math.max(0,maxLen-question.length-2);
|
| 42 |
+
const stateIds=[id('<|reserved_7|>'),...enc(typeof state==='string'?state:pyJSON(state)).slice(0,room)];
|
| 43 |
+
const ids=[tokenizer.bos_token_id,...stateIds,...question].slice(0,maxLen);
|
| 44 |
+
const positions=markers.map(m=>m+1+stateIds.length);
|
| 45 |
+
if(positions.at(-1)>=maxLen) throw new Error('Options do not fit in context');
|
| 46 |
+
return {input_ids:ids,markers:positions};
|
| 47 |
+
}
|
| 48 |
+
export function temperature(q,config,image=false) {
|
| 49 |
+
if(image) return 1;
|
| 50 |
+
const n=q.type==='noul'?2:Object.keys(q.criteria).length;
|
| 51 |
+
const key=q.type+':'+(n<=2?'2':n<=5?'3-5':n<=10?'6-10':'11+');
|
| 52 |
+
return config.temperatures[key] ?? config.temperatures[q.type] ?? 1;
|
| 53 |
+
}
|
| 54 |
+
export function layout(width,height,ratios) {
|
| 55 |
+
if(Math.min(width,height)<1) throw new Error('Empty image');
|
| 56 |
+
let h=Math.max(32,roundEven(height/32)*32),w=Math.max(32,roundEven(width/32)*32);
|
| 57 |
+
if(h*w>262144) {const beta=Math.sqrt(height*width/262144);h=Math.max(32,Math.floor(height/beta/32)*32);w=Math.max(32,Math.floor(width/beta/32)*32);}
|
| 58 |
+
else if(h*w<65536) {const beta=Math.sqrt(65536/(height*width));h=Math.ceil(height*beta/32)*32;w=Math.ceil(width*beta/32)*32;}
|
| 59 |
+
const tiled=Math.max(16,roundEven(height/32)*32)*Math.max(16,roundEven(width/32)*32)>524288;
|
| 60 |
+
let grid=[1,1];
|
| 61 |
+
if(tiled) {let best=Infinity;for(const r of ratios) {const diff=Math.abs(width/height-r[0]/r[1]);if(diff<best || (diff===best && width*height>0.5*512*512*r[0]*r[1])) {grid=r;best=diff;}}}
|
| 62 |
+
return {grid,thumbnail:[h,w],tiled};
|
| 63 |
+
}
|
| 64 |
+
function resizeWeights(input,output) {
|
| 65 |
+
const scale=input/output,support=Math.max(1,scale),rows=[];
|
| 66 |
+
let largest=0;
|
| 67 |
+
for(let i=0;i<output;i++) {
|
| 68 |
+
const center=scale*(i+0.5);
|
| 69 |
+
const start=Math.max(0,Math.trunc(center-support+0.5));
|
| 70 |
+
const end=Math.min(input,Math.trunc(center+support+0.5));
|
| 71 |
+
let weights=Array.from({length:end-start},(_,j)=>Math.max(0,1-Math.abs((j+start-center+0.5)/support)));
|
| 72 |
+
const total=weights.reduce((a,b)=>a+b,0);
|
| 73 |
+
weights=weights.map(w=>w/total);
|
| 74 |
+
largest=Math.max(largest,...weights);
|
| 75 |
+
rows.push({start,weights});
|
| 76 |
+
}
|
| 77 |
+
let precision=0;
|
| 78 |
+
for(;precision<22;precision++) if(Math.trunc(0.5+largest*2**(precision+1))>=32768) break;
|
| 79 |
+
const unit=2**precision;
|
| 80 |
+
for(const row of rows) row.weights=row.weights.map(w=>Math.trunc(0.5+w*unit));
|
| 81 |
+
return {rows,unit};
|
| 82 |
+
}
|
| 83 |
+
// Torch's uint8 antialias path rounds fixed-point horizontal and vertical passes.
|
| 84 |
+
export function resizeRGB(rgb,width,height,newWidth,newHeight) {
|
| 85 |
+
let temp=rgb;
|
| 86 |
+
if(width!==newWidth) {
|
| 87 |
+
const {rows,unit}=resizeWeights(width,newWidth);
|
| 88 |
+
temp=new Uint8Array(newWidth*height*3);
|
| 89 |
+
for(let y=0;y<height;y++) for(let x=0;x<newWidth;x++) for(let c=0;c<3;c++) {
|
| 90 |
+
const row=rows[x];let sum=unit/2;
|
| 91 |
+
for(let j=0;j<row.weights.length;j++) sum+=rgb[(y*width+row.start+j)*3+c]*row.weights[j];
|
| 92 |
+
temp[(y*newWidth+x)*3+c]=Math.max(0,Math.min(255,Math.floor(sum/unit)));
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
if(height===newHeight) return temp;
|
| 96 |
+
const {rows,unit}=resizeWeights(height,newHeight),out=new Uint8Array(newWidth*newHeight*3);
|
| 97 |
+
for(let y=0;y<newHeight;y++) for(let x=0;x<newWidth;x++) for(let c=0;c<3;c++) {
|
| 98 |
+
const row=rows[y];let sum=unit/2;
|
| 99 |
+
for(let j=0;j<row.weights.length;j++) sum+=temp[((row.start+j)*newWidth+x)*3+c]*row.weights[j];
|
| 100 |
+
out[(y*newWidth+x)*3+c]=Math.max(0,Math.min(255,Math.floor(sum/unit)));
|
| 101 |
+
}
|
| 102 |
+
return out;
|
| 103 |
+
}
|
| 104 |
+
export async function imageInputs(url,ratios) {
|
| 105 |
+
const blob=await (await fetch(url)).blob(),bitmap=await createImageBitmap(blob,{colorSpaceConversion:'none'});
|
| 106 |
+
const {width,height}=bitmap;
|
| 107 |
+
const canvas=new OffscreenCanvas(width,height),ctx=canvas.getContext('2d',{willReadFrequently:true});
|
| 108 |
+
ctx.drawImage(bitmap,0,0);
|
| 109 |
+
const rgba=ctx.getImageData(0,0,width,height).data,rgb=new Uint8Array(width*height*3);
|
| 110 |
+
for(let i=0;i<width*height;i++) rgb.set(rgba.subarray(i*4,i*4+3),i*3);
|
| 111 |
+
bitmap.close();
|
| 112 |
+
const plan=layout(width,height,ratios),crops=[];
|
| 113 |
+
if(plan.tiled) {
|
| 114 |
+
const [gw,gh]=plan.grid,big=resizeRGB(rgb,width,height,gw*512,gh*512);
|
| 115 |
+
for(let r=0;r<gh;r++) for(let c=0;c<gw;c++) {
|
| 116 |
+
const pixels=new Uint8Array(512*512*3);
|
| 117 |
+
for(let y=0;y<512;y++) pixels.set(big.subarray(((r*512+y)*gw*512+c*512)*3,((r*512+y)*gw*512+c*512+512)*3),y*512*3);
|
| 118 |
+
crops.push({rgb:pixels,h:512,w:512});
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
const [h,w]=plan.thumbnail;
|
| 122 |
+
crops.push({rgb:resizeRGB(rgb,width,height,w,h),h,w});
|
| 123 |
+
const pixels=new Float32Array(crops.length*1024*768),mask=new Int32Array(crops.length*1024),shapes=[];
|
| 124 |
+
crops.forEach((crop,i)=>{
|
| 125 |
+
const ph=crop.h/16,pw=crop.w/16;
|
| 126 |
+
shapes.push([ph,pw]);mask.fill(1,i*1024,i*1024+ph*pw);
|
| 127 |
+
for(let r=0;r<ph;r++) for(let c=0;c<pw;c++) for(let y=0;y<16;y++) for(let x=0;x<16;x++) for(let ch=0;ch<3;ch++) {
|
| 128 |
+
const v=crop.rgb[((r*16+y)*crop.w+c*16+x)*3+ch];
|
| 129 |
+
pixels[(i*1024+r*pw+c)*768+(y*16+x)*3+ch]=f32(f32(v-127.5)/127.5);
|
| 130 |
+
}
|
| 131 |
+
});
|
| 132 |
+
return {plan,pixels,mask,shapes};
|
| 133 |
+
}
|
| 134 |
+
export function positionMatrix(h,w) {
|
| 135 |
+
const matrix=new Float32Array(1024*256);
|
| 136 |
+
const weights=(input,output)=>Array.from({length:output},(_,i)=>{
|
| 137 |
+
const scale=f32(input/output),support=Math.max(1,scale),center=f32(scale*f32(i+0.5));
|
| 138 |
+
const start=Math.max(0,Math.trunc(f32(f32(center-support)+0.5))),end=Math.min(input,Math.trunc(f32(f32(center+support)+0.5)));
|
| 139 |
+
const inv=scale>=1?f32(1/scale):1;
|
| 140 |
+
const a=[];let sum=0;
|
| 141 |
+
for(let j=start;j<end;j++){const v=f32(Math.max(0,f32(1-Math.abs(f32(f32(f32(j-center)+0.5)*inv)))));a.push([j,v]);sum=f32(sum+v);}
|
| 142 |
+
return a.map(([j,v])=>[j,f32(v/sum)]);
|
| 143 |
+
});
|
| 144 |
+
const wy=weights(16,h),wx=weights(16,w);
|
| 145 |
+
for(let y=0;y<h;y++) for(let x=0;x<w;x++) {
|
| 146 |
+
const row=(y*w+x)*256;
|
| 147 |
+
for(const [iy,vy] of wy[y]) for(const [ix,vx] of wx[x]) matrix[row+iy*16+ix]=f32(vy*vx);
|
| 148 |
+
}
|
| 149 |
+
for(let i=h*w;i<1024;i++) matrix.set(matrix.subarray(0,256),i*256);
|
| 150 |
+
return matrix;
|
| 151 |
+
}
|
| 152 |
+
const bits=new DataView(new ArrayBuffer(4));
|
| 153 |
+
export function toHalf(v) {
|
| 154 |
+
bits.setFloat32(0,v,true);const x=bits.getUint32(0,true),sign=(x>>>16)&0x8000,exponent=(x>>>23)&255,mantissa=x&0x7fffff;
|
| 155 |
+
if(exponent===255) return sign|0x7c00|(mantissa?0x200:0);
|
| 156 |
+
const e=exponent-127;
|
| 157 |
+
if(e>15) return sign|0x7c00;
|
| 158 |
+
if(e < -25) return sign;
|
| 159 |
+
const shift=e < -14 ? -e-1 : 13;
|
| 160 |
+
const m=e < -14 ? mantissa|0x800000 : mantissa;
|
| 161 |
+
const base=m>>>shift,rem=m&(2**shift-1),half=2**(shift-1);
|
| 162 |
+
const rounded=base+(rem>half || (rem===half && (base&1))?1:0);
|
| 163 |
+
return sign | (e < -14 ? rounded : ((e+15)<<10)+rounded);
|
| 164 |
+
}
|
| 165 |
+
export function fromHalf(x) {
|
| 166 |
+
const sign=x&0x8000?-1:1,e=(x>>10)&31,m=x&1023;
|
| 167 |
+
return e===0?sign*m*2**-24:e===31?(m?NaN:sign*Infinity):sign*(1+m/1024)*2**(e-15);
|
| 168 |
+
}
|
| 169 |
+
export const halfArray=a=>Uint16Array.from(a,toHalf);
|
runtime/d1-runtime.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { encode, temperature, imageInputs, positionMatrix, pyJSON } from './d1-preprocess.js';
|
| 2 |
+
|
| 3 |
+
export const D1_PROVIDER = 'webgpu_d1';
|
| 4 |
+
const record = value => value && typeof value === 'object' && !Array.isArray(value);
|
| 5 |
+
const checkAbort = signal => { if (signal?.aborted) throw signal.reason || new Error('D1 request cancelled.'); };
|
| 6 |
+
const dispose = values => { for (const value of Object.values(values || {})) value.dispose?.(); };
|
| 7 |
+
|
| 8 |
+
// Media blocks are data, never fetched from a page-chosen network URL.
|
| 9 |
+
export function splitD1State(state, images = []) {
|
| 10 |
+
const media = [...images];
|
| 11 |
+
let text = state == null ? '' : state;
|
| 12 |
+
if (Array.isArray(state)) {
|
| 13 |
+
text = state.filter(part => {
|
| 14 |
+
if (part?.type !== 'image_url') return true;
|
| 15 |
+
media.push(part.image_url?.url); return false;
|
| 16 |
+
});
|
| 17 |
+
if (!text.length) text = '';
|
| 18 |
+
}
|
| 19 |
+
if (media.length > 4 || media.some(url => typeof url !== 'string' || !/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/.test(url))) {
|
| 20 |
+
throw new Error('D1 accepts at most four inline PNG/JPEG/WebP screenshots; remote image URLs are not allowed.');
|
| 21 |
+
}
|
| 22 |
+
if (new TextEncoder().encode(JSON.stringify([text, media])).length > 8 * 1024 * 1024) throw new Error('D1 input exceeds 8 MiB.');
|
| 23 |
+
return { state: text, images: media };
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
export function d1Answers(questions, probabilities, width) {
|
| 27 |
+
const answers = Object.create(null);
|
| 28 |
+
const entries = Array.isArray(questions) ? questions : Object.entries(questions);
|
| 29 |
+
entries.forEach(([id, question], row) => {
|
| 30 |
+
const names = question.type === 'noul' ? ['no', 'yes'] : question.type === 'score' ? question.criteria.map((_, i) => String(i)) : Object.keys(question.criteria);
|
| 31 |
+
const values = Array.from(probabilities.slice(row * width, row * width + names.length), Number);
|
| 32 |
+
if (values.length !== names.length || values.some(value => !Number.isFinite(value) || value < 0 || value > 1) || Math.abs(values.reduce((a, b) => a + b, 0) - 1) > .001) throw new Error('Invalid D1 probability output.');
|
| 33 |
+
const selected = values.indexOf(Math.max(...values));
|
| 34 |
+
if (question.type === 'noul') answers[id] = { type: 'noul', noul: values[1] };
|
| 35 |
+
else {
|
| 36 |
+
const common = { type: question.type, confidence: values[selected], probabilities: Object.fromEntries(names.map((name, i) => [name, values[i]])) };
|
| 37 |
+
answers[id] = question.type === 'choice' ? { ...common, choice: names[selected] } : { ...common, score: values.reduce((sum, p, i) => sum + p * i, 0), legend: Object.fromEntries(names.map((name, i) => [name, typeof question.criteria[i] === 'string' ? question.criteria[i] : pyJSON(question.criteria[i])])) };
|
| 38 |
+
}
|
| 39 |
+
});
|
| 40 |
+
return answers;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
export function d1RowBatches(rows, mediaLength, maxTokens = 65536) {
|
| 44 |
+
const order = rows.map((_, i) => i).sort((a, b) => rows[b].input_ids.length - rows[a].input_ids.length), batches = [];
|
| 45 |
+
while (order.length) {
|
| 46 |
+
const longest = rows[order[0]].input_ids.length + mediaLength;
|
| 47 |
+
let size = 1; while (size < order.length && (size + 1) * longest <= maxTokens) size++;
|
| 48 |
+
batches.push(order.splice(0, size));
|
| 49 |
+
}
|
| 50 |
+
return batches;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
export function createD1Runtime({ ort, tokenizer, config, ratios, sessions, device, model }) {
|
| 54 |
+
if (!sessions?.decision || !sessions?.vision || !sessions?.projector) throw new Error('D1 requires all three FP32 sessions.');
|
| 55 |
+
const tensor = (type, data, shape) => new ort.Tensor(type, data, shape);
|
| 56 |
+
async function mediaPrefix(images, signal) {
|
| 57 |
+
const chunks = [], layouts = [];
|
| 58 |
+
for (const url of images) {
|
| 59 |
+
checkAbort(signal);
|
| 60 |
+
const image = await imageInputs(url, ratios), crops = image.shapes.length;
|
| 61 |
+
const positions = new Float32Array(crops * 1024 * 256);
|
| 62 |
+
image.shapes.forEach(([h, w], i) => positions.set(positionMatrix(h, w), i * 1024 * 256));
|
| 63 |
+
const feeds = { pixel_values: tensor('float32', image.pixels, [crops, 1024, 768]), pixel_mask: tensor('bool', Uint8Array.from(image.mask), [crops, 1024]), position_matrix: tensor('float32', positions, [crops, 1024, 256]) };
|
| 64 |
+
let output;
|
| 65 |
+
try {
|
| 66 |
+
output = await sessions.vision.run(feeds); checkAbort(signal);
|
| 67 |
+
const hidden = await output.hidden.getData();
|
| 68 |
+
for (let crop = 0; crop < crops; crop++) {
|
| 69 |
+
const [h, w] = image.shapes[crop];
|
| 70 |
+
const input = tensor('float32', hidden.slice(crop * 1024 * 768, crop * 1024 * 768 + h * w * 768), [1, h, w, 768]);
|
| 71 |
+
let projected;
|
| 72 |
+
try { projected = await sessions.projector.run({ hidden: input }); chunks.push(new Float32Array(await projected.prefix.getData())); checkAbort(signal); }
|
| 73 |
+
finally { input.dispose?.(); dispose(projected); }
|
| 74 |
+
}
|
| 75 |
+
} finally { dispose(feeds); dispose(output); }
|
| 76 |
+
layouts.push({ ...image.plan, shapes: image.shapes });
|
| 77 |
+
}
|
| 78 |
+
const prefix = new Float32Array(chunks.reduce((n, chunk) => n + chunk.length, 0));
|
| 79 |
+
let offset = 0; for (const chunk of chunks) { prefix.set(chunk, offset); offset += chunk.length; }
|
| 80 |
+
return { prefix, layouts };
|
| 81 |
+
}
|
| 82 |
+
return {
|
| 83 |
+
async evaluate({ state = '', images = [], questions, signal } = {}) {
|
| 84 |
+
checkAbort(signal);
|
| 85 |
+
if (!record(questions) || !Object.keys(questions).length || Object.keys(questions).length > 32) throw new Error('D1 requires 1 to 32 named questions.');
|
| 86 |
+
const input = splitD1State(state, images);
|
| 87 |
+
const { prefix, layouts } = await mediaPrefix(input.images, signal), mediaLength = prefix.length / 1024;
|
| 88 |
+
const limit = Math.min(input.images.length ? config.image_text_length : config.max_length, config.max_length - mediaLength);
|
| 89 |
+
if (!Number.isInteger(mediaLength) || limit < 64) throw new Error('D1 media exceed the source context budget.');
|
| 90 |
+
const entries = Object.entries(questions), rows = entries.map(([, q]) => encode(tokenizer, input.state, q, limit, input.images.length > 0));
|
| 91 |
+
const answers = Object.create(null), batches = [];
|
| 92 |
+
for (const indices of d1RowBatches(rows, mediaLength)) {
|
| 93 |
+
const selectedRows = indices.map(i => rows[i]), selectedEntries = indices.map(i => entries[i]);
|
| 94 |
+
const batch = selectedRows.length, length = Math.max(...selectedRows.map(row => row.input_ids.length)), width = Math.max(...selectedRows.map(row => row.markers.length));
|
| 95 |
+
const ids = new BigInt64Array(batch * length), mask = new Uint8Array(batch * length), markers = new BigInt64Array(batch * width), markerMask = new Uint8Array(batch * width), media = new Float32Array(batch * prefix.length);
|
| 96 |
+
ids.fill(BigInt(tokenizer.pad_token_id ?? 0));
|
| 97 |
+
selectedRows.forEach((row, i) => {
|
| 98 |
+
ids.set(row.input_ids.map(BigInt), i * length); mask.fill(1, i * length, i * length + row.input_ids.length);
|
| 99 |
+
markers.set(row.markers.map(BigInt), i * width); markerMask.fill(1, i * width, i * width + row.markers.length); media.set(prefix, i * prefix.length);
|
| 100 |
+
});
|
| 101 |
+
const feeds = { input_ids: tensor('int64', ids, [batch, length]), text_mask: tensor('bool', mask, [batch, length]), marker_pos: tensor('int64', markers, [batch, width]), marker_mask: tensor('bool', markerMask, [batch, width]), qtype: tensor('int64', BigInt64Array.from(selectedEntries, ([, q]) => BigInt({ choice: 0, score: 1, noul: 2 }[q.type])), [batch]), temperature: tensor('float32', Float32Array.from(selectedEntries, ([, q]) => temperature(q, config, input.images.length > 0)), [batch]), media_prefix: tensor('float32', media, [batch, mediaLength, 1024]) };
|
| 102 |
+
let output;
|
| 103 |
+
try {
|
| 104 |
+
checkAbort(signal); output = await sessions.decision.run(feeds);
|
| 105 |
+
const probabilities = await output.probabilities.getData(); await device?.queue.onSubmittedWorkDone(); checkAbort(signal);
|
| 106 |
+
Object.assign(answers, d1Answers(selectedEntries, probabilities, width));
|
| 107 |
+
batches.push({ question_ids: selectedEntries.map(([id]) => id), batch, text_length: length, options: width });
|
| 108 |
+
} finally { dispose(feeds); dispose(output); }
|
| 109 |
+
}
|
| 110 |
+
return { model, provider: D1_PROVIDER, answers: Object.fromEntries(entries.map(([id]) => [id, answers[id]])), usage: { input_tokens: rows.reduce((sum, row) => sum + row.input_ids.length + mediaLength, 0), output_tokens: 0 }, diagnostics: { dtype: 'float32', generated_tokens: 0, batch: rows.length, text_length: Math.max(...rows.map(row => row.input_ids.length)), media_length: mediaLength, layouts, batches, source_batch_token_budget: 65536, cpu_fallback_policy: 'CPU/WASM control/shape operators allowed; actual placement requires a separate profile.' } };
|
| 111 |
+
},
|
| 112 |
+
async dispose() { for (const session of Object.values(sessions)) await session.release(); device?.destroy(); },
|
| 113 |
+
};
|
| 114 |
+
}
|
runtime/package.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"private": true,
|
| 3 |
+
"type": "module",
|
| 4 |
+
"dependencies": {
|
| 5 |
+
"onnxruntime-web": "1.31.0-dev.20260914-8d85527a0",
|
| 6 |
+
"@huggingface/transformers": "4.3.1"
|
| 7 |
+
},
|
| 8 |
+
"description": "Dependency-injected finite-decision adapter; extension must bundle runtime code locally."
|
| 9 |
+
}
|
runtime/vendor/LICENSE.onnxruntime.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Microsoft Corporation
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
runtime/vendor/LICENSE.transformers.txt
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
runtime/vendor/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Isolated d1 Runtime Dependencies
|
| 2 |
+
|
| 3 |
+
Only the experimental finite-decision d1 provider uses this directory. Existing
|
| 4 |
+
chat Transformers 4.2.0 / patched ONNX Runtime 1.27 remain unchanged.
|
| 5 |
+
|
| 6 |
+
- onnxruntime-web 1.31.0-dev.20260914-8d85527a0, commit
|
| 7 |
+
8d85527a010e294a26b274749f74294b2a32cec5: three runtime files copied byte-exact.
|
| 8 |
+
- @huggingface/transformers 4.3.1: tokenizer API. Exactly two bare module imports
|
| 9 |
+
are relinked to ./ort.webgpu.bundle.min.mjs; all remaining bytes are unchanged.
|
| 10 |
+
This reproduces the previously verified browser import map, including Tensor.
|
| 11 |
+
- ORT MIT and Transformers Apache-2.0 licenses are retained separately. They do
|
| 12 |
+
not replace the model's LFM Open License v1.0.
|
| 13 |
+
|
| 14 |
+
All executable modules/WASM are bundled in the extension, not downloaded remote
|
| 15 |
+
code. Model graph/tokenizer bytes are separately checksum-pinned data assets.
|
| 16 |
+
Runtime and graph precision is FP32 regardless of legacy config.dtype.
|
| 17 |
+
vendor-manifest.json records upstream/copied SHA-256 and the exact linkage edits.
|
runtime/vendor/ThirdPartyNotices.onnxruntime.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runtime/vendor/ort-wasm-simd-threaded.jsep.mjs
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
async function ortWasmThreaded(moduleArg={}){var moduleRtn;var f=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,h=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type,m=ba&&self.name?.startsWith("em-pthread");if(h){const {createRequire:a}=await import("module");var require=a(import.meta.url),ca=require("worker_threads");global.Worker=ca.Worker;m=(ba=!ca.Wd)&&"em-pthread"==ca.workerData}f.mountExternalData=(a,b)=>{a.startsWith("./")&&(a=a.substring(2));(f.ad||(f.ad=new Map)).set(a,b)};
|
| 2 |
+
f.unmountExternalData=()=>{delete f.ad;delete f.Yd;delete f.Xd;delete f.be};var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor;
|
| 3 |
+
const da=a=>async(...b)=>{try{if(f.$c)throw Error("Session already started");const d=f.$c={Nd:b[0],errors:[]},c=await a(...b);if(f.$c!==d)throw Error("Session mismatch");f.hd?.flush();const e=d.errors;if(0<e.length){let g=await Promise.all(e);g=g.filter(k=>k);if(0<g.length)throw Error(g.join("\n"));}return c}finally{f.$c=null}};
|
| 4 |
+
f.jsepInit=(a,b)=>{if("webgpu"===a){[f.hd,f.Dd,f.Hd,f.jd,f.Gd,f.bc,f.Id,f.Kd,f.Ed,f.Fd,f.Jd]=b;const d=f.hd;f.jsepRegisterBuffer=(c,e,g,k)=>d.registerBuffer(c,e,g,k);f.jsepGetBuffer=c=>d.getBuffer(c);f.jsepCreateDownloader=(c,e,g)=>d.createDownloader(c,e,g);f.jsepOnCreateSession=c=>{d.onCreateSession(c)};f.jsepOnReleaseSession=c=>{d.onReleaseSession(c)};f.jsepOnRunStart=c=>d.onRunStart(c);f.Ld=(c,e)=>{d.upload(c,e)}}else if("webnn"===a){const d=b[0];[f.Vd,f.vd,f.webnnEnsureTensor,f.wd,f.webnnDownloadTensor,
|
| 5 |
+
f.Ud,f.webnnEnableTraceEvent]=b.slice(1);f.webnnReleaseTensorId=f.vd;f.webnnUploadTensor=f.wd;f.webnnRegisterMLContext=f.Ud;f.webnnOnRunStart=c=>d.onRunStart(c);f.webnnOnRunEnd=d.onRunEnd.bind(d);f.webnnOnReleaseSession=c=>{d.onReleaseSession(c)};f.webnnCreateMLTensorDownloader=(c,e)=>d.createMLTensorDownloader(c,e);f.webnnRegisterMLTensor=(c,e,g,k)=>d.registerMLTensor(c,e,g,k);f.webnnCreateMLContext=c=>d.createMLContext(c);f.webnnRegisterGraphInput=d.registerGraphInput.bind(d);f.webnnIsGraphInput=
|
| 6 |
+
d.isGraphInput.bind(d);f.webnnRegisterGraphOutput=d.registerGraphOutput.bind(d);f.webnnIsGraphOutput=d.isGraphOutput.bind(d);f.webnnCreateTemporaryTensor=d.createTemporaryTensor.bind(d);f.webnnIsGraphInputOutputTypeSupported=d.isGraphInputOutputTypeSupported.bind(d)}};
|
| 7 |
+
let fa=()=>{const a=b=>(...d)=>{const c=q;d=b(...d);return q!=c?ea():d};(b=>{for(const d of b)f[d]=a(f[d])})(["_OrtAppendExecutionProvider","_OrtCreateSession","_OrtRun","_OrtRunWithBinding","_OrtBindInput"]);"undefined"!==typeof da&&(f._OrtRun=da(f._OrtRun),f._OrtRunWithBinding=da(f._OrtRunWithBinding));fa=void 0};f.asyncInit=()=>{fa?.()};var ha="./this.program",ia=(a,b)=>{throw b;},ja=import.meta.url,ka="",la,ma;
|
| 8 |
+
if(h){var fs=require("fs");ja.startsWith("file:")&&(ka=require("path").dirname(require("url").fileURLToPath(ja))+"/");ma=a=>{a=na(a)?new URL(a):a;return fs.readFileSync(a)};la=async a=>{a=na(a)?new URL(a):a;return fs.readFileSync(a,void 0)};1<process.argv.length&&(ha=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);ia=(a,b)=>{process.exitCode=a;throw b;}}else if(aa||ba){try{ka=(new URL(".",ja)).href}catch{}h||(ba&&(ma=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";
|
| 9 |
+
b.send(null);return new Uint8Array(b.response)}),la=async a=>{if(na(a))return new Promise((d,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?d(e.response):c(e.status)};e.onerror=c;e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url);})}var oa=console.log.bind(console),pa=console.error.bind(console);
|
| 10 |
+
if(h){var qa=require("util"),ra=a=>"object"==typeof a?qa.inspect(a):a;oa=(...a)=>fs.writeSync(1,a.map(ra).join(" ")+"\n");pa=(...a)=>fs.writeSync(2,a.map(ra).join(" ")+"\n")}var sa=oa,r=pa,ta,ua,t=!1,va,na=a=>a.startsWith("file://");function u(){x.buffer!=A.buffer&&wa()}var xa,ya;
|
| 11 |
+
if(h&&m){var za=ca.parentPort;za.on("message",a=>global.onmessage?.({data:a}));Object.assign(globalThis,{self:global,postMessage:a=>za.postMessage(a)});process.on("uncaughtException",a=>{postMessage({Vc:"uncaughtException",error:a});process.exit(1)})}var Aa;
|
| 12 |
+
if(m){var Ba=!1;self.onunhandledrejection=b=>{throw b.reason||b;};function a(b){try{var d=b.data,c=d.Vc;if("load"===c){let e=[];self.onmessage=g=>e.push(g);Aa=()=>{postMessage({Vc:"loaded"});for(let g of e)a(g);self.onmessage=a};for(const g of d.Ad)if(!f[g]||f[g].proxy)f[g]=(...k)=>{postMessage({Vc:"callHandler",yd:g,args:k})},"print"==g&&(sa=f[g]),"printErr"==g&&(r=f[g]);x=d.Rd;wa();ua=d.Sd;Ca();Da()}else if("run"===c){Ea(d.Uc);Fa(d.Uc,0,0,1,0,0);Ga();Ha(d.Uc);Ba||(Ia(),Ba=!0);try{Ja(d.Pd,d.ed)}catch(e){if("unwind"!=
|
| 13 |
+
e)throw e;}}else"setimmediate"!==d.target&&("checkMailbox"===c?Ba&&Ka():c&&(r(`worker: received unknown command ${c}`),r(d)))}catch(e){throw La(),e;}}self.onmessage=a}var A,B,Ma,Na,C,D,Oa,E,F,Pa,Qa=!1;function wa(){var a=x.buffer;f.HEAP8=A=new Int8Array(a);Ma=new Int16Array(a);f.HEAPU8=B=new Uint8Array(a);Na=new Uint16Array(a);f.HEAP32=C=new Int32Array(a);f.HEAPU32=D=new Uint32Array(a);Oa=new Float32Array(a);E=new Float64Array(a);F=new BigInt64Array(a);Pa=new BigUint64Array(a)}
|
| 14 |
+
function Ra(){Qa=!0;m?Aa():G.ub()}function H(a){a="Aborted("+a+")";r(a);t=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ya?.(a);throw a;}var Sa;async function Ta(a){if(!ta)try{var b=await la(a);return new Uint8Array(b)}catch{}if(a==Sa&&ta)a=new Uint8Array(ta);else if(ma)a=ma(a);else throw"both async and sync fetching of the wasm failed";return a}
|
| 15 |
+
async function Ua(a,b){try{var d=await Ta(a);return await WebAssembly.instantiate(d,b)}catch(c){r(`failed to asynchronously prepare wasm: ${c}`),H(c)}}async function Va(a){var b=Sa;if(!ta&&!na(b)&&!h)try{var d=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(d,a)}catch(c){r(`wasm streaming compile failed: ${c}`),r("falling back to ArrayBuffer instantiation")}return Ua(b,a)}
|
| 16 |
+
function Wa(){Xa={ma:Ya,hb:Za,g:$a,J:ab,f:bb,o:cb,i:db,$:eb,b:fb,S:gb,Ha:hb,n:ib,aa:jb,Ya:mb,Da:nb,Fa:ob,Za:pb,Wa:qb,Pa:rb,Va:sb,ka:tb,Ea:ub,Ba:vb,Xa:wb,Ca:xb,cb:yb,fa:zb,wa:Ab,ua:Bb,ea:Cb,N:Db,H:Eb,va:Fb,_:Gb,xa:Hb,Sa:Ib,za:Jb,Ia:Kb,sa:Lb,ga:Mb,Ra:Ha,$a:Nb,Q:Ob,r:Pb,c:Qb,ib:Rb,y:Sb,M:Tb,D:Ub,l:Vb,s:Wb,jb:Xb,I:Yb,R:Zb,j:$b,u:ac,q:bc,k:cc,Ma:dc,Na:ec,Oa:fc,Ka:gc,La:hc,ta:ic,eb:jc,bb:kc,v:lc,ba:mc,ha:nc,ab:oc,V:pc,_a:qc,Aa:rc,F:sc,U:tc,la:uc,ya:vc,gb:wc,fb:xc,Ta:yc,Ua:zc,Ga:Ac,T:Bc,Ja:Cc,ja:Dc,Qa:Ec,
|
| 17 |
+
ia:Fc,lb:Gc,na:Hc,mb:Ic,oa:Jc,G:Kc,e:Lc,t:Mc,w:Nc,B:Oc,nb:Pc,Z:Qc,x:Rc,pa:Sc,X:Tc,ca:Uc,ob:Vc,pb:Wc,O:Xc,qb:Yc,qa:Zc,rb:$c,L:ad,Y:bd,d:cd,A:dd,m:ed,kb:fd,p:gd,z:hd,C:jd,E:kd,K:ld,ra:md,P:nd,da:od,W:pd,sb:qd,tb:rd,h:sd,a:x,db:td};return{a:Xa}}
|
| 18 |
+
async function Ca(){function a(c,e){var g=G=c.exports;c={};for(let [k,l]of Object.entries(g))"function"==typeof l?(g=ud(l),c[k]=g):c[k]=l;G=c;G=vd();wd.push(G.ac);c=G;xd=c.vb;Ia=c.wb;f._OrtInit=c.xb;f._OrtGetLastError=c.yb;f._OrtCreateSessionOptions=c.zb;f._OrtAppendExecutionProvider=c.Ab;f._OrtAddFreeDimensionOverride=c.Bb;f._OrtAddSessionConfigEntry=c.Cb;f._OrtReleaseSessionOptions=c.Db;f._OrtCreateSession=c.Eb;f._OrtReleaseSession=c.Fb;f._OrtGetInputOutputCount=c.Gb;f._OrtGetInputOutputMetadata=
|
| 19 |
+
c.Hb;f._OrtFree=c.Ib;f._OrtCreateTensor=c.Jb;f._OrtGetTensorData=c.Kb;f._OrtReleaseTensor=c.Lb;f._OrtCreateRunOptions=c.Mb;f._OrtAddRunConfigEntry=c.Nb;f._OrtReleaseRunOptions=c.Ob;f._OrtCreateBinding=c.Pb;f._OrtBindInput=c.Qb;f._OrtBindOutput=c.Rb;f._OrtClearBoundOutputs=c.Sb;f._OrtReleaseBinding=c.Tb;f._OrtRunWithBinding=c.Ub;f._OrtRun=c.Vb;f._OrtEndProfiling=c.Wb;f._JsepOutput=c.Xb;f._JsepGetNodeName=c.Yb;yd=c.Zb;I=f._free=c._b;zd=f._malloc=c.$b;Fa=c.cc;La=c.dc;Ad=c.ec;Bd=c.fc;Cd=c.gc;Dd=c.hc;
|
| 20 |
+
Ed=c.ic;J=c.jc;Fd=c.kc;Gd=c.lc;K=c.mc;Hd=c.nc;L=c.oc;Id=c.pc;Jd=c.qc;Kd=c.rc;Ld=c.sc;dynCall_vii=c.tc;Md=c.uc;dynCall_v=c.vc;Nd=c.wc;Od=c.xc;dynCall_iii=c.yc;Pd=c.zc;Qd=c.Ac;Rd=c.Bc;Sd=c.Cc;dynCall_vi=c.Dc;Td=c.Ec;Ud=c.Fc;Vd=c.Gc;Wd=c.Hc;Xd=c.Ic;Yd=c.Jc;Zd=c.Kc;$d=c.Lc;ae=c.Mc;be=c.Nc;ce=c.Oc;de=c.Pc;ee=c.Qc;fe=c.Sc;ge=c.Tc;he=c.cd;ie=c.dd;je=c.id;ke=c.nd;le=c.od;me=c.pd;ne=c.qd;oe=c.rd;pe=c.sd;qe=c.td;re=c.ud;se=c.zd;te=c.Zd;ue=c._d;ve=c.$d;we=c.ae;ua=e;return G}var b=Wa();if(f.instantiateWasm)return new Promise(c=>
|
| 21 |
+
{f.instantiateWasm(b,(e,g)=>{c(a(e,g))})});if(m){var d=new WebAssembly.Instance(ua,Wa());return a(d,ua)}Sa??=f.locateFile?f.locateFile?f.locateFile("ort-wasm-simd-threaded.jsep.wasm",ka):ka+"ort-wasm-simd-threaded.jsep.wasm":(new URL("ort-wasm-simd-threaded.jsep.wasm",import.meta.url)).href;return function(c){return a(c.instance,c.module)}(await Va(b))}class xe{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
| 22 |
+
var ye=a=>{a.terminate();a.onmessage=()=>{}},ze=[],Ae=0,Be=null,Fe=a=>{0==M.length&&(Ce(),De(M[0]));var b=M.pop();if(!b)return 6;Ee.push(b);N[a.Uc]=b;b.Uc=a.Uc;var d={Vc:"run",Pd:a.Od,ed:a.ed,Uc:a.Uc};h&&b.unref();b.postMessage(d,a.md);return 0},O=0,P=(a,b,...d)=>{var c=16*d.length,e=L(),g=Hd(c),k=g>>>3,l;for(l of d)"bigint"==typeof l?((u(),F)[k++>>>0]=1n,(u(),F)[k++>>>0]=l):((u(),F)[k++>>>0]=0n,(u(),E)[k++>>>0]=l);a=Ad(a,0,c,g,b);K(e);return a};
|
| 23 |
+
function td(a){if(m)return P(0,1,a);va=a;if(!(0<O)){for(var b of Ee)ye(b);for(b of M)ye(b);M=[];Ee=[];N={};t=!0}ia(a,new xe(a))}function Ge(a){if(m)return P(1,0,a);Ac(a)}var Ac=a=>{va=a;if(m)throw Ge(a),"unwind";td(a)},M=[],Ee=[],wd=[],N={};function He(){for(var a=f.numThreads-1;a--;)Ce();ze.push(async()=>{var b=Ie();Ae++;await b;Ae--;0==Ae&&Be&&(b=Be,Be=null,b())})}var Je=a=>{var b=a.Uc;delete N[b];M.push(a);Ee.splice(Ee.indexOf(a),1);a.Uc=0;Bd(b)};function Ga(){wd.forEach(a=>a())}
|
| 24 |
+
var De=a=>new Promise(b=>{a.onmessage=g=>{var k=g.data;g=k.Vc;if(k.bd&&k.bd!=yd()){var l=N[k.bd];l?l.postMessage(k,k.md):r(`Internal error! Worker sent a message "${g}" to target pthread ${k.bd}, but that thread no longer exists!`)}else if("checkMailbox"===g)Ka();else if("spawnThread"===g)Fe(k);else if("cleanupThread"===g)Ke(()=>{Je(N[k.Qd])});else if("loaded"===g)a.loaded=!0,h&&!a.Uc&&a.unref(),b(a);else if("setimmediate"===k.target)a.postMessage(k);else if("uncaughtException"===g)a.onerror(k.error);
|
| 25 |
+
else if("callHandler"===g)f[k.yd](...k.args);else g&&r(`worker sent an unknown command ${g}`)};a.onerror=g=>{r(`${"worker sent an error!"} ${g.filename}:${g.lineno}: ${g.message}`);throw g;};h&&(a.on("message",g=>a.onmessage({data:g})),a.on("error",g=>a.onerror(g)));var d=[],c=[],e;for(e of c)f.propertyIsEnumerable(e)&&d.push(e);a.postMessage({Vc:"load",Ad:d,Rd:x,Sd:ua})});async function Ie(){if(!m)return Promise.all(M.map(De))}
|
| 26 |
+
function Ce(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});M.push(a)}function Ea(a){var b=(u(),D)[a+52>>>2>>>0];a=(u(),D)[a+56>>>2>>>0];Gd(b,b-a);K(b)}var Ja=(a,b)=>{O=0;a=Md(a,b);0<O?va=a:Cd(a)},x,Le=[],Me=0;function $a(a){a>>>=0;var b=new Ne(a);0==(u(),A)[b.Wc+12>>>0]&&(Oe(b,!0),Me--);Pe(b,!1);Le.push(b);return Ld(a)}var Q=0,ab=()=>{J(0,0);var a=Le.pop();Id(a.gd);Q=0};
|
| 27 |
+
function Oe(a,b){b=b?1:0;(u(),A)[a.Wc+12>>>0]=b}function Pe(a,b){b=b?1:0;(u(),A)[a.Wc+13>>>0]=b}class Ne{constructor(a){this.gd=a;this.Wc=a-24}}var Qe=a=>{var b=Q;if(!b)return Fd(0),0;var d=new Ne(b);(u(),D)[d.Wc+16>>>2>>>0]=b;var c=(u(),D)[d.Wc+4>>>2>>>0];if(!c)return Fd(0),b;for(var e of a){if(0===e||e===c)break;if(Kd(e,c,d.Wc+16))return Fd(e),b}Fd(c);return b};function bb(){return Qe([])}function cb(a){return Qe([a>>>0])}function db(a,b,d,c){return Qe([a>>>0,b>>>0,d>>>0,c>>>0])}
|
| 28 |
+
var eb=()=>{var a=Le.pop();a||H("no exception to throw");var b=a.gd;0==(u(),A)[a.Wc+13>>>0]&&(Le.push(a),Pe(a,!0),Oe(a,!1),Me++);Jd(b);Q=b;throw Q;};function fb(a,b,d){a>>>=0;var c=new Ne(a);b>>>=0;d>>>=0;(u(),D)[c.Wc+16>>>2>>>0]=0;(u(),D)[c.Wc+4>>>2>>>0]=b;(u(),D)[c.Wc+8>>>2>>>0]=d;Jd(a);Q=a;Me++;throw Q;}var gb=()=>Me;function Re(a,b,d,c){return m?P(2,1,a,b,d,c):hb(a,b,d,c)}
|
| 29 |
+
function hb(a,b,d,c){a>>>=0;b>>>=0;d>>>=0;c>>>=0;if(!globalThis.SharedArrayBuffer)return 6;var e=[];if(m&&0===e.length)return Re(a,b,d,c);a={Od:d,Uc:a,ed:c,md:e};return m?(a.Vc="spawnThread",postMessage(a,e),0):Fe(a)}function ib(a){Q||=a>>>0;throw Q;}
|
| 30 |
+
var Se=globalThis.TextDecoder&&new TextDecoder,Te=(a,b,d,c)=>{d=b+d;if(c)return d;for(;a[b]&&!(b>=d);)++b;return b},Ue=(a,b=0,d,c)=>{b>>>=0;d=Te(a,b,d,c);if(16<d-b&&a.buffer&&Se)return Se.decode(a.buffer instanceof ArrayBuffer?a.subarray(b,d):a.slice(b,d));for(c="";b<d;){var e=a[b++];if(e&128){var g=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|g);else{var k=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|k:(e&7)<<18|g<<12|k<<6|a[b++]&63;65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|
|
| 31 |
+
e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}return c},R=(a,b,d)=>(a>>>=0)?Ue((u(),B),a,b,d):"";function jb(a,b,d){return m?P(3,1,a,b,d):0}function mb(a,b){if(m)return P(4,1,a,b)}function nb(a,b){if(m)return P(5,1,a,b)}function ob(a,b,d){if(m)return P(6,1,a,b,d)}function pb(a,b,d){return m?P(7,1,a,b,d):0}function qb(a,b){if(m)return P(8,1,a,b)}function rb(a,b,d){if(m)return P(9,1,a,b,d)}function sb(a,b,d,c){if(m)return P(10,1,a,b,d,c)}function tb(a,b,d,c){if(m)return P(11,1,a,b,d,c)}
|
| 32 |
+
function ub(a,b,d,c){if(m)return P(12,1,a,b,d,c)}function vb(a){if(m)return P(13,1,a)}function wb(a,b){if(m)return P(14,1,a,b)}function xb(a,b,d){if(m)return P(15,1,a,b,d)}var yb=()=>H(""),S=a=>{a>>>=0;for(var b="";;){var d=(u(),B)[a++>>>0];if(!d)return b;b+=String.fromCharCode(d)}},Ve={},We={},Xe={},Ye=class extends Error{constructor(a){super(a);this.name="BindingError"}};
|
| 33 |
+
function Ze(a,b,d={}){var c=b.name;if(!a)throw new Ye(`type "${c}" must have a positive integer typeid pointer`);if(We.hasOwnProperty(a)){if(d.Bd)return;throw new Ye(`Cannot register type '${c}' twice`);}We[a]=b;delete Xe[a];Ve.hasOwnProperty(a)&&(b=Ve[a],delete Ve[a],b.forEach(e=>e()))}function T(a,b,d={}){return Ze(a,b,d)}
|
| 34 |
+
var $e=(a,b,d)=>{switch(b){case 1:return d?c=>(u(),A)[c>>>0]:c=>(u(),B)[c>>>0];case 2:return d?c=>(u(),Ma)[c>>>1>>>0]:c=>(u(),Na)[c>>>1>>>0];case 4:return d?c=>(u(),C)[c>>>2>>>0]:c=>(u(),D)[c>>>2>>>0];case 8:return d?c=>(u(),F)[c>>>3>>>0]:c=>(u(),Pa)[c>>>3>>>0];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}};
|
| 35 |
+
function zb(a,b,d,c,e){a>>>=0;d>>>=0;b=S(b>>>0);c=0n===c;let g=k=>k;if(c){const k=8*d;g=l=>BigInt.asUintN(k,l);e=g(e)}T(a,{name:b,Rc:g,Yc:(k,l)=>{"number"==typeof l&&(l=BigInt(l));return l},Xc:$e(b,d,!c),Zc:null})}function Ab(a,b,d,c){a>>>=0;b=S(b>>>0);T(a,{name:b,Rc:function(e){return!!e},Yc:function(e,g){return g?d:c},Xc:function(e){return this.Rc((u(),B)[e>>>0])},Zc:null})}var af=[],U=[0,1,,1,null,1,!0,1,!1,1];function Qb(a){a>>>=0;9<a&&0===--U[a+1]&&(U[a]=void 0,af.push(a))}
|
| 36 |
+
var V=a=>{if(!a)throw new Ye(`Cannot use deleted val. handle = ${a}`);return U[a]},X=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=af.pop()||U.length;U[b]=a;U[b+1]=1;return b}};function bf(a){return this.Rc((u(),D)[a>>>2>>>0])}var cf={name:"emscripten::val",Rc:a=>{var b=V(a);Qb(a);return b},Yc:(a,b)=>X(b),Xc:bf,Zc:null};function Bb(a){return T(a>>>0,cf)}
|
| 37 |
+
var df=(a,b)=>{switch(b){case 4:return function(d){return this.Rc((u(),Oa)[d>>>2>>>0])};case 8:return function(d){return this.Rc((u(),E)[d>>>3>>>0])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}};function Cb(a,b,d){a>>>=0;d>>>=0;b=S(b>>>0);T(a,{name:b,Rc:c=>c,Yc:(c,e)=>e,Xc:df(b,d),Zc:null})}function Db(a,b,d,c,e){a>>>=0;d>>>=0;b=S(b>>>0);let g=l=>l;if(0===c){var k=32-8*d;g=l=>l<<k>>>k;e=g(e)}T(a,{name:b,Rc:g,Yc:(l,n)=>n,Xc:$e(b,d,0!==c),Zc:null})}
|
| 38 |
+
function Eb(a,b,d){function c(g){var k=(u(),D)[g>>>2>>>0];g=(u(),D)[g+4>>>2>>>0];return new e((u(),A).buffer,g,k)}a>>>=0;var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];d=S(d>>>0);T(a,{name:d,Rc:c,Xc:c},{Bd:!0})}
|
| 39 |
+
var Y=(a,b,d)=>{var c=(u(),B);b>>>=0;if(0<d){var e=b;d=b+d-1;for(var g=0;g<a.length;++g){var k=a.codePointAt(g);if(127>=k){if(b>=d)break;c[b++>>>0]=k}else if(2047>=k){if(b+1>=d)break;c[b++>>>0]=192|k>>6;c[b++>>>0]=128|k&63}else if(65535>=k){if(b+2>=d)break;c[b++>>>0]=224|k>>12;c[b++>>>0]=128|k>>6&63;c[b++>>>0]=128|k&63}else{if(b+3>=d)break;c[b++>>>0]=240|k>>18;c[b++>>>0]=128|k>>12&63;c[b++>>>0]=128|k>>6&63;c[b++>>>0]=128|k&63;g++}}c[b>>>0]=0;a=b-e}else a=0;return a},ef=a=>{for(var b=0,d=0;d<a.length;++d){var c=
|
| 40 |
+
a.charCodeAt(d);127>=c?b++:2047>=c?b+=2:55296<=c&&57343>=c?(b+=4,++d):b+=3}return b};
|
| 41 |
+
function Fb(a,b){a>>>=0;b=S(b>>>0);T(a,{name:b,Rc(d){var c=(u(),D)[d>>>2>>>0];c=R(d+4,c,!0);I(d);return c},Yc(d,c){c instanceof ArrayBuffer&&(c=new Uint8Array(c));var e="string"==typeof c;if(!(e||ArrayBuffer.isView(c)&&1==c.BYTES_PER_ELEMENT))throw new Ye("Cannot pass non-string to std::string");var g=e?ef(c):c.length;var k=zd(4+g+1),l=k+4;(u(),D)[k>>>2>>>0]=g;e?Y(c,l,g+1):(u(),B).set(c,l>>>0);null!==d&&d.push(I,k);return k},Xc:bf,Zc(d){I(d)}})}
|
| 42 |
+
var ff=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,gf=(a,b,d)=>{a>>>=1;b=Te((u(),Na),a,b/2,d);if(16<b-a&&ff)return ff.decode((u(),Na).slice(a,b));for(d="";a<b;++a){var c=(u(),Na)[a>>>0];d+=String.fromCharCode(c)}return d},hf=(a,b,d)=>{d??=2147483647;if(2>d)return 0;d-=2;var c=b;d=d<2*a.length?d/2:a.length;for(var e=0;e<d;++e){var g=a.charCodeAt(e);(u(),Ma)[b>>>1>>>0]=g;b+=2}(u(),Ma)[b>>>1>>>0]=0;return b-c},jf=a=>2*a.length,kf=(a,b,d)=>{var c="";a>>>=2;for(var e=0;!(e>=b/4);e++){var g=
|
| 43 |
+
(u(),D)[a+e>>>0];if(!g&&!d)break;c+=String.fromCodePoint(g)}return c},lf=(a,b,d)=>{b>>>=0;d??=2147483647;if(4>d)return 0;var c=b;d=c+d-4;for(var e=0;e<a.length;++e){var g=a.codePointAt(e);65535<g&&e++;(u(),C)[b>>>2>>>0]=g;b+=4;if(b+4>d)break}(u(),C)[b>>>2>>>0]=0;return b-c},mf=a=>{for(var b=0,d=0;d<a.length;++d)65535<a.codePointAt(d)&&d++,b+=4;return b};
|
| 44 |
+
function Gb(a,b,d){a>>>=0;b>>>=0;d>>>=0;d=S(d);if(2===b){var c=gf;var e=hf;var g=jf}else c=kf,e=lf,g=mf;T(a,{name:d,Rc:k=>{var l=(u(),D)[k>>>2>>>0];l=c(k+4,l*b,!0);I(k);return l},Yc:(k,l)=>{if("string"!=typeof l)throw new Ye(`Cannot pass non-string to C++ string type ${d}`);var n=g(l),p=zd(4+n+b);(u(),D)[p>>>2>>>0]=n/b;e(l,p+4,n+b);null!==k&&k.push(I,p);return p},Xc:bf,Zc(k){I(k)}})}function Hb(a,b){a>>>=0;b=S(b>>>0);T(a,{Cd:!0,name:b,Rc:()=>{},Yc:()=>{}})}
|
| 45 |
+
function Ib(a){Fa(a>>>0,!ba,1,!aa,131072,!1);Ga()}var Ke=a=>{if(!t)try{if(a(),!(0<O))try{m?yd()&&Cd(va):Ac(va)}catch(b){b instanceof xe||"unwind"==b||ia(1,b)}}catch(b){b instanceof xe||"unwind"==b||ia(1,b)}},nf=!Atomics.waitAsync||globalThis.navigator?.userAgent&&91>Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]);function Ha(a){a>>>=0;nf||(Atomics.waitAsync((u(),C),a>>>2,a).value.then(Ka),a+=128,Atomics.store((u(),C),a>>>2,1))}var Ka=()=>Ke(()=>{var a=yd();a&&(Ha(a),Ed())});
|
| 46 |
+
function Jb(a,b){a>>>=0;a==b>>>0?setTimeout(Ka):m?postMessage({bd:a,Vc:"checkMailbox"}):(a=N[a])&&a.postMessage({Vc:"checkMailbox"})}var of=[];function Kb(a,b,d,c,e){b>>>=0;e>>>=0;of.length=0;d=e>>>3;for(c=e+c>>>3;d<c;){var g;(u(),F)[d++>>>0]?g=(u(),F)[d++>>>0]:g=(u(),E)[d++>>>0];of.push(g)}return(b?pf[b]:qf[a])(...of)}var Lb=()=>{O=0};function Mb(a){a>>>=0;m?postMessage({Vc:"cleanupThread",Qd:a}):Je(N[a])}function Nb(a){h&&N[a>>>0].ref()}var rf=a=>{try{a()}catch(b){H(b)}};
|
| 47 |
+
function ud(a){var b=(...d)=>{sf.push(a);try{return a(...d)}finally{t||(sf.pop(),q&&1===Z&&0===sf.length&&(Z=0,O+=1,rf(ue),"undefined"!=typeof Fibers&&Fibers.de()))}};tf.set(a,b);return b}var Z=0,q=null,uf=0,sf=[],vf=new Map,wf=new Map,tf=new Map,xf=0,yf=null,zf=[];function ea(){return new Promise((a,b)=>{yf={resolve:a,reject:b}})}
|
| 48 |
+
function Af(){var a=zd(65548),b=a+12;(u(),D)[a>>>2>>>0]=b;(u(),D)[a+4>>>2>>>0]=b+65536;b=sf[0];if(!vf.has(b)){var d=xf++;vf.set(b,d);wf.set(d,b)}b=vf.get(b);(u(),C)[a+8>>>2>>>0]=b;return a}function Bf(){var a=(u(),C)[q+8>>>2>>>0];a=wf.get(a);a=tf.get(a);--O;return a()}
|
| 49 |
+
function Cf(a){if(!t){if(0===Z){var b=!1,d=!1;a((c=0)=>{if(!t&&(uf=c,b=!0,d)){Z=2;rf(()=>ve(q));"undefined"!=typeof MainLoop&&MainLoop.xd&&MainLoop.resume();c=!1;try{var e=Bf()}catch(l){e=l,c=!0}var g=!1;if(!q){var k=yf;k&&(yf=null,(c?k.reject:k.resolve)(e),g=!0)}if(c&&!g)throw e;}});d=!0;b||(Z=1,q=Af(),"undefined"!=typeof MainLoop&&MainLoop.xd&&MainLoop.pause(),rf(()=>te(q)))}else 2===Z?(Z=0,rf(we),I(q),q=null,zf.forEach(Ke)):H(`invalid state: ${Z}`);return uf}}var Df=a=>Cf(b=>{a().then(b)});
|
| 50 |
+
function Ob(a){a>>>=0;return Df(async()=>{var b=await V(a);return X(b)})}var Ef=[],Ff=a=>{var b=Ef.length;Ef.push(a);return b},Gf=(a,b)=>{for(var d=Array(a),c=0;c<a;++c){var e=c,g=(u(),D)[b+4*c>>>2>>>0],k=We[g];if(void 0===k)throw a=`parameter ${c}`,g=xd(g),b=S(g),I(g),new Ye(`${a} has unknown type ${b}`);d[e]=k}return d},Hf=(a,b,d)=>{var c=[];a=a(c,d);c.length&&((u(),D)[b>>>2>>>0]=X(c));return a},If={},Jf=a=>{var b=If[a];return void 0===b?S(a):b};
|
| 51 |
+
function Pb(a,b,d){var [c,...e]=Gf(a,b>>>0);b=c.Yc.bind(c);var g=e.map(n=>n.Xc.bind(n));a--;var k={toValue:V};a=g.map((n,p)=>{var v=`argFromPtr${p}`;k[v]=n;return`${v}(args${p?"+"+8*p:""})`});switch(d){case 0:var l="toValue(handle)";break;case 2:l="new (toValue(handle))";break;case 3:l="";break;case 1:k.getStringOrSymbol=Jf,l="toValue(handle)[getStringOrSymbol(methodName)]"}l+=`(${a})`;c.Cd||(k.toReturnWire=b,k.emval_returnValue=Hf,l=`return emval_returnValue(toReturnWire, destructorsRef, ${l})`);
|
| 52 |
+
l=`return function (handle, methodName, destructorsRef, args) {\n ${l}\n }`;d=(new Function(Object.keys(k),l))(...Object.values(k));l=`methodCaller<(${e.map(n=>n.name)}) => ${c.name}>`;return Ff(Object.defineProperty(d,"name",{value:l}))}function Rb(a,b){b>>>=0;a=V(a>>>0);b=V(b);return a==b}function Sb(a){a>>>=0;if(!a)return X(globalThis);a=Jf(a);return X(globalThis[a])}function Tb(a){a=Jf(a>>>0);return X(f[a])}function Ub(a,b){b>>>=0;a=V(a>>>0);b=V(b);return X(a[b])}
|
| 53 |
+
function Vb(a){a>>>=0;9<a&&(U[a+1]+=1)}function Wb(a,b,d,c,e){return Ef[a>>>0](b>>>0,d>>>0,c>>>0,e>>>0)}function Xb(a,b,d,c,e){return Wb(a>>>0,b>>>0,d>>>0,c>>>0,e>>>0)}function Yb(){return X([])}function Zb(a){a=V(a>>>0);for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a[d];return X(b)}function $b(a){return X(Jf(a>>>0))}function ac(){return X({})}function bc(a){a>>>=0;for(var b=V(a);b.length;){var d=b.pop();b.pop()(d)}Qb(a)}function cc(a,b,d){b>>>=0;d>>>=0;a=V(a>>>0);b=V(b);d=V(d);a[b]=d}
|
| 54 |
+
function dc(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);(u(),C)[b>>>2>>>0]=a.getUTCSeconds();(u(),C)[b+4>>>2>>>0]=a.getUTCMinutes();(u(),C)[b+8>>>2>>>0]=a.getUTCHours();(u(),C)[b+12>>>2>>>0]=a.getUTCDate();(u(),C)[b+16>>>2>>>0]=a.getUTCMonth();(u(),C)[b+20>>>2>>>0]=a.getUTCFullYear()-1900;(u(),C)[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;(u(),C)[b+28>>>2>>>0]=a}
|
| 55 |
+
var Kf=a=>0===a%4&&(0!==a%100||0===a%400),Lf=[0,31,60,91,121,152,182,213,244,274,305,335],Mf=[0,31,59,90,120,151,181,212,243,273,304,334];
|
| 56 |
+
function ec(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);(u(),C)[b>>>2>>>0]=a.getSeconds();(u(),C)[b+4>>>2>>>0]=a.getMinutes();(u(),C)[b+8>>>2>>>0]=a.getHours();(u(),C)[b+12>>>2>>>0]=a.getDate();(u(),C)[b+16>>>2>>>0]=a.getMonth();(u(),C)[b+20>>>2>>>0]=a.getFullYear()-1900;(u(),C)[b+24>>>2>>>0]=a.getDay();var d=(Kf(a.getFullYear())?Lf:Mf)[a.getMonth()]+a.getDate()-1|0;(u(),C)[b+28>>>2>>>0]=d;(u(),C)[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());d=(new Date(a.getFullYear(),
|
| 57 |
+
6,1)).getTimezoneOffset();var c=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;(u(),C)[b+32>>>2>>>0]=a}
|
| 58 |
+
function fc(a){a>>>=0;var b=new Date((u(),C)[a+20>>>2>>>0]+1900,(u(),C)[a+16>>>2>>>0],(u(),C)[a+12>>>2>>>0],(u(),C)[a+8>>>2>>>0],(u(),C)[a+4>>>2>>>0],(u(),C)[a>>>2>>>0],0),d=(u(),C)[a+32>>>2>>>0],c=b.getTimezoneOffset(),e=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),g=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(g,e);0>d?(u(),C)[a+32>>>2>>>0]=Number(e!=g&&k==c):0<d!=(k==c)&&(e=Math.max(g,e),b.setTime(b.getTime()+6E4*((0<d?k:e)-c)));(u(),C)[a+24>>>2>>>0]=b.getDay();d=(Kf(b.getFullYear())?
|
| 59 |
+
Lf:Mf)[b.getMonth()]+b.getDate()-1|0;(u(),C)[a+28>>>2>>>0]=d;(u(),C)[a>>>2>>>0]=b.getSeconds();(u(),C)[a+4>>>2>>>0]=b.getMinutes();(u(),C)[a+8>>>2>>>0]=b.getHours();(u(),C)[a+12>>>2>>>0]=b.getDate();(u(),C)[a+16>>>2>>>0]=b.getMonth();(u(),C)[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function gc(a,b,d,c,e,g,k){return m?P(16,1,a,b,d,c,e,g,k):-52}function hc(a,b,d,c,e,g){if(m)return P(17,1,a,b,d,c,e,g)}var Nf={},sc=()=>performance.timeOrigin+performance.now();
|
| 60 |
+
function ic(a,b){if(m)return P(18,1,a,b);Nf[a]&&(clearTimeout(Nf[a].id),delete Nf[a]);if(!b)return 0;var d=setTimeout(()=>{delete Nf[a];Ke(()=>Dd(a,performance.timeOrigin+performance.now()))},b);Nf[a]={id:d,ce:b};return 0}
|
| 61 |
+
function jc(a,b,d,c){a>>>=0;b>>>=0;d>>>=0;c>>>=0;var e=(new Date).getFullYear(),g=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();var k=Math.max(g,e);(u(),D)[a>>>2>>>0]=60*k;(u(),C)[b>>>2>>>0]=Number(g!=e);b=l=>{var n=Math.abs(l);return`UTC${0<=l?"-":"+"}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`};a=b(g);b=b(e);e<g?(Y(a,d,17),Y(b,c,17)):(Y(a,c,17),Y(b,d,17))}var oc=()=>Date.now(),Of=1;
|
| 62 |
+
function kc(a,b,d){d>>>=0;if(!(0<=a&&3>=a))return 28;if(0===a)a=Date.now();else if(Of)a=performance.timeOrigin+performance.now();else return 52;a=Math.round(1E6*a);(u(),F)[d>>>3>>>0]=BigInt(a);return 0}var Pf=[],Qf=(a,b)=>{Pf.length=0;for(var d;d=(u(),B)[a++>>>0];){var c=105!=d;c&=112!=d;b+=c&&b%8?4:0;Pf.push(112==d?(u(),D)[b>>>2>>>0]:106==d?(u(),F)[b>>>3>>>0]:105==d?(u(),C)[b>>>2>>>0]:(u(),E)[b>>>3>>>0]);b+=c?8:4}return Pf};function lc(a,b,d){a>>>=0;b=Qf(b>>>0,d>>>0);return pf[a](...b)}
|
| 63 |
+
function mc(a,b,d){a>>>=0;b=Qf(b>>>0,d>>>0);return pf[a](...b)}var nc=()=>{};function pc(a,b){return r(R(a>>>0,b>>>0))}var qc=()=>{O+=1;throw"unwind";};function rc(){return 4294901760}var tc=()=>h?require("os").cpus().length:navigator.hardwareConcurrency,Rf={},Sf=a=>{var b;return(b=/\bwasm-function\[\d+\]:(0x[0-9a-f]+)/.exec(a))?+b[1]:(b=/:(\d+):\d+(?:\)|$)/.exec(a))?2147483648|+b[1]:0},Tf=a=>{for(var b of a)(a=Sf(b))&&(Rf[a]=b)};
|
| 64 |
+
function wc(){var a=Error().stack.toString().split("\n");"Error"==a[0]&&a.shift();Tf(a);Rf.kd=Sf(a[3]);Rf.Md=a;return Rf.kd}function uc(a){a=Rf[a>>>0];if(!a)return 0;var b;if(b=/^\s+at .*\.wasm\.(.*) \(.*\)$/.exec(a))a=b[1];else if(b=/^\s+at (.*) \(.*\)$/.exec(a))a=b[1];else if(b=/^(.+?)@/.exec(a))a=b[1];else return 0;I(uc.ld??0);b=ef(a)+1;var d=zd(b);d&&Y(a,d,b);uc.ld=d;return uc.ld}
|
| 65 |
+
function vc(a){a>>>=0;var b=(u(),B).length;if(a<=b||4294901760<a)return!1;for(var d=1;4>=d;d*=2){var c=b*(1+.2/d);c=Math.min(c,a+100663296);a:{c=(Math.min(4294901760,65536*Math.ceil(Math.max(a,c)/65536))-x.buffer.byteLength+65535)/65536|0;try{x.grow(c);wa();var e=1;break a}catch(g){}e=void 0}if(e)return!0}return!1}
|
| 66 |
+
function xc(a,b,d){a>>>=0;b>>>=0;if(Rf.kd==a)var c=Rf.Md;else c=Error().stack.toString().split("\n"),"Error"==c[0]&&c.shift(),Tf(c);for(var e=3;c[e]&&Sf(c[e])!=a;)++e;for(a=0;a<d&&c[a+e];++a)(u(),C)[b+4*a>>>2>>>0]=Sf(c[a+e]);return a}
|
| 67 |
+
var Uf={},Wf=()=>{if(!Vf){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:ha||"./this.program"},b;for(b in Uf)void 0===Uf[b]?delete a[b]:a[b]=Uf[b];var d=[];for(b in a)d.push(`${b}=${a[b]}`);Vf=d}return Vf},Vf;function yc(a,b){if(m)return P(19,1,a,b);a>>>=0;b>>>=0;var d=0,c=0,e;for(e of Wf()){var g=b+d;(u(),D)[a+c>>>2>>>0]=g;d+=Y(e,g,Infinity)+1;c+=4}return 0}
|
| 68 |
+
function zc(a,b){if(m)return P(20,1,a,b);a>>>=0;b>>>=0;var d=Wf();(u(),D)[a>>>2>>>0]=d.length;a=0;for(var c of d)a+=ef(c)+1;(u(),D)[b>>>2>>>0]=a;return 0}function Bc(a){return m?P(21,1,a):52}function Cc(a,b,d,c,e){return m?P(22,1,a,b,d,c,e):52}function Dc(a,b,d,c){return m?P(23,1,a,b,d,c):52}function Ec(a,b,d,c){return m?P(24,1,a,b,d,c):70}var Xf=[null,[],[]];
|
| 69 |
+
function Fc(a,b,d,c){if(m)return P(25,1,a,b,d,c);b>>>=0;d>>>=0;c>>>=0;for(var e=0,g=0;g<d;g++){var k=(u(),D)[b>>>2>>>0],l=(u(),D)[b+4>>>2>>>0];b+=8;for(var n=0;n<l;n++){var p=a,v=(u(),B)[k+n>>>0],w=Xf[p];0===v||10===v?((1===p?sa:r)(Ue(w)),w.length=0):w.push(v)}e+=l}(u(),D)[c>>>2>>>0]=e;return 0}function sd(a){return a>>>0}m||He();m||(x=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),wa());f.wasmBinary&&(ta=f.wasmBinary);f.stackSave=()=>L();f.stackRestore=a=>K(a);f.stackAlloc=a=>Hd(a);
|
| 70 |
+
f.setValue=function(a,b,d="i8"){d.endsWith("*")&&(d="*");switch(d){case "i1":(u(),A)[a>>>0]=b;break;case "i8":(u(),A)[a>>>0]=b;break;case "i16":(u(),Ma)[a>>>1>>>0]=b;break;case "i32":(u(),C)[a>>>2>>>0]=b;break;case "i64":(u(),F)[a>>>3>>>0]=BigInt(b);break;case "float":(u(),Oa)[a>>>2>>>0]=b;break;case "double":(u(),E)[a>>>3>>>0]=b;break;case "*":(u(),D)[a>>>2>>>0]=b;break;default:H(`invalid type for setValue: ${d}`)}};
|
| 71 |
+
f.getValue=function(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return(u(),A)[a>>>0];case "i8":return(u(),A)[a>>>0];case "i16":return(u(),Ma)[a>>>1>>>0];case "i32":return(u(),C)[a>>>2>>>0];case "i64":return(u(),F)[a>>>3>>>0];case "float":return(u(),Oa)[a>>>2>>>0];case "double":return(u(),E)[a>>>3>>>0];case "*":return(u(),D)[a>>>2>>>0];default:H(`invalid type for getValue: ${b}`)}};f.UTF8ToString=R;f.stringToUTF8=Y;f.lengthBytesUTF8=ef;
|
| 72 |
+
var qf=[td,Ge,Re,jb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,gc,hc,ic,yc,zc,Bc,Cc,Dc,Ec,Fc],pf={1087708:(a,b,d,c,e)=>{if("undefined"==typeof f||!f.ad)return 1;a=R(Number(a>>>0));a.startsWith("./")&&(a=a.substring(2));a=f.ad.get(a);if(!a)return 2;b=Number(b>>>0);d=Number(d>>>0);c=Number(c>>>0);if(b+d>a.byteLength)return 3;try{const g=a.subarray(b,b+d);switch(e){case 0:(u(),B).set(g,c>>>0);break;case 1:f.Td?f.Td(c,g):f.Ld(c,g);break;default:return 4}return 0}catch{return 4}},1088532:(a,b,d)=>{f.wd(a,(u(),
|
| 73 |
+
B).subarray(b>>>0,b+d>>>0))},1088596:()=>f.Vd(),1088638:a=>{f.vd(a)},1088675:()=>{f.Ed()},1088706:()=>{f.Fd()},1088735:()=>{f.Jd()},1088760:a=>f.Dd(a),1088793:a=>f.Hd(a),1088825:(a,b,d)=>{f.jd(Number(a),Number(b),Number(d),!0)},1088888:(a,b,d)=>{f.jd(Number(a),Number(b),Number(d))},1088945:()=>"undefined"!==typeof wasmOffsetConverter,1089002:a=>{f.bc("Abs",a,void 0)},1089053:a=>{f.bc("Neg",a,void 0)},1089104:a=>{f.bc("Floor",a,void 0)},1089157:a=>{f.bc("Ceil",a,void 0)},1089209:a=>{f.bc("Reciprocal",
|
| 74 |
+
a,void 0)},1089267:a=>{f.bc("Sqrt",a,void 0)},1089319:a=>{f.bc("Exp",a,void 0)},1089370:a=>{f.bc("Erf",a,void 0)},1089421:a=>{f.bc("Sigmoid",a,void 0)},1089476:(a,b,d)=>{f.bc("HardSigmoid",a,{alpha:b,beta:d})},1089555:a=>{f.bc("HardSwish",a,void 0)},1089612:a=>{f.bc("Log",a,void 0)},1089663:a=>{f.bc("Sin",a,void 0)},1089714:a=>{f.bc("Cos",a,void 0)},1089765:a=>{f.bc("Tan",a,void 0)},1089816:a=>{f.bc("Asin",a,void 0)},1089868:a=>{f.bc("Acos",a,void 0)},1089920:a=>{f.bc("Atan",a,void 0)},1089972:a=>
|
| 75 |
+
{f.bc("Sinh",a,void 0)},1090024:a=>{f.bc("Cosh",a,void 0)},1090076:a=>{f.bc("Asinh",a,void 0)},1090129:a=>{f.bc("Acosh",a,void 0)},1090182:a=>{f.bc("Atanh",a,void 0)},1090235:a=>{f.bc("Tanh",a,void 0)},1090287:a=>{f.bc("Not",a,void 0)},1090338:(a,b,d)=>{f.bc("Clip",a,{min:b,max:d})},1090407:a=>{f.bc("Clip",a,void 0)},1090459:(a,b)=>{f.bc("Elu",a,{alpha:b})},1090517:a=>{f.bc("Gelu",a,void 0)},1090569:a=>{f.bc("Relu",a,void 0)},1090621:(a,b)=>{f.bc("LeakyRelu",a,{alpha:b})},1090685:(a,b)=>{f.bc("ThresholdedRelu",
|
| 76 |
+
a,{alpha:b})},1090755:(a,b)=>{f.bc("Cast",a,{to:b})},1090813:a=>{f.bc("Add",a,void 0)},1090864:a=>{f.bc("Sub",a,void 0)},1090915:a=>{f.bc("Mul",a,void 0)},1090966:a=>{f.bc("Div",a,void 0)},1091017:a=>{f.bc("Pow",a,void 0)},1091068:a=>{f.bc("Equal",a,void 0)},1091121:a=>{f.bc("Greater",a,void 0)},1091176:a=>{f.bc("GreaterOrEqual",a,void 0)},1091238:a=>{f.bc("Less",a,void 0)},1091290:a=>{f.bc("LessOrEqual",a,void 0)},1091349:(a,b,d,c,e)=>{f.bc("ReduceMean",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?
|
| 77 |
+
Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1091524:(a,b,d,c,e)=>{f.bc("ReduceMax",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1091698:(a,b,d,c,e)=>{f.bc("ReduceMin",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1091872:(a,b,d,c,e)=>{f.bc("ReduceProd",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):
|
| 78 |
+
[]})},1092047:(a,b,d,c,e)=>{f.bc("ReduceSum",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1092221:(a,b,d,c,e)=>{f.bc("ReduceL1",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1092394:(a,b,d,c,e)=>{f.bc("ReduceL2",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1092567:(a,b,d,c,e)=>{f.bc("ReduceLogSum",a,{keepDims:!!b,
|
| 79 |
+
noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1092744:(a,b,d,c,e)=>{f.bc("ReduceSumSquare",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1092924:(a,b,d,c,e)=>{f.bc("ReduceLogSumExp",a,{keepDims:!!b,noopWithEmptyAxes:!!d,axes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1093104:a=>{f.bc("Where",a,void 0)},1093157:(a,b,d)=>{f.bc("Transpose",a,{perm:b?Array.from((u(),C).subarray(Number(b)>>>
|
| 80 |
+
0,Number(d)>>>0)):[]})},1093281:(a,b,d,c)=>{f.bc("DepthToSpace",a,{blocksize:b,mode:R(d),format:c?"NHWC":"NCHW"})},1093414:(a,b,d,c)=>{f.bc("DepthToSpace",a,{blocksize:b,mode:R(d),format:c?"NHWC":"NCHW"})},1093547:(a,b,d,c)=>{f.bc("DFT",a,{axis:b,inverse:d,onesided:c})},1093639:(a,b,d,c,e,g,k,l,n,p,v,w,y,z,W)=>{f.bc("ConvTranspose",a,{format:n?"NHWC":"NCHW",autoPad:b,dilations:[d],group:c,kernelShape:[e],pads:[g,k],strides:[l],wIsConst:()=>!!(u(),A)[p>>>0],outputPadding:v?Array.from((u(),C).subarray(Number(v)>>>
|
| 81 |
+
0,Number(w)>>>0)):[],outputShape:y?Array.from((u(),C).subarray(Number(y)>>>0,Number(z)>>>0)):[],activation:R(W)})},1094072:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from((u(),C).subarray(Number(d)>>>0,(Number(d)>>>0)+2>>>0)),group:c,kernelShape:Array.from((u(),C).subarray(Number(e)>>>0,(Number(e)>>>0)+2>>>0)),pads:Array.from((u(),C).subarray(Number(g)>>>0,(Number(g)>>>0)+4>>>0)),strides:Array.from((u(),C).subarray(Number(k)>>>0,(Number(k)>>>
|
| 82 |
+
0)+2>>>0)),wIsConst:()=>!!(u(),A)[n>>>0],outputPadding:p?Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],outputShape:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[],activation:R(z)})},1094733:(a,b,d,c,e,g,k,l,n,p,v,w,y,z,W)=>{f.bc("ConvTranspose",a,{format:n?"NHWC":"NCHW",autoPad:b,dilations:[d],group:c,kernelShape:[e],pads:[g,k],strides:[l],wIsConst:()=>!!(u(),A)[p>>>0],outputPadding:v?Array.from((u(),C).subarray(Number(v)>>>0,Number(w)>>>0)):[],outputShape:y?Array.from((u(),
|
| 83 |
+
C).subarray(Number(y)>>>0,Number(z)>>>0)):[],activation:R(W)})},1095166:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from((u(),C).subarray(Number(d)>>>0,(Number(d)>>>0)+2>>>0)),group:c,kernelShape:Array.from((u(),C).subarray(Number(e)>>>0,(Number(e)>>>0)+2>>>0)),pads:Array.from((u(),C).subarray(Number(g)>>>0,(Number(g)>>>0)+4>>>0)),strides:Array.from((u(),C).subarray(Number(k)>>>0,(Number(k)>>>0)+2>>>0)),wIsConst:()=>!!(u(),A)[n>>>0],outputPadding:p?
|
| 84 |
+
Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],outputShape:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[],activation:R(z)})},1095827:(a,b)=>{f.bc("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},1095918:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("AveragePool",a,{format:z?"NHWC":"NCHW",auto_pad:b,ceil_mode:d,count_include_pad:c,storage_order:e,dilations:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>0)):[],kernel_shape:l?Array.from((u(),C).subarray(Number(l)>>>0,Number(n)>>>
|
| 85 |
+
0)):[],pads:p?Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],strides:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[]})},1096397:(a,b)=>{f.bc("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},1096488:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("AveragePool",a,{format:z?"NHWC":"NCHW",auto_pad:b,ceil_mode:d,count_include_pad:c,storage_order:e,dilations:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>0)):[],kernel_shape:l?Array.from((u(),C).subarray(Number(l)>>>0,Number(n)>>>
|
| 86 |
+
0)):[],pads:p?Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],strides:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[]})},1096967:(a,b)=>{f.bc("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},1097054:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("MaxPool",a,{format:z?"NHWC":"NCHW",auto_pad:b,ceil_mode:d,count_include_pad:c,storage_order:e,dilations:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>0)):[],kernel_shape:l?Array.from((u(),C).subarray(Number(l)>>>0,Number(n)>>>0)):
|
| 87 |
+
[],pads:p?Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],strides:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[]})},1097529:(a,b)=>{f.bc("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},1097616:(a,b,d,c,e,g,k,l,n,p,v,w,y,z)=>{f.bc("MaxPool",a,{format:z?"NHWC":"NCHW",auto_pad:b,ceil_mode:d,count_include_pad:c,storage_order:e,dilations:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>0)):[],kernel_shape:l?Array.from((u(),C).subarray(Number(l)>>>0,Number(n)>>>0)):[],pads:p?
|
| 88 |
+
Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],strides:w?Array.from((u(),C).subarray(Number(w)>>>0,Number(y)>>>0)):[]})},1098091:(a,b,d,c,e)=>{f.bc("Gemm",a,{alpha:b,beta:d,transA:c,transB:e})},1098195:a=>{f.bc("MatMul",a,void 0)},1098249:(a,b,d,c)=>{f.bc("ArgMax",a,{keepDims:!!b,selectLastIndex:!!d,axis:c})},1098357:(a,b,d,c)=>{f.bc("ArgMin",a,{keepDims:!!b,selectLastIndex:!!d,axis:c})},1098465:(a,b)=>{f.bc("Softmax",a,{axis:b})},1098528:(a,b)=>{f.bc("Concat",a,{axis:b})},1098588:(a,
|
| 89 |
+
b,d,c,e)=>{f.bc("Split",a,{axis:b,numOutputs:d,splitSizes:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1098744:a=>{f.bc("Expand",a,void 0)},1098798:(a,b)=>{f.bc("Gather",a,{axis:Number(b)})},1098869:(a,b)=>{f.bc("GatherElements",a,{axis:Number(b)})},1098948:(a,b)=>{f.bc("GatherND",a,{batch_dims:Number(b)})},1099027:(a,b,d,c,e,g,k,l,n,p,v)=>{f.bc("Resize",a,{antialias:b,axes:d?Array.from((u(),C).subarray(Number(d)>>>0,Number(c)>>>0)):[],coordinateTransformMode:R(e),cubicCoeffA:g,
|
| 90 |
+
excludeOutside:k,extrapolationValue:l,keepAspectRatioPolicy:R(n),mode:R(p),nearestMode:R(v)})},1099389:(a,b,d,c,e,g,k)=>{f.bc("Slice",a,{starts:b?Array.from((u(),C).subarray(Number(b)>>>0,Number(d)>>>0)):[],ends:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[],axes:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>0)):[]})},1099653:a=>{f.bc("Tile",a,void 0)},1099705:(a,b,d)=>{f.bc("InstanceNormalization",a,{epsilon:b,format:d?"NHWC":"NCHW"})},1099819:(a,b,d)=>{f.bc("InstanceNormalization",
|
| 91 |
+
a,{epsilon:b,format:d?"NHWC":"NCHW"})},1099933:a=>{f.bc("Range",a,void 0)},1099986:(a,b)=>{f.bc("Einsum",a,{equation:R(b)})},1100067:(a,b,d,c,e)=>{f.bc("Pad",a,{mode:b,value:d,pads:c?Array.from((u(),C).subarray(Number(c)>>>0,Number(e)>>>0)):[]})},1100210:(a,b,d,c,e,g)=>{f.bc("BatchNormalization",a,{epsilon:b,momentum:d,spatial:!!e,trainingMode:!!c,format:g?"NHWC":"NCHW"})},1100379:(a,b,d,c,e,g)=>{f.bc("BatchNormalization",a,{epsilon:b,momentum:d,spatial:!!e,trainingMode:!!c,format:g?"NHWC":"NCHW"})},
|
| 92 |
+
1100548:(a,b,d)=>{f.bc("CumSum",a,{exclusive:Number(b),reverse:Number(d)})},1100645:(a,b,d)=>{f.bc("DequantizeLinear",a,{axis:b,blockSize:d})},1100735:(a,b,d,c,e)=>{f.bc("GridSample",a,{align_corners:b,mode:R(d),padding_mode:R(c),format:e?"NHWC":"NCHW"})},1100905:(a,b,d,c,e)=>{f.bc("GridSample",a,{align_corners:b,mode:R(d),padding_mode:R(c),format:e?"NHWC":"NCHW"})},1101075:(a,b)=>{f.bc("ScatterND",a,{reduction:R(b)})},1101160:(a,b,d,c,e,g,k,l,n)=>{f.bc("Attention",a,{numHeads:b,isUnidirectional:d,
|
| 93 |
+
maskFilterValue:c,scale:e,doRotary:g,qkvHiddenSizes:k?Array.from((u(),C).subarray(Number(l)>>>0,Number(l)+k>>>0)):[],pastPresentShareBuffer:!!n})},1101432:a=>{f.bc("BiasAdd",a,void 0)},1101487:a=>{f.bc("BiasSplitGelu",a,void 0)},1101548:a=>{f.bc("FastGelu",a,void 0)},1101604:(a,b,d,c,e,g,k,l,n,p,v,w,y,z,W,kb)=>{f.bc("Conv",a,{format:w?"NHWC":"NCHW",auto_pad:b,dilations:d?Array.from((u(),C).subarray(Number(d)>>>0,Number(c)>>>0)):[],group:e,kernel_shape:g?Array.from((u(),C).subarray(Number(g)>>>0,Number(k)>>>
|
| 94 |
+
0)):[],pads:l?Array.from((u(),C).subarray(Number(l)>>>0,Number(n)>>>0)):[],strides:p?Array.from((u(),C).subarray(Number(p)>>>0,Number(v)>>>0)):[],w_is_const:()=>!!(u(),A)[Number(y)>>>0],activation:R(z),activation_params:W?Array.from((u(),Oa).subarray(Number(W)>>>0,Number(kb)>>>0)):[]})},1102188:a=>{f.bc("Gelu",a,void 0)},1102240:(a,b,d,c,e,g,k,l,n)=>{f.bc("GroupQueryAttention",a,{numHeads:b,kvNumHeads:d,scale:c,softcap:e,doRotary:g,rotaryInterleaved:k,smoothSoftmax:l,localWindowSize:n})},1102457:(a,
|
| 95 |
+
b,d,c)=>{f.bc("LayerNormalization",a,{axis:b,epsilon:d,simplified:!!c})},1102568:(a,b,d,c)=>{f.bc("LayerNormalization",a,{axis:b,epsilon:d,simplified:!!c})},1102679:(a,b,d,c,e,g)=>{f.bc("MatMulNBits",a,{k:b,n:d,accuracyLevel:c,bits:e,blockSize:g})},1102806:(a,b,d,c,e,g)=>{f.bc("MultiHeadAttention",a,{numHeads:b,isUnidirectional:d,maskFilterValue:c,scale:e,doRotary:g})},1102965:(a,b)=>{f.bc("QuickGelu",a,{alpha:b})},1103029:(a,b,d,c,e)=>{f.bc("RotaryEmbedding",a,{interleaved:!!b,numHeads:d,rotaryEmbeddingDim:c,
|
| 96 |
+
scale:e})},1103168:(a,b,d)=>{f.bc("SkipLayerNormalization",a,{epsilon:b,simplified:!!d})},1103270:(a,b,d)=>{f.bc("SkipLayerNormalization",a,{epsilon:b,simplified:!!d})},1103372:(a,b,d,c)=>{f.bc("GatherBlockQuantized",a,{gatherAxis:b,quantizeAxis:d,blockSize:c})},1103493:a=>{f.Id(a)},1103527:(a,b)=>f.Kd(Number(a),Number(b),f.$c.Nd,f.$c.errors)};function Za(a,b,d){return Df(async()=>{await f.Gd(Number(a),Number(b),Number(d))})}function Ya(){return"undefined"!==typeof wasmOffsetConverter}
|
| 97 |
+
var xd,Ia,yd,I,zd,Fa,La,Ad,Bd,Cd,Dd,Ed,J,Fd,Gd,K,Hd,L,Id,Jd,Kd,Ld,dynCall_vii,Md,dynCall_v,Nd,Od,dynCall_iii,Pd,Qd,Rd,Sd,dynCall_vi,Td,Ud,Vd,Wd,Xd,Yd,Zd,$d,ae,be,ce,de,ee,fe,ge,he,ie,je,ke,le,me,ne,oe,pe,qe,re,se,te,ue,ve,we,Xa;function Nc(a,b,d,c){var e=L();try{return Sd(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function Mc(a,b,d){var c=L();try{return dynCall_iii(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0)}}
|
| 98 |
+
function cd(a){var b=L();try{dynCall_v(a)}catch(d){K(b);if(d!==d+0)throw d;J(1,0)}}function Lc(a,b){var d=L();try{return Md(a,b)}catch(c){K(d);if(c!==c+0)throw c;J(1,0)}}function ed(a,b,d){var c=L();try{dynCall_vii(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0)}}function dd(a,b){var d=L();try{dynCall_vi(a,b)}catch(c){K(d);if(c!==c+0)throw c;J(1,0)}}function Rc(a,b,d,c,e,g,k){var l=L();try{return Qd(a,b,d,c,e,g,k)}catch(n){K(l);if(n!==n+0)throw n;J(1,0)}}
|
| 99 |
+
function jd(a,b,d,c,e,g){var k=L();try{Nd(a,b,d,c,e,g)}catch(l){K(k);if(l!==l+0)throw l;J(1,0)}}function gd(a,b,d,c){var e=L();try{Rd(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function hd(a,b,d,c,e){var g=L();try{Od(a,b,d,c,e)}catch(k){K(g);if(k!==k+0)throw k;J(1,0)}}function kd(a,b,d,c,e,g,k){var l=L();try{Ud(a,b,d,c,e,g,k)}catch(n){K(l);if(n!==n+0)throw n;J(1,0)}}function rd(a,b,d,c,e,g,k){var l=L();try{Vd(a,b,d,c,e,g,k)}catch(n){K(l);if(n!==n+0)throw n;J(1,0)}}
|
| 100 |
+
function qd(a,b,d,c,e,g,k,l){var n=L();try{Zd(a,b,d,c,e,g,k,l)}catch(p){K(n);if(p!==p+0)throw p;J(1,0)}}function Oc(a,b,d,c,e){var g=L();try{return Td(a,b,d,c,e)}catch(k){K(g);if(k!==k+0)throw k;J(1,0)}}function Xc(a,b,d){var c=L();try{return $d(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0)}}function ld(a,b,d,c,e,g,k,l){var n=L();try{ae(a,b,d,c,e,g,k,l)}catch(p){K(n);if(p!==p+0)throw p;J(1,0)}}
|
| 101 |
+
function od(a,b,d,c,e,g,k,l,n,p,v,w){var y=L();try{Wd(a,b,d,c,e,g,k,l,n,p,v,w)}catch(z){K(y);if(z!==z+0)throw z;J(1,0)}}function ad(a,b,d){var c=L();try{return be(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0);return 0n}}function md(a,b,d,c,e,g,k,l,n){var p=L();try{Pd(a,b,d,c,e,g,k,l,n)}catch(v){K(p);if(v!==v+0)throw v;J(1,0)}}function Kc(a){var b=L();try{return ce(a)}catch(d){K(b);if(d!==d+0)throw d;J(1,0)}}
|
| 102 |
+
function $c(a,b){var d=L();try{return se(a,b)}catch(c){K(d);if(c!==c+0)throw c;J(1,0);return 0n}}function Yc(a,b,d,c){var e=L();try{return de(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function Zc(a){var b=L();try{return ee(a)}catch(d){K(b);if(d!==d+0)throw d;J(1,0);return 0n}}function Wc(a,b,d,c){var e=L();try{return ke(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function Vc(a,b,d,c,e){var g=L();try{return le(a,b,d,c,e)}catch(k){K(g);if(k!==k+0)throw k;J(1,0)}}
|
| 103 |
+
function Uc(a,b,d,c,e,g){var k=L();try{return me(a,b,d,c,e,g)}catch(l){K(k);if(l!==l+0)throw l;J(1,0)}}function Qc(a,b,d,c,e,g){var k=L();try{return Xd(a,b,d,c,e,g)}catch(l){K(k);if(l!==l+0)throw l;J(1,0)}}function Pc(a,b,d,c,e,g){var k=L();try{return ne(a,b,d,c,e,g)}catch(l){K(k);if(l!==l+0)throw l;J(1,0)}}function Sc(a,b,d,c,e,g,k,l){var n=L();try{return Yd(a,b,d,c,e,g,k,l)}catch(p){K(n);if(p!==p+0)throw p;J(1,0)}}
|
| 104 |
+
function bd(a,b,d,c,e){var g=L();try{return oe(a,b,d,c,e)}catch(k){K(g);if(k!==k+0)throw k;J(1,0);return 0n}}function Jc(a,b,d,c){var e=L();try{return pe(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function Hc(a,b,d,c){var e=L();try{return qe(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function Tc(a,b,d,c,e,g,k,l,n,p,v,w){var y=L();try{return re(a,b,d,c,e,g,k,l,n,p,v,w)}catch(z){K(y);if(z!==z+0)throw z;J(1,0)}}
|
| 105 |
+
function nd(a,b,d,c,e,g,k,l,n,p,v){var w=L();try{ie(a,b,d,c,e,g,k,l,n,p,v)}catch(y){K(w);if(y!==y+0)throw y;J(1,0)}}function pd(a,b,d,c,e,g,k,l,n,p,v,w,y,z,W,kb){var Yf=L();try{je(a,b,d,c,e,g,k,l,n,p,v,w,y,z,W,kb)}catch(lb){K(Yf);if(lb!==lb+0)throw lb;J(1,0)}}function Ic(a,b,d){var c=L();try{return fe(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0)}}function Gc(a,b,d){var c=L();try{return ge(a,b,d)}catch(e){K(c);if(e!==e+0)throw e;J(1,0)}}
|
| 106 |
+
function fd(a,b,d,c){var e=L();try{he(a,b,d,c)}catch(g){K(e);if(g!==g+0)throw g;J(1,0)}}function vd(){var a=G;a=Object.assign({},a);var b=c=>e=>c(e)>>>0,d=c=>()=>c()>>>0;a.vb=b(a.vb);a.Zb=d(a.Zb);a.$b=b(a.$b);a.nc=b(a.nc);a.oc=d(a.oc);a.sc=b(a.sc);return a}function Da(){if(0<Ae)Be=Da;else if(m)xa?.(f),Ra();else{for(var a=ze;0<a.length;)a.shift()(f);0<Ae?Be=Da:(f.calledRun=!0,t||(Ra(),xa?.(f)))}}var G;m||(G=await (Ca()),Da());f.PTR_SIZE=4;
|
| 107 |
+
Qa?moduleRtn=f:moduleRtn=new Promise((a,b)=>{xa=a;ya=b});
|
| 108 |
+
;return moduleRtn}export default ortWasmThreaded;var isPthread=globalThis.self?.name?.startsWith("em-pthread");var isNode=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(isNode)isPthread=(await import("worker_threads")).workerData==="em-pthread";isPthread&&ortWasmThreaded();
|