Datasets:
Add bilingual Dataset Card with AI generation disclaimer
Browse files
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ru
|
| 4 |
+
- en
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
task_categories:
|
| 7 |
+
- text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- code
|
| 10 |
+
- python
|
| 11 |
+
- synthetic
|
| 12 |
+
- compiler-verified
|
| 13 |
+
- instruction-tuning
|
| 14 |
+
- unsloth
|
| 15 |
+
size_categories:
|
| 16 |
+
- n<1K
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# 🤖 Stray Python Verified Dataset
|
| 20 |
+
|
| 21 |
+
[English](#english) | [Русский](#русский)
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## English
|
| 26 |
+
|
| 27 |
+
### Overview
|
| 28 |
+
**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).
|
| 29 |
+
|
| 30 |
+
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:
|
| 31 |
+
1. **AST Parsing (`ast.parse`)**: Verifies syntactic accuracy and structural integrity.
|
| 32 |
+
2. **Bytecode Compilation (`compile`)**: Validates CPython bytecode generation.
|
| 33 |
+
3. **Execution Sandbox (`subprocess.run`)**: Verifies runtime behavior and filters out hanging loops (`timeout > 3s`) and runtime exceptions.
|
| 34 |
+
|
| 35 |
+
### Dataset Format
|
| 36 |
+
The dataset is formatted in standard **ChatML (`messages`)** format:
|
| 37 |
+
```json
|
| 38 |
+
{
|
| 39 |
+
"messages": [
|
| 40 |
+
{"role": "system", "content": "Ты опытный Python разработчик..."},
|
| 41 |
+
{"role": "user", "content": "<Task condition>"},
|
| 42 |
+
{"role": "assistant", "content": "```python\n<Verified Code>\n```"}
|
| 43 |
+
]
|
| 44 |
+
}
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
### ⚠️ Disclaimer & Limitations
|
| 48 |
+
* This dataset was **synthetically generated by AI models** and filtered automatically through code compilers and execution sandboxes.
|
| 49 |
+
* 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**.
|
| 50 |
+
* Intended primarily for research, distillation, and fine-tuning experiments.
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## Русский
|
| 55 |
+
|
| 56 |
+
### Описание
|
| 57 |
+
**Stray Python Verified** — это очищенный синтетический датасет для дообучения (SFT / LoRA) компактных языковых моделей по программированию на Python (Qwen 2.5 Coder, Gemma, Llama).
|
| 58 |
+
|
| 59 |
+
Каждый пример создан двух-агентной фабрикой (**Dual-AI**) и прошёл автоматический **3-ступенчатый фильтр компилятора и рантайм-песочницы**:
|
| 60 |
+
1. **AST-валидация**: отсекает синтаксические ошибки, кривые отступы и незакрытые скобки.
|
| 61 |
+
2. **Компиляция байткода**: гарантирует корректность внутренней структуры Python C-байткода.
|
| 62 |
+
3. **Изолированный запуск**: отлавливает зависающие циклы (`timeout > 3s`) и рантайм-падения.
|
| 63 |
+
|
| 64 |
+
### Формат данных
|
| 65 |
+
Данные упакованы в стандартный формат **ChatML (`messages`)**, полностью готовый для обучения через **Unsloth, TRL, SFTTrainer** и Hugging Face:
|
| 66 |
+
* `system`: инструкция для роли разработчика.
|
| 67 |
+
* `user`: условие задачи по Python.
|
| 68 |
+
* `assistant`: протестированный рабочий блок кода.
|
| 69 |
+
|
| 70 |
+
### ⚠️ Предупреждение и ограничения
|
| 71 |
+
* Датасет **сгенерирован искусственным интеллектом** и проверен компилятором.
|
| 72 |
+
* Несмотря на автоматическую проверку синтаксиса и выполнения, **в коде могут присутствовать логические недочёты, шероховатости или неоптимальные краевые случаи**.
|
| 73 |
+
* Создан для исследовательских целей, экспериментов по дистилляции знаний и дообучению легковесных моделей.
|
| 74 |
+
|
| 75 |
+
---
|
| 76 |
+
**Author / Создатель:** [Stray2024](https://huggingface.co/Stray2024)
|
| 77 |
+
**Current Samples / Всего сэмплов:** 187
|