Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- rust
|
| 7 |
+
- code
|
| 8 |
+
- instruction-tuning
|
| 9 |
+
- magicoder
|
| 10 |
+
- oss-instruct
|
| 11 |
+
pretty_name: Magicoder OSS Instruct Rust (3.9K Cleaned)
|
| 12 |
+
size_categories:
|
| 13 |
+
- 1K<n<10K
|
| 14 |
+
task_categories:
|
| 15 |
+
- text-generation
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# 🦀 Magicoder-OSS-Instruct-Rust (3.9K Cleaned)
|
| 19 |
+
|
| 20 |
+
**Magicoder-OSS-Instruct-Rust** is a high-quality, syntax-verified dataset of **3,901** Rust coding instructions derived from real-world open-source GitHub projects.
|
| 21 |
+
|
| 22 |
+
This dataset is extracted from [ise-uiuc/Magicoder-OSS-Instruct-75K](https://huggingface.co/datasets/ise-uiuc/Magicoder-OSS-Instruct-75K), filtered specifically for Rust, and validated via in-memory compiler checks.
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## ⚙️ Filtering and Verification Methodology
|
| 27 |
+
|
| 28 |
+
The dataset was processed using the following technical pipeline:
|
| 29 |
+
|
| 30 |
+
* **Language Filtering:** Extracted entries strictly where `lang: rust`, removing all other programming languages.
|
| 31 |
+
* **In-Memory Syntax Validation (`rustc` RAM Check):** All code snippets were evaluated on-the-fly via `rustc --crate-type=lib` through standard input (`stdin`). Entries with broken syntax, unclosed braces, or invalid AST structures were automatically discarded.
|
| 32 |
+
* **Format Standardization:** Converted raw problem/solution pairs into standard ChatML (`messages`) format for direct compatibility with SFT and Fine-Tuning frameworks (LoRA / QLoRA).
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## ⚠️ Filtering Summary (75K -> 3.9K)
|
| 37 |
+
|
| 38 |
+
Out of the original 75,000 multi-language samples:
|
| 39 |
+
1. Non-Rust programming languages were filtered out.
|
| 40 |
+
2. Incomplete snippets or entries failing `rustc` syntax checks were removed.
|
| 41 |
+
3. A clean, verified set of **3,901 high-quality Rust instructions** was produced.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## 📊 Dataset Structure
|
| 46 |
+
|
| 47 |
+
The dataset follows the **ChatML** (`messages`) format:
|
| 48 |
+
|
| 49 |
+
* **`system`**: System prompt assigning the expert Rust developer role.
|
| 50 |
+
* **`user`**: Rust programming task, module design requirement, or algorithmic problem.
|
| 51 |
+
* **`assistant`**: Corresponding idiomatic Rust solution.
|
| 52 |
+
|
| 53 |
+
### Schema Details
|
| 54 |
+
|
| 55 |
+
| Field | Type | Description |
|
| 56 |
+
|---|---|---|
|
| 57 |
+
| `id` | `int64` | Original dataset index |
|
| 58 |
+
| `task_category` | `string` | Task category identifier (`oss_instruct`) |
|
| 59 |
+
| `messages` | `list` | Conversation history containing `role` and `content` (`system`, `user`, `assistant`) |
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## 💡 Example Entry
|
| 64 |
+
|
| 65 |
+
```json
|
| 66 |
+
{
|
| 67 |
+
"id": 1601,
|
| 68 |
+
"task_category": "oss_instruct",
|
| 69 |
+
"messages": [
|
| 70 |
+
{
|
| 71 |
+
"role": "system",
|
| 72 |
+
"content": "Sen Rust programlama problemlerini çözerek doğru kodu üreten uzman bir asistansın."
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"role": "user",
|
| 76 |
+
"content": "You are tasked with creating a Rust module system for a 2D game engine..."
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"role": "assistant",
|
| 80 |
+
"content": "```rust\n// input_handler.rs\npub mod input_handler {\n pub struct InputHandler {\n // Implementation details\n }\n}\n\n// input.rs\npub mod input {\n pub use input_handler::InputHandler;\n pub use keyboard::Keyboard;\n pub use mouse::Mouse;\n pub use gamepad::Gamepad;\n}\n```\n\nIn this solution, we have created the input modules..."
|
| 81 |
+
}
|
| 82 |
+
]
|
| 83 |
+
}
|