Datasets:
|
Download README.md from Stray2024/stray-python-verified: direct link, hf CLI and curl.
- Browser
- Download file 4.21 kB
-
https://huggingface.co/datasets/Stray2024/stray-python-verified/resolve/main/README.md
- Command line
-
hf download hf://datasets/Stray2024/stray-python-verified/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Stray2024/stray-python-verified/resolve/main/README.md
4.21 kB
| language: | |
| - ru | |
| - en | |
| license: apache-2.0 | |
| task_categories: | |
| - text-generation | |
| tags: | |
| - code | |
| - python | |
| - synthetic | |
| - compiler-verified | |
| - instruction-tuning | |
| - unsloth | |
| size_categories: | |
| - n<1K | |
| # 🤖 Stray Python Verified Dataset | |
| [English](#english) | [Русский](#русский) | |
| --- | |
| ## English | |
| ### Overview | |
| **Stray Python Verified** is a high-purity synthetic dataset designed for instruction-tuning and fine-tuning lightweight code LLMs (e.g., Qwen 2.5 Coder 0.5B/1.5B/3B, Gemma 2/3, Llama 3.2). | |
| Each sample in this dataset was generated using a **Dual-AI pipeline** and subjected to a strict **3-stage automated compiler and sandbox verification** before being accepted: | |
| 1. **AST Parsing (`ast.parse`)**: Verifies syntactic accuracy and structural integrity. | |
| 2. **Bytecode Compilation (`compile`)**: Validates CPython bytecode generation. | |
| 3. **Execution Sandbox (`subprocess.run`)**: Verifies runtime behavior and filters out hanging loops (`timeout > 3s`) and runtime exceptions. | |
| ### Dataset Format | |
| The dataset is formatted in standard **ChatML (`messages`)** format: | |
| ```json | |
| { | |
| "messages": [ | |
| {"role": "system", "content": "Ты опытный Python разработчик..."}, | |
| {"role": "user", "content": "<Task condition>"}, | |
| {"role": "assistant", "content": "```python\n<Verified Code>\n```"} | |
| ] | |
| } | |
| ``` | |
| ### ⚠️ Disclaimer & Limitations | |
| * This dataset was **synthetically generated by AI models** and filtered automatically through code compilers and execution sandboxes. | |
| * While the code is guaranteed to be syntactically valid and non-crashing in basic environments, **some subtle logical oversights, edge-case limitations, or imperfect implementations may still be present**. | |
| * Intended primarily for research, distillation, and fine-tuning experiments. | |
| --- | |
| ## Русский | |
| ### Описание | |
| **Stray Python Verified** — это очищенный синтетический датасет для дообучения (SFT / LoRA) компактных языковых моделей по программированию на Python (Qwen 2.5 Coder, Gemma, Llama). | |
| Каждый пример создан двух-агентной фабрикой (**Dual-AI**) и прошёл автоматический **3-ступенчатый фильтр компилятора и рантайм-песочницы**: | |
| 1. **AST-валидация**: отсекает синтаксические ошибки, кривые отступы и незакрытые скобки. | |
| 2. **Компиляция байткода**: гарантирует корректность внутренней структуры Python C-байткода. | |
| 3. **Изолированный запуск**: отлавливает зависающие циклы (`timeout > 3s`) и рантайм-падения. | |
| ### Формат данных | |
| Данные упакованы в стандартный формат **ChatML (`messages`)**, полностью готовый для обучения через **Unsloth, TRL, SFTTrainer** и Hugging Face: | |
| * `system`: инструкция для роли разработчика. | |
| * `user`: условие задачи по Python. | |
| * `assistant`: протестированный рабочий блок кода. | |
| ### ⚠️ Предупреждение и ограничения | |
| * Датасет **сгенерирован искусственным интеллектом** и проверен компилятором. | |
| * Несмотря на автоматическую проверку синтаксиса и выполнения, **в коде могут присутствовать логические недочёты, шероховатости или неоптимальные краевые случаи**. | |
| * Создан для исследовательских целей, экспериментов по дистилляции знаний и дообучению легковесных моделей. | |
| --- | |
| **Author / Создатель:** [Stray2024](https://huggingface.co/Stray2024) | |
| **Current Samples / Всего сэмплов:** 187 | |