coolblaze03 commited on
Commit
0b19a1b
·
verified ·
1 Parent(s): b3e9a6d

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +3 -34
  2. DATA-CARD-training-corpus.md +141 -0
  3. LICENSE +202 -0
  4. NOTICE +24 -0
  5. ORACLE-LIMITS.md +133 -0
  6. benchmarks/csn-3.12-licensed/pyc/00008.pyc +0 -0
  7. benchmarks/csn-3.12-licensed/pyc/00024.pyc +0 -0
  8. benchmarks/csn-3.12-licensed/pyc/00026.pyc +0 -0
  9. benchmarks/csn-3.12-licensed/pyc/00033.pyc +0 -0
  10. benchmarks/csn-3.12-licensed/pyc/00044.pyc +0 -0
  11. benchmarks/csn-3.12-licensed/pyc/00047.pyc +0 -0
  12. benchmarks/csn-3.12-licensed/pyc/00054.pyc +0 -0
  13. benchmarks/csn-3.12-licensed/pyc/00093.pyc +0 -0
  14. benchmarks/csn-3.12-licensed/pyc/00105.pyc +0 -0
  15. benchmarks/csn-3.12-licensed/pyc/00114.pyc +0 -0
  16. benchmarks/csn-3.12-licensed/pyc/00119.pyc +0 -0
  17. benchmarks/csn-3.12-licensed/pyc/00131.pyc +0 -0
  18. benchmarks/csn-3.12-licensed/pyc/00133.pyc +0 -0
  19. benchmarks/csn-3.12-licensed/pyc/00143.pyc +0 -0
  20. benchmarks/csn-3.12-licensed/pyc/00148.pyc +0 -0
  21. benchmarks/csn-3.12-licensed/pyc/00176.pyc +0 -0
  22. benchmarks/csn-3.12-licensed/pyc/00238.pyc +0 -0
  23. benchmarks/csn-3.12-licensed/pyc/00239.pyc +0 -0
  24. benchmarks/csn-3.12-licensed/pyc/00265.pyc +0 -0
  25. benchmarks/csn-3.12-licensed/pyc/00268.pyc +0 -0
  26. benchmarks/csn-3.12-licensed/pyc/00278.pyc +0 -0
  27. benchmarks/csn-3.12-licensed/pyc/00286.pyc +0 -0
  28. benchmarks/csn-3.12-licensed/pyc/00303.pyc +0 -0
  29. benchmarks/csn-3.12-licensed/pyc/00304.pyc +0 -0
  30. benchmarks/csn-3.12-licensed/pyc/00317.pyc +0 -0
  31. benchmarks/csn-3.12-licensed/pyc/00320.pyc +0 -0
  32. benchmarks/csn-3.12-licensed/pyc/00329.pyc +0 -0
  33. benchmarks/csn-3.12-licensed/pyc/00332.pyc +0 -0
  34. benchmarks/csn-3.12-licensed/pyc/00344.pyc +0 -0
  35. benchmarks/csn-3.12-licensed/pyc/00361.pyc +0 -0
  36. benchmarks/csn-3.12-licensed/pyc/00369.pyc +0 -0
  37. benchmarks/csn-3.12-licensed/pyc/00381.pyc +0 -0
  38. benchmarks/csn-3.12-licensed/pyc/00392.pyc +0 -0
  39. benchmarks/csn-3.12-licensed/pyc/00397.pyc +0 -0
  40. benchmarks/csn-3.12-licensed/pyc/00402.pyc +0 -0
  41. benchmarks/csn-3.12-licensed/pyc/00413.pyc +0 -0
  42. benchmarks/csn-3.12-licensed/pyc/00421.pyc +0 -0
  43. benchmarks/csn-3.12-licensed/pyc/00428.pyc +0 -0
  44. benchmarks/csn-3.12-licensed/pyc/00442.pyc +0 -0
  45. benchmarks/csn-3.12-licensed/pyc/00463.pyc +0 -0
  46. benchmarks/csn-3.12-licensed/pyc/00465.pyc +0 -0
  47. benchmarks/csn-3.12-licensed/pyc/00471.pyc +0 -0
  48. benchmarks/csn-3.12-licensed/pyc/00488.pyc +0 -0
  49. benchmarks/csn-3.12-licensed/pyc/00498.pyc +0 -0
  50. benchmarks/csn-3.12-licensed/pyc/00511.pyc +0 -0
.gitattributes CHANGED
@@ -1,35 +1,4 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
  *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.safetensors filter=lfs diff=lfs merge=lfs -text
2
+ *.gguf filter=lfs diff=lfs merge=lfs -text
3
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
4
+ *.pyc filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
DATA-CARD-training-corpus.md ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Data card — PyBytecode v2 / v3 training corpus
2
+
3
+ The corpus behind `pybytecode-v2-1.5b` and `pybytecode-v3-1.5b`. Written 2026-08-04; no data card
4
+ existed before.
5
+
6
+ **This corpus is not distributed.** Section 5 states why, as a property of the artifact rather
7
+ than an apology. The model weights are unaffected — see `WEIGHTS-LICENSE-PROPOSAL.md`.
8
+
9
+ ---
10
+
11
+ ## 1. What it is
12
+
13
+ | | |
14
+ |---|---|
15
+ | Task | Python 3.12 bytecode disassembly → original source |
16
+ | Rows | **48,196** (identical row set in v2 and v3) |
17
+ | Row shape | `{"input": <disassembly>, "output": <source>}` |
18
+ | Source dataset | `codeparrot/github-code-clean` (the dataset itself is Apache-2.0) |
19
+ | Shards used for training | 0–5 |
20
+ | Unit | one top-level function plus its transitive helpers and imports |
21
+ | Python | 3.12, `optimize=0` |
22
+ | Files | `data/foundry/pybytecode-v2_train.jsonl`, `-v3_train.jsonl`, `-v3-sft_train.jsonl` |
23
+
24
+ v3 differs from v2 in the **input representation only**. v2's `rep.py` omitted the exception
25
+ table's `end`, so a bare `try:` body and a `try/else:` body that compile to the same instruction
26
+ stream were byte-identical in the model's input. v3 emits `EXC try=Ls..Le -> ...` and the end
27
+ label joins the label set, making the two distinguishable. 14,122 of 48,196 inputs changed;
28
+ no row was added, removed or relabelled (`data/foundry/pybytecode-artifacts/v3_build_report.json`).
29
+ Any v2→v3 delta is therefore attributable to the representation fix alone.
30
+
31
+ ## 2. Licence filtering — what was dropped, and why
32
+
33
+ `scripts/pybytecode/extract_v2.py` filters **per row** on `github-code-clean`'s `license` column
34
+ and keeps seven permissive values:
35
+
36
+ ```
37
+ mit apache-2.0 bsd-2-clause bsd-3-clause isc unlicense cc0-1.0
38
+ ```
39
+
40
+ Every GPL, LGPL, AGPL, MPL and EPL row is dropped before extraction, along with everything the
41
+ column does not positively identify. The intent was to avoid training on reciprocally-licensed
42
+ source; the filter is a hard gate, not a preference.
43
+
44
+ Rows are then dropped by a chain of quality gates, each counted rather than silently applied:
45
+ unparseable; not stable under `ast.unparse` round-trip (`canonicalise(canon) != canon`); does not
46
+ compile; disassembly or source over the size ceiling; duplicate of an already-kept unit
47
+ (SHA-1 of the canonical source).
48
+
49
+ ## 3. Decontamination against the test sets
50
+
51
+ Three layers, because one is never enough (`scripts/pybytecode/build_final.py`):
52
+
53
+ 1. **Shard-disjoint** — training from shards 0–5, held-out pool from shards 8–9. The held-out
54
+ pool was never read during training extraction.
55
+ 2. **Repo-disjoint** — any repo appearing in training is removed from the held-out pool outright.
56
+ A repo can span shards, so layer 1 does not imply this.
57
+ 3. **Fingerprint-disjoint** — an identifier-blind structural fingerprint (every `Name`/`arg`/
58
+ attribute → placeholder, every literal → its type name). This catches the same algorithm under
59
+ renamed variables, which exact match misses. It caught 15 items exact match missed.
60
+
61
+ The CSN benchmarks apply the same identifier-blind fingerprint against this corpus. On the
62
+ 600-row licensed rebuild it removed 3 rows.
63
+
64
+ ## 4. Labelling
65
+
66
+ Labels are the canonical source itself, so the supervision is exact by construction. The grading
67
+ tier attached to each unit was assigned **by running an oracle**, not by inspection:
68
+
69
+ - **tier A / behavioural** — differential execution. Kills 100% of injected semantic bugs; the
70
+ gold tier.
71
+ - **tier B / stub** — stubbed execution. Kills 78.9%, so scores on it are an **upper bound**.
72
+ - **tier C / AST-exact** — undercounts by roughly 2.4×, so scores on it are a **lower bound**.
73
+
74
+ Only 5.43% of all real top-level Python functions survive to be behaviourally adjudicable. That
75
+ ceiling is why the byte-identical recompile oracle exists: it needs no runnable environment and
76
+ so has 100% coverage.
77
+
78
+ ## 5. The corpus cannot be redistributed
79
+
80
+ **Per-row attribution was not retained.** `extract_v2.py` carried `repo` and `license` on every
81
+ row through extraction, and `build_final.py:118` writes only `{"input", "expected"}` when it
82
+ emits the final splits. The intermediate pool that still held the metadata was written to `/tmp`
83
+ and no longer exists.
84
+
85
+ The consequence is specific: the corpus is 48,196 excerpts of MIT-, BSD-, Apache-, ISC- and
86
+ public-domain-licensed source, and every one of those licences except the two public-domain
87
+ dedications requires the copyright notice to be reproduced with the copy. We cannot produce those
88
+ notices, because we no longer know which row came from which repository. Redistributing the file
89
+ would strip required notices from tens of thousands of copyright holders.
90
+
91
+ This is a limitation of the artifact, not of the licences: nothing about the corpus is unlicensed
92
+ or reciprocally licensed. It is not fixable by adding a licence file, and it is not repaired by
93
+ listing the source dataset — attribution under these licences is per-work, not per-collection.
94
+
95
+ **It is fixable by rebuilding.** Extraction is deterministic and the source dataset is public.
96
+ Carrying `repo`, `license` and file path through `build_final.py`'s writer — one line — produces
97
+ an equivalent corpus that *is* redistributable with a `NOTICES` file. That is the recommended
98
+ fix for a v4 and it does not require retraining anything to be useful.
99
+
100
+ ## 6. Held-out evaluation sets built from the same corpus
101
+
102
+ `data/foundry/pybytecode-v3-ood-{behavioural,stub,ast,doc}_test.jsonl` are drawn from the
103
+ held-out shards of this same corpus and **inherit section 5 exactly** — they carry no attribution
104
+ and cannot be redistributed either.
105
+
106
+ They are named `-ood-` but they are **not out-of-distribution**: they are the same source and the
107
+ same distribution as training, held out three ways. Matching all 974 canonicalised
108
+ `google-research-datasets/mbpp` rows against them yields **0 matches** in all four files, while
109
+ the v1-era `pybytecode-ood_test.jsonl` matches at **400/400**. Only that v1-era file is MBPP.
110
+ Full evidence in `LICENSING-DETERMINATION.md` §4.
111
+
112
+ They remain sound *generalisation* tests, and the numbers measured on them stand. Only the label
113
+ is wrong, and it should be corrected wherever it appears.
114
+
115
+ **On the tier-A set specifically (n=279, the set behind the 91.04% and 97.49% figures):** it is
116
+ the complete behaviourally-adjudicable population of the held-out pool — the 400-row cap did not
117
+ truncate it, whereas the stub and ast tiers both hit that cap. The pool was therefore larger than
118
+ 400 units, but its exact size is **not recoverable**: `build_final.py` printed its census to
119
+ stdout and no run log was kept. The framing "279 of 400 = 70% of the set" does not describe these
120
+ files (the four tiers are largely disjoint populations — the 279 behavioural rows share 9 function
121
+ names with the 400 stub rows and 8 with the 400 ast rows) and should not be used. Report the
122
+ denominator as 279 with the sentence above, or rebuild the pool to recover the true rate.
123
+
124
+ ## 7. Known confound, stated rather than engineered away
125
+
126
+ `extract_v2.py` carries `from __future__ import annotations`, and its `compile()` call inherits
127
+ the flag, so the training bytecode has PEP-563 stringised annotations. **Real `.pyc` files are not
128
+ compiled that way.** The benchmarks deliberately compile with `dont_inherit=True`, giving the
129
+ model an input distribution it was not trained on for annotated functions. Any resulting handicap
130
+ is a real property of the model and is counted against it.
131
+
132
+ ## 8. Provenance summary
133
+
134
+ | Field | Value |
135
+ |---|---|
136
+ | Base model | `Qwen/Qwen2.5-Coder-1.5B-Instruct` (Apache-2.0) |
137
+ | Rows | 48,196 |
138
+ | Method | LoRA r=16, α=32, all attention + MLP projections, 1 epoch, lr 2e-4 |
139
+ | Build scripts | `scripts/pybytecode/{extract_v2,build_final,build_v3,rep,gen,verify}.py` |
140
+ | Grader hashes | all six match `grader.sha256` in `data/models/models.jsonl` |
141
+ | Redistributable | **No** — §5 |
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.
NOTICE ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PyBytecode
2
+ Copyright 2026 Blazing Customs
3
+
4
+ This product includes software developed from Qwen2.5-Coder-1.5B-Instruct
5
+ (https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct), Copyright Alibaba Cloud,
6
+ licensed under the Apache License, Version 2.0.
7
+
8
+ The upstream repository ships a LICENSE file and no NOTICE file (checked 2026-08-04 against
9
+ the Hugging Face API), so there is no upstream NOTICE text to append here.
10
+
11
+ CHANGES MADE TO THE LICENSED WORK, as required by Apache-2.0 section 4(b):
12
+
13
+ The base model was fine-tuned with LoRA (rank 16, alpha 32, applied to q_proj, k_proj,
14
+ v_proj, o_proj, gate_proj, up_proj and down_proj; 1 epoch; learning rate 2e-4) on 48,196
15
+ pairs of Python 3.12 bytecode disassembly and the source that produced it. The resulting
16
+ adapter was merged into the base weights. No architecture, vocabulary or tokenizer change
17
+ was made.
18
+
19
+ The training corpus is not distributed. Its per-row attribution was not retained, so it cannot
20
+ be redistributed without stripping required notices from its upstream authors. See
21
+ DATA-CARD-training-corpus.md. This constrains the corpus only; it does not encumber these
22
+ weights, which are trained parameters rather than a copy of any source text, and which were
23
+ derived from a corpus pre-filtered to seven permissive licences with all GPL, LGPL, AGPL, MPL
24
+ and EPL rows dropped before extraction.
ORACLE-LIMITS.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The oracle's real limits
2
+
3
+ The verifier is the reason to use PyBytecode at all, so its limits belong in front of a user, not
4
+ in an appendix. Everything here is measured; sources are named per section.
5
+
6
+ ---
7
+
8
+ ## 1. The pre-flight 100% proves almost nothing. Read this before quoting it.
9
+
10
+ Every grading command prints `PRE-FLIGHT 600/600 = 100%` before it scores. **That number is
11
+ trivial by construction and is not evidence of soundness.**
12
+
13
+ Pre-flight grades each reference label against itself. The oracle asks whether
14
+ `compile(prediction)` and `compile(reference)` produce the same code object — so at pre-flight it
15
+ is comparing `compile(x)` with `compile(x)`. It would return 100% for *any* deterministic
16
+ function of the source, including a stub that hashes the input string and ignores the bytecode
17
+ entirely.
18
+
19
+ What pre-flight actually detects is a **broken harness**: a benchmark whose `.pyc` files do not
20
+ match their sources, a Python version mismatch (3.11 or 3.13 against a 3.12 benchmark), a corrupt
21
+ row. Those are real failure modes and worth catching, which is why it runs. But a passing
22
+ pre-flight says the instrument is plugged in, not that it measures anything.
23
+
24
+ **Soundness evidence comes from the mutation test and the blind-spot probes, not from
25
+ pre-flight**: corrupt a label and require the oracle to reject it. Measured
26
+ (`evidence/ORACLE-MUTATION.md`): **0 true survivors in 1,239 mutants**, and
27
+ **18/18 targeted blind-spot probes** behave as required — including the historical failure where
28
+ a `try:` body and a `try/else:` body were indistinguishable, docstring changes, docstring
29
+ removal, float-vs-int, bool-vs-int and `-0.0` vs `0.0`.
30
+
31
+ Even the mutation kill rate is weak evidence on its own: for a byte-identical oracle a kill is
32
+ close to tautological, since a mutant survives only if it compiles to a structurally identical
33
+ code object. The probes are the load-bearing test, because they ask the question that actually bit
34
+ us once — *is a behaviourally load-bearing field missing from the fingerprint?*
35
+
36
+ **Caveat on mutation supply, stated rather than hidden:** 188 of 600 wild rows (31%) produced no
37
+ effective mutant within 30 tries, and 323 void attempts were discarded. The wild kill rate is
38
+ measured on the 412 rows that did produce one.
39
+
40
+ ## 2. The 0.33% wild false-reject floor
41
+
42
+ Against `.pyc` files built by someone else, the oracle refuses a small fraction of correct
43
+ answers. Measured on 600 wild install-time `.pyc` from installed site-packages
44
+ (`evidence/GATE-RESULT.md`):
45
+
46
+ | | certified | false reject | false accepts |
47
+ |---|---|---|---|
48
+ | L0 (old constant encoding) | 585/600 = 97.5% | 15 = 2.5% | 0 / 1,274 |
49
+ | **L1 (shipping)** | **598/600 = 99.67%** | **2 = 0.33%** | 0 / 1,274 |
50
+
51
+ 13 of the 15 L0 failures were our own defect — `repr()` of a `set`/`frozenset`/`dict` follows the
52
+ compiling process's hash seed, which also made the L0 verdict **non-deterministic** (585 / 592 /
53
+ 584 / 585 / 589 under `PYTHONHASHSEED` 0–4). L1 fixes it and returns 598 under all five seeds.
54
+
55
+ The remaining **0.33% is a real floor and is not fixable.** One distinct module
56
+ (`pandas/_testing/__init__.py`) compiles differently under CPython 3.12.3 than under 3.12.13 —
57
+ `co_code` 2,692 vs 2,696 bytes, and a differing `co_exceptiontable`. The source is correct; the
58
+ *compiler patch release* differs. No normalisation removes this without abandoning the
59
+ byte-identical guarantee.
60
+
61
+ **It degrades to a false REJECT, never a false accept.** You are told "unknown" about a correct
62
+ answer; you are never told "verified" about a wrong one. That is the safe direction, and it is the
63
+ direction the design chose deliberately.
64
+
65
+ ## 3. Optimization level must match the producer's, or verification collapses
66
+
67
+ A `.pyc` built with `-O` or `-OO` is a different code object. Measured on 679 sources compiled by
68
+ a foreign interpreter at each level and graded at each level:
69
+
70
+ | producer ↓ / grader → | 0 | 1 | 2 |
71
+ |---|---|---|---|
72
+ | **0** | **100.0%** | 95.43% | 23.86% |
73
+ | **1** | 95.43% | **100.0%** | 24.15% |
74
+ | **2** | 23.86% | 24.15% | **100.0%** |
75
+
76
+ The diagonal is 679/679 at every level. Guessing wrong is **not** a graceful degradation — it
77
+ collapses to ~24%. There are only three levels and trying all three costs three compiles, so this
78
+ is *"needs normalisation to survive"*, not *"breaks"*. **The harness does not currently search the
79
+ three levels automatically; a user verifying a foreign `.pyc` must do it.**
80
+
81
+ **What trying all three costs you, and it is not nothing.** The certificate changes meaning from
82
+ *"byte-identical to the code object the original source compiles to"* to *"byte-identical to the
83
+ code object that was actually shipped"*. At `optimize>=1` docstrings are **absent from the `.pyc`**,
84
+ and at `>=2` asserts are gone too. So against an `-O` artifact, **docstring recovery cannot be
85
+ certified at all** — the information is not in the file. That bears directly on our headline
86
+ differentiator: 115 of 679 benchmark rows carry a real docstring, and none of that could be proven
87
+ against an `-O` `.pyc`. It is a limit of the artifact, not unsoundness in the oracle.
88
+
89
+ ## 4. What the oracle deliberately ignores
90
+
91
+ Excluded from the fingerprint, with how often each would have caused a false reject on the 600
92
+ wild rows had it been included:
93
+
94
+ | Field | In fingerprint? | Rows differing / 600 |
95
+ |---|---|---|
96
+ | `co_filename` | excluded | **600 (100%)** — every wild `.pyc` carries its builder's absolute path |
97
+ | `co_linetable` | excluded | **122 (20.3%)** — varies across builds with no semantic content |
98
+ | `co_firstlineno` | excluded | 0 |
99
+
100
+ Docstrings, `co_consts`, `co_names` and `co_exceptiontable` are **included** — the first because
101
+ docstring fidelity is a claim we make, the last because omitting it once produced a false proof.
102
+
103
+ ## 5. Unverified means unknown, not wrong
104
+
105
+ The oracle is **sound but incomplete**:
106
+
107
+ ```
108
+ verified = PROVABLY correct. Identical code object => identical behaviour. No false positives.
109
+ unverified = UNKNOWN. A correct decompilation that compiles differently — a `while` where the
110
+ original had a `for`, a differently-ordered but equivalent boolean — does not verify.
111
+ ```
112
+
113
+ Reported accuracy is therefore a **lower bound on correctness**, not an estimate of it. Treating
114
+ the unverified remainder as errors understates the model; treating it as correct is unsafe.
115
+
116
+ ## 6. Not tested — unknown, not claimed
117
+
118
+ - **Cross-minor (3.13).** No 3.13 interpreter on the measurement box; nothing was downloaded.
119
+ The benchmark and the model are 3.12 only.
120
+ - **PyInstaller / Nuitka containers.** `import PyInstaller` → `ModuleNotFoundError`. Not measured.
121
+ - **`.pyc` from non-CPython or patched builds.** Not measured. Given that a *patch release*
122
+ already produces the 0.33% floor, a patched build is a live risk, not a theoretical one.
123
+ - **Obfuscated or deliberately adversarial bytecode.** Not measured. No malware was fetched.
124
+
125
+ ## 7. Where these limits are stated to users
126
+
127
+ | Limit | Stated in |
128
+ |---|---|
129
+ | Pre-flight is trivial | this file; `harness/README.md`; both benchmark data cards |
130
+ | 0.33% wild false-reject floor | this file; `weights/MODEL-CARD.md` |
131
+ | `-O` mismatch collapse, docstrings unprovable | this file; `weights/MODEL-CARD.md` |
132
+ | unverified ≠ wrong | this file; `weights/MODEL-CARD.md`; `harness/README.md` |
133
+ | 3.13 / PyInstaller untested | this file; `weights/MODEL-CARD.md` |
benchmarks/csn-3.12-licensed/pyc/00008.pyc ADDED
Binary file (497 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00024.pyc ADDED
Binary file (1.16 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00026.pyc ADDED
Binary file (594 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00033.pyc ADDED
Binary file (749 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00044.pyc ADDED
Binary file (539 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00047.pyc ADDED
Binary file (562 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00054.pyc ADDED
Binary file (1.71 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00093.pyc ADDED
Binary file (850 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00105.pyc ADDED
Binary file (811 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00114.pyc ADDED
Binary file (654 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00119.pyc ADDED
Binary file (1.38 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00131.pyc ADDED
Binary file (1.43 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00133.pyc ADDED
Binary file (984 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00143.pyc ADDED
Binary file (1.67 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00148.pyc ADDED
Binary file (780 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00176.pyc ADDED
Binary file (635 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00238.pyc ADDED
Binary file (1.19 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00239.pyc ADDED
Binary file (2.4 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00265.pyc ADDED
Binary file (650 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00268.pyc ADDED
Binary file (510 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00278.pyc ADDED
Binary file (3.41 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00286.pyc ADDED
Binary file (891 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00303.pyc ADDED
Binary file (800 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00304.pyc ADDED
Binary file (649 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00317.pyc ADDED
Binary file (528 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00320.pyc ADDED
Binary file (2.73 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00329.pyc ADDED
Binary file (686 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00332.pyc ADDED
Binary file (1.11 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00344.pyc ADDED
Binary file (899 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00361.pyc ADDED
Binary file (664 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00369.pyc ADDED
Binary file (651 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00381.pyc ADDED
Binary file (597 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00392.pyc ADDED
Binary file (513 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00397.pyc ADDED
Binary file (842 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00402.pyc ADDED
Binary file (7.46 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00413.pyc ADDED
Binary file (498 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00421.pyc ADDED
Binary file (469 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00428.pyc ADDED
Binary file (708 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00442.pyc ADDED
Binary file (870 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00463.pyc ADDED
Binary file (1.53 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00465.pyc ADDED
Binary file (1.59 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00471.pyc ADDED
Binary file (1.47 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00488.pyc ADDED
Binary file (1.72 kB). View file
 
benchmarks/csn-3.12-licensed/pyc/00498.pyc ADDED
Binary file (781 Bytes). View file
 
benchmarks/csn-3.12-licensed/pyc/00511.pyc ADDED
Binary file (531 Bytes). View file