--- license: apache-2.0 language: - en tags: - code - python - synthetic size_categories: - 10Mname.py` followed by the code, then `<|file_sep|>new_name.py` and the model writes that file; generation stops at the next file separator. Exemplars come from a pool of 3.9M short, simple files: 2.79M real files from [Avelina/python-edu-cleaned](https://huggingface.co/datasets/Avelina/python-edu-cleaned) and 1.11M functions from [BertilBraun/TinyPython](https://huggingface.co/datasets/BertilBraun/TinyPython) (description added as a docstring), all passing the filter below. The `style` column gives the prompt mix: `pe` (3-6 real files), `tp` (8-12 TinyPython functions), `mix` (both); `name` is the file name the model was asked to write (taken from another pool file). - **Filter** (every sample): parses as Python 3; 40-1024 tokens of the `tinypython_2k` tokenizer; at most 100 lines of at most 120 characters; block nesting at most 4; imports only from a small stdlib set; no literal with more than 24 elements; non-docstring string literals under 45% of the characters; under 1% non-ASCII; no heavy line repetition or extreme compressibility; at least 3 statements. Samples cut off by the length limit are dropped. - **Dedup**: exact, on the code with comments and blank lines removed (`hash` column); samples identical to a pool exemplar are dropped. - **Split**: ~0.5% of samples, chosen by hash, are in `validation`. `ntok` is the length in the `tinypython_2k` tokenizer from [openai/circuit_sparsity](https://github.com/openai/circuit_sparsity) (`circuit_sparsity/tiktoken_ext/tinypython.py`; vocabulary files at `https://openaipublic.blob.core.windows.net/circuit-sparsity/tinypython/`). ## Caveats - Not the paper's data: much weaker generators than GPT-4-base, and the exemplars steer the style toward beginner / exercise code. - The 1.5B samples are less coherent (docstrings that do not match the code, odd logic); filter on `model` if that matters. - Files are not executed; only parsed.