Text Generation
Transformers
Safetensors
GGUF
English
qwen2
decompilation
reverse-engineering
python
bytecode
code
verified-generation
conversational
text-generation-inference
Instructions to use BlazingCustoms/pybytecode-v3-1.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BlazingCustoms/pybytecode-v3-1.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BlazingCustoms/pybytecode-v3-1.5b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BlazingCustoms/pybytecode-v3-1.5b") model = AutoModelForCausalLM.from_pretrained("BlazingCustoms/pybytecode-v3-1.5b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use BlazingCustoms/pybytecode-v3-1.5b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf BlazingCustoms/pybytecode-v3-1.5b:F16 # Run inference directly in the terminal: llama cli -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf BlazingCustoms/pybytecode-v3-1.5b:F16 # Run inference directly in the terminal: llama cli -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf BlazingCustoms/pybytecode-v3-1.5b:F16 # Run inference directly in the terminal: ./llama-cli -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf BlazingCustoms/pybytecode-v3-1.5b:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Use Docker
docker model run hf.co/BlazingCustoms/pybytecode-v3-1.5b:F16
- LM Studio
- Jan
- vLLM
How to use BlazingCustoms/pybytecode-v3-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BlazingCustoms/pybytecode-v3-1.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BlazingCustoms/pybytecode-v3-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BlazingCustoms/pybytecode-v3-1.5b:F16
- SGLang
How to use BlazingCustoms/pybytecode-v3-1.5b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "BlazingCustoms/pybytecode-v3-1.5b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BlazingCustoms/pybytecode-v3-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "BlazingCustoms/pybytecode-v3-1.5b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BlazingCustoms/pybytecode-v3-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use BlazingCustoms/pybytecode-v3-1.5b with Ollama:
ollama run hf.co/BlazingCustoms/pybytecode-v3-1.5b:F16
- Unsloth Studio
How to use BlazingCustoms/pybytecode-v3-1.5b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BlazingCustoms/pybytecode-v3-1.5b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BlazingCustoms/pybytecode-v3-1.5b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for BlazingCustoms/pybytecode-v3-1.5b to start chatting
- Pi
How to use BlazingCustoms/pybytecode-v3-1.5b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "BlazingCustoms/pybytecode-v3-1.5b:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use BlazingCustoms/pybytecode-v3-1.5b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "BlazingCustoms/pybytecode-v3-1.5b:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use BlazingCustoms/pybytecode-v3-1.5b with Docker Model Runner:
docker model run hf.co/BlazingCustoms/pybytecode-v3-1.5b:F16
- Lemonade
How to use BlazingCustoms/pybytecode-v3-1.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BlazingCustoms/pybytecode-v3-1.5b:F16
Run and chat with the model
lemonade run user.pybytecode-v3-1.5b-F16
List all available models
lemonade list
- Hermes Agent
How to use BlazingCustoms/pybytecode-v3-1.5b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BlazingCustoms/pybytecode-v3-1.5b:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default BlazingCustoms/pybytecode-v3-1.5b:F16
Run Hermes
hermes
- Atomic Chat
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- benchmarks/csn-3.12-licensed/DATA-CARD.md +209 -0
- benchmarks/csn-3.12-licensed/NOTICES.md +0 -0
- benchmarks/csn-3.12-licensed/bench.jsonl +0 -0
- benchmarks/csn-3.12-licensed/build_stats.json +110 -0
- benchmarks/csn-3.12-licensed/pyc/00003.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00005.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00006.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00013.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00042.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00046.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00049.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00051.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00063.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00078.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00092.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00095.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00096.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00100.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00102.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00104.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00106.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00113.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00120.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00124.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00125.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00134.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00151.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00156.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00158.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00165.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00169.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00188.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00199.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00203.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00222.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00231.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00236.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00243.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00254.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00263.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00280.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00287.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00291.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00292.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00300.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00313.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00314.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00325.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00327.pyc +0 -0
- benchmarks/csn-3.12-licensed/pyc/00328.pyc +0 -0
benchmarks/csn-3.12-licensed/DATA-CARD.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: mixed-permissive-per-row
|
| 4 |
+
license_link: https://huggingface.co/datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/blob/main/NOTICES.md
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
tags:
|
| 10 |
+
- decompilation
|
| 11 |
+
- python
|
| 12 |
+
- bytecode
|
| 13 |
+
- code
|
| 14 |
+
- reverse-engineering
|
| 15 |
+
size_categories:
|
| 16 |
+
- n<1K
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: default
|
| 19 |
+
data_files: bench.jsonl
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Data card — CSN-3.12-licensed decompilation benchmark
|
| 23 |
+
|
| 24 |
+
600 real Python functions from GitHub, compiled to Python 3.12 bytecode, each paired with the
|
| 25 |
+
source that produced it. Every row carries full provenance and a licence resolved at the exact
|
| 26 |
+
commit. Built 2026-08-04 by `tools/build_csn_licensed.py`.
|
| 27 |
+
|
| 28 |
+
**Redistributable**, provided `NOTICES.md` ships alongside. That file is not optional: MIT, BSD
|
| 29 |
+
and Apache-2.0 require the notice to travel with the copy.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## The set
|
| 34 |
+
|
| 35 |
+
| | |
|
| 36 |
+
|---|---|
|
| 37 |
+
| Rows | **600** |
|
| 38 |
+
| Source repositories | **117** |
|
| 39 |
+
| Max rows from any one repo | **6 (1.00%)** |
|
| 40 |
+
| Median rows per repo | 6 |
|
| 41 |
+
| Distinct commit SHAs | 117 |
|
| 42 |
+
| Rows with complete provenance | 600 / 600 |
|
| 43 |
+
| Rows with a resolved SPDX identifier | 600 / 600 |
|
| 44 |
+
| Disassembly length | mean 87.3 lines, median 59, max 1,622 |
|
| 45 |
+
| Rows with annotations | 63 |
|
| 46 |
+
| Python | 3.12, `optimize=0` |
|
| 47 |
+
|
| 48 |
+
Licences, all resolved at the row's own commit:
|
| 49 |
+
|
| 50 |
+
| SPDX | rows | share |
|
| 51 |
+
|---|---:|---:|
|
| 52 |
+
| MIT | 391 | 65.2% |
|
| 53 |
+
| BSD-3-Clause | 118 | 19.7% |
|
| 54 |
+
| Apache-2.0 | 64 | 10.7% |
|
| 55 |
+
| BSD-2-Clause | 15 | 2.5% |
|
| 56 |
+
| ISC | 12 | 2.0% |
|
| 57 |
+
|
| 58 |
+
### Why this replaces the previous 400-row set
|
| 59 |
+
|
| 60 |
+
The first CSN benchmark drew 400 rows from **24** repositories with **15% from one**
|
| 61 |
+
(`Karaage-Cluster/python-tldap`), recorded no commit SHA, and captured no licence. Auditing it
|
| 62 |
+
afterwards: **180 of its 400 rows (45%) cannot be redistributed** — 83 GPL-3.0 (including all 60
|
| 63 |
+
from that top repository) and 97 from repositories publishing no licence at all. Concentration at
|
| 64 |
+
that level also means per-repository idiosyncrasy was a large fraction of what the benchmark
|
| 65 |
+
measured. Details in `../../LICENSING-DETERMINATION.md` §2.
|
| 66 |
+
|
| 67 |
+
The cap was set at 6 rows per repo — about 1% of the set — chosen so that no single codebase can
|
| 68 |
+
move the headline number by more than a rounding error, while still admitting enough rows per
|
| 69 |
+
repo to be worth resolving a licence for. At n=600 the 95% confidence interval on an accuracy
|
| 70 |
+
near 93% is roughly ±2.0 points, against ±2.5 at n=400.
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## Per-row fields
|
| 75 |
+
|
| 76 |
+
```jsonc
|
| 77 |
+
{
|
| 78 |
+
"i": 0,
|
| 79 |
+
"input": "CODE <module>()\n RESUME 0\n ...", // model input: normalised disassembly
|
| 80 |
+
"expected": "def f(x):\n ...", // reference source
|
| 81 |
+
"src_path": "src/00000.py", // RELATIVE to this directory
|
| 82 |
+
"pyc_path": "pyc/00000.pyc",
|
| 83 |
+
"provenance": {
|
| 84 |
+
"repo": "owner/name",
|
| 85 |
+
"repo_url": "https://github.com/owner/name",
|
| 86 |
+
"file_path": "pkg/module.py", // path within the repo
|
| 87 |
+
"commit_sha": "1b38e7cd...", // the commit the function was taken at
|
| 88 |
+
"func_name": "Class.method",
|
| 89 |
+
"line_start": 323, "line_end": 372,
|
| 90 |
+
"permalink": "https://github.com/.../blob/<sha>/pkg/module.py#L323-L372",
|
| 91 |
+
"dataset": "code-search-net/code_search_net (python, train split)"
|
| 92 |
+
},
|
| 93 |
+
"license": {
|
| 94 |
+
"spdx": "BSD-3-Clause",
|
| 95 |
+
"file": "LICENSE", "blob_sha": "3d9cc0c2...",
|
| 96 |
+
"resolved_at_commit": "1b38e7cd...",
|
| 97 |
+
"resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}"
|
| 98 |
+
},
|
| 99 |
+
"n_instr": 49, "has_annotation": false
|
| 100 |
+
}
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
Paths are relative, so the set works from any checkout location. Nothing points at `/tmp`.
|
| 104 |
+
|
| 105 |
+
## How rows were selected
|
| 106 |
+
|
| 107 |
+
Source: `code-search-net/code_search_net`, python train split, read in file order from a local
|
| 108 |
+
parquet copy (`tools/fetch_csn.sh`; sha256
|
| 109 |
+
`ad9e3a4ab10c2c1d8926d2b26ca2bfcc3aadda1477ba29a933391f93806b9fed`).
|
| 110 |
+
|
| 111 |
+
3,138 rows were read to keep 600. In order:
|
| 112 |
+
|
| 113 |
+
| Gate | Effect |
|
| 114 |
+
|---|---|
|
| 115 |
+
| Repo cap (6) | 1,838 rows skipped — the mechanism that spreads the set across 117 repos |
|
| 116 |
+
| Repo blacklisted on licence | 668 rows skipped, from the 25 repos rejected below |
|
| 117 |
+
| **Licence not permissive / not resolvable** | **25 repos rejected** |
|
| 118 |
+
| Train-contamination (identifier-blind fingerprint) | 3 rows dropped |
|
| 119 |
+
| Unparseable | 4 rows dropped |
|
| 120 |
+
|
| 121 |
+
Repos rejected on licence: GPL-3.0 ×8, no licence file at that commit ×7, AGPL-3.0 ×3,
|
| 122 |
+
LGPL-3.0 ×2, GPL-2.0 ×2, `NOASSERTION` ×2, LGPL-2.1 ×1.
|
| 123 |
+
|
| 124 |
+
**A licence is resolved, never guessed.** `GET /repos/{owner}/{repo}/license?ref={sha}` must
|
| 125 |
+
return a concrete SPDX identifier on the allowlist (`tools/resolve_licenses.py:ALLOWED_SPDX`).
|
| 126 |
+
`NOASSERTION` and `Other` count as unresolved and the row is dropped. We never infer a licence
|
| 127 |
+
from a README, a `setup.py` classifier, or a package index.
|
| 128 |
+
|
| 129 |
+
## Normalisation
|
| 130 |
+
|
| 131 |
+
Each function is reduced to a normal form before compiling: every docstring is replaced by the
|
| 132 |
+
literal `'pass'`, then the tree is re-emitted with `ast.unparse`. Idempotence is checked per row
|
| 133 |
+
and a row that is not a fixed point is dropped.
|
| 134 |
+
|
| 135 |
+
This build uses `tools/normalize.py`, a stdlib-only implementation. **The GPL-3.0 tool that built
|
| 136 |
+
the previous benchmark is not in this pipeline.** The two agree byte-for-byte on 400/400 rows of
|
| 137 |
+
the previous benchmark (`tools/verify_equivalence.py`); the reasoning is in
|
| 138 |
+
`../../LICENSING-DETERMINATION.md` §1.
|
| 139 |
+
|
| 140 |
+
Because docstrings are normalised away, **this benchmark measures nothing about docstring
|
| 141 |
+
recovery** — `samples_with_real_docstring` is 0 by construction. Use the held-out set for that.
|
| 142 |
+
|
| 143 |
+
## Compilation
|
| 144 |
+
|
| 145 |
+
`py_compile` at `optimize=0` for the reference `.pyc`, and `compile(..., dont_inherit=True,
|
| 146 |
+
optimize=0)` for the model's input. `dont_inherit` is deliberate: the training corpus was
|
| 147 |
+
compiled with PEP-563 stringised annotations inherited, and real `.pyc` files are not. Handing
|
| 148 |
+
the model its training-time distribution would flatter it, so we do not. See
|
| 149 |
+
`../../DATA-CARD-training-corpus.md` §7.
|
| 150 |
+
|
| 151 |
+
## Harness soundness on this set
|
| 152 |
+
|
| 153 |
+
`grade.py --self-test-only`: pre-flight **600/600 = 100%**, mutation kill rate **116/116 = 100%**,
|
| 154 |
+
0 survivors. Both are prerequisites for quoting any score — but note that **pre-flight is trivial
|
| 155 |
+
by construction and proves nothing about soundness** (it compares `compile(x)` with `compile(x)`).
|
| 156 |
+
See `../../ORACLE-LIMITS.md` §1.
|
| 157 |
+
|
| 158 |
+
## Unit size — read this before comparing scores against another benchmark
|
| 159 |
+
|
| 160 |
+
An aggregate on this set is largely a statement about **small units**, so the size distribution is
|
| 161 |
+
part of the result rather than a footnote to it. Size is measured in **representation lines** —
|
| 162 |
+
the number of lines in the `input` field, i.e. the disassembly text a model is actually given.
|
| 163 |
+
|
| 164 |
+
| min | p25 | median | p75 | p90 | p99 | max |
|
| 165 |
+
|---|---|---|---|---|---|---|
|
| 166 |
+
| 19 | 39 | **59** | 101 | 167 | 478 | 1,622 |
|
| 167 |
+
|
| 168 |
+
Certification falls off sharply with size (v3 greedy, this set; intervals omitted below 30 rows /
|
| 169 |
+
10 repositories rather than printed at a misleading width):
|
| 170 |
+
|
| 171 |
+
| rep lines | rows | v3 greedy | 95% CI | v3 best-of-32 | 95% CI |
|
| 172 |
+
|---|---|---|---|---|---|
|
| 173 |
+
| 0–49 | 224 | 95.98% | [93.01, 98.51] | 98.21% | [96.31, 99.58] |
|
| 174 |
+
| 50–99 | 224 | 89.73% | [85.17, 93.93] | 98.21% | [96.26, 99.57] |
|
| 175 |
+
| 100–199 | 112 | 65.18% | [55.36, 74.14] | 85.71% | [77.57, 92.98] |
|
| 176 |
+
| 200–299 | 27 | 51.85% | — | 77.78% | — |
|
| 177 |
+
| 300–399 | 5 | 60.00% | — | 100.00% | — |
|
| 178 |
+
| 400–599 | 5 | 0.00% | — | 0.00% | — |
|
| 179 |
+
| 600+ | 3 | 0.00% | — | 0.00% | — |
|
| 180 |
+
|
| 181 |
+
**96.64%** of v3's greedy certifications on this set (95.37% at best-of-32) come from units under
|
| 182 |
+
200 rep lines, and above ~400 rep lines nothing certified even at 32 samples. The
|
| 183 |
+
300–399 bucket reading above the one below it is n=5 noise, not a recovery. Recompute all of it
|
| 184 |
+
with `harness/size_curve.py`; the stored output is `../../results/size_curve_csn600.json`.
|
| 185 |
+
|
| 186 |
+
## Limitations
|
| 187 |
+
|
| 188 |
+
- **Measured scores (2026-08-04, L1 strict oracle):** PyBytecode v3 greedy
|
| 189 |
+
**506/600 = 84.33%**, repo-clustered 95% CI [80.48, 87.94]; verified best-of-32
|
| 190 |
+
**562/600 = 93.67%**, CI [90.86, 96.08]. Untuned `Qwen2.5-Coder-1.5B-Instruct` control:
|
| 191 |
+
**4/600 = 0.67%**, CI [0.16, 1.35]. Per-row verdicts: `../../results/rows_with_base.jsonl`.
|
| 192 |
+
- GitHub's licence detection is repository-level. A repository can vendor third-party files under
|
| 193 |
+
other terms; we do not detect that, and no automated tool reliably does.
|
| 194 |
+
- A licence resolved at a commit is the licence *of that repository snapshot*. It does not prove
|
| 195 |
+
the specific file was contributed under it.
|
| 196 |
+
- CodeSearchNet is a 2019-era snapshot, so the code skews toward pre-3.7 idiom. It contains no
|
| 197 |
+
`match` statements, no walrus operators, and few modern typing constructs.
|
| 198 |
+
- Rows are capped, not sampled uniformly at random: the set is the first 6 admissible functions
|
| 199 |
+
per repository in dataset order. That is reproducible and unbiased with respect to difficulty,
|
| 200 |
+
but it is not a random sample of Python.
|
| 201 |
+
- 117 repositories is enough to defeat single-repo dominance; it is not a representative sample
|
| 202 |
+
of the language ecosystem.
|
| 203 |
+
|
| 204 |
+
## Provenance and licence of this benchmark
|
| 205 |
+
|
| 206 |
+
Derived from CodeSearchNet (`code-search-net/code_search_net`). The underlying functions remain
|
| 207 |
+
under their original licences and copyright, listed per row and reproduced in full in
|
| 208 |
+
`NOTICES.md` (117 repositories, 272 KB of licence text). The assembly, normalisation and
|
| 209 |
+
disassembly are ours.
|
benchmarks/csn-3.12-licensed/NOTICES.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
benchmarks/csn-3.12-licensed/bench.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
benchmarks/csn-3.12-licensed/build_stats.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"n": 600,
|
| 3 |
+
"repos": 117,
|
| 4 |
+
"cap_rows_per_repo": 6,
|
| 5 |
+
"max_rows_from_one_repo": 6,
|
| 6 |
+
"max_share_pct": 1.0,
|
| 7 |
+
"median_rows_per_repo": 6,
|
| 8 |
+
"licences": {
|
| 9 |
+
"MIT": 391,
|
| 10 |
+
"BSD-3-Clause": 118,
|
| 11 |
+
"Apache-2.0": 64,
|
| 12 |
+
"BSD-2-Clause": 15,
|
| 13 |
+
"ISC": 12
|
| 14 |
+
},
|
| 15 |
+
"top_repos": [
|
| 16 |
+
[
|
| 17 |
+
"mjirik/imcut",
|
| 18 |
+
6
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
"disqus/gutter",
|
| 22 |
+
6
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
"kaste/mockito-python",
|
| 26 |
+
6
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
"developersociety/django-glitter",
|
| 30 |
+
6
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
"quizl/quizler",
|
| 34 |
+
6
|
| 35 |
+
],
|
| 36 |
+
[
|
| 37 |
+
"MatterMiners/cobald",
|
| 38 |
+
6
|
| 39 |
+
],
|
| 40 |
+
[
|
| 41 |
+
"quantmind/agile-toolkit",
|
| 42 |
+
6
|
| 43 |
+
],
|
| 44 |
+
[
|
| 45 |
+
"aroberge/experimental",
|
| 46 |
+
6
|
| 47 |
+
],
|
| 48 |
+
[
|
| 49 |
+
"alixedi/palal",
|
| 50 |
+
6
|
| 51 |
+
],
|
| 52 |
+
[
|
| 53 |
+
"astroduff/commah",
|
| 54 |
+
6
|
| 55 |
+
],
|
| 56 |
+
[
|
| 57 |
+
"fchorney/rpI2C",
|
| 58 |
+
6
|
| 59 |
+
],
|
| 60 |
+
[
|
| 61 |
+
"jamescooke/flake8-aaa",
|
| 62 |
+
6
|
| 63 |
+
],
|
| 64 |
+
[
|
| 65 |
+
"mozilla-services/amo2kinto",
|
| 66 |
+
6
|
| 67 |
+
],
|
| 68 |
+
[
|
| 69 |
+
"josiah-wolf-oberholtzer/uqbar",
|
| 70 |
+
6
|
| 71 |
+
],
|
| 72 |
+
[
|
| 73 |
+
"fredrike/pypoint",
|
| 74 |
+
6
|
| 75 |
+
]
|
| 76 |
+
],
|
| 77 |
+
"scanned": 3138,
|
| 78 |
+
"repos_rejected_on_licence": 25,
|
| 79 |
+
"drops": {
|
| 80 |
+
"drop_contaminated": 3,
|
| 81 |
+
"drop_licence": 25,
|
| 82 |
+
"drop_parse": 4,
|
| 83 |
+
"skip_blacklisted_repo": 668,
|
| 84 |
+
"skip_repo_cap": 1838
|
| 85 |
+
},
|
| 86 |
+
"licence_reject_reasons": {
|
| 87 |
+
"no licence file at that commit, or repo unavailable": 7,
|
| 88 |
+
"GPL-3.0": 8,
|
| 89 |
+
"LGPL-3.0": 2,
|
| 90 |
+
"AGPL-3.0": 3,
|
| 91 |
+
"licence not identified by GitHub (spdx='NOASSERTION')": 2,
|
| 92 |
+
"LGPL-2.1": 1,
|
| 93 |
+
"GPL-2.0": 2
|
| 94 |
+
},
|
| 95 |
+
"allowed_spdx": [
|
| 96 |
+
"0BSD",
|
| 97 |
+
"Apache-2.0",
|
| 98 |
+
"BSD-2-Clause",
|
| 99 |
+
"BSD-3-Clause",
|
| 100 |
+
"BSD-3-Clause-Clear",
|
| 101 |
+
"CC0-1.0",
|
| 102 |
+
"ISC",
|
| 103 |
+
"MIT",
|
| 104 |
+
"MIT-0",
|
| 105 |
+
"PostgreSQL",
|
| 106 |
+
"Python-2.0",
|
| 107 |
+
"Unlicense",
|
| 108 |
+
"Zlib"
|
| 109 |
+
]
|
| 110 |
+
}
|
benchmarks/csn-3.12-licensed/pyc/00003.pyc
ADDED
|
Binary file (894 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00005.pyc
ADDED
|
Binary file (1.25 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00006.pyc
ADDED
|
Binary file (1.39 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00013.pyc
ADDED
|
Binary file (1.01 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00042.pyc
ADDED
|
Binary file (900 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00046.pyc
ADDED
|
Binary file (606 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00049.pyc
ADDED
|
Binary file (620 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00051.pyc
ADDED
|
Binary file (563 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00063.pyc
ADDED
|
Binary file (1.66 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00078.pyc
ADDED
|
Binary file (697 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00092.pyc
ADDED
|
Binary file (1.62 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00095.pyc
ADDED
|
Binary file (650 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00096.pyc
ADDED
|
Binary file (596 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00100.pyc
ADDED
|
Binary file (605 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00102.pyc
ADDED
|
Binary file (855 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00104.pyc
ADDED
|
Binary file (670 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00106.pyc
ADDED
|
Binary file (506 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00113.pyc
ADDED
|
Binary file (691 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00120.pyc
ADDED
|
Binary file (947 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00124.pyc
ADDED
|
Binary file (1.61 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00125.pyc
ADDED
|
Binary file (1.89 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00134.pyc
ADDED
|
Binary file (3 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00151.pyc
ADDED
|
Binary file (522 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00156.pyc
ADDED
|
Binary file (455 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00158.pyc
ADDED
|
Binary file (1.16 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00165.pyc
ADDED
|
Binary file (597 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00169.pyc
ADDED
|
Binary file (519 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00188.pyc
ADDED
|
Binary file (912 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00199.pyc
ADDED
|
Binary file (582 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00203.pyc
ADDED
|
Binary file (508 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00222.pyc
ADDED
|
Binary file (2.53 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00231.pyc
ADDED
|
Binary file (882 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00236.pyc
ADDED
|
Binary file (1.58 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00243.pyc
ADDED
|
Binary file (898 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00254.pyc
ADDED
|
Binary file (701 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00263.pyc
ADDED
|
Binary file (953 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00280.pyc
ADDED
|
Binary file (835 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00287.pyc
ADDED
|
Binary file (708 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00291.pyc
ADDED
|
Binary file (738 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00292.pyc
ADDED
|
Binary file (3.05 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00300.pyc
ADDED
|
Binary file (1.23 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00313.pyc
ADDED
|
Binary file (689 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00314.pyc
ADDED
|
Binary file (641 Bytes). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00325.pyc
ADDED
|
Binary file (1.31 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00327.pyc
ADDED
|
Binary file (1.33 kB). View file
|
|
|
benchmarks/csn-3.12-licensed/pyc/00328.pyc
ADDED
|
Binary file (841 Bytes). View file
|
|
|