Link Python generator source scripts in README card
Browse files
README.md
CHANGED
|
@@ -1,64 +1,69 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
tags:
|
| 6 |
-
- terminal
|
| 7 |
-
- cli
|
| 8 |
-
- linux
|
| 9 |
-
- bash
|
| 10 |
-
- shell
|
| 11 |
-
- coding
|
| 12 |
-
- synthetic
|
| 13 |
-
pretty_name: Linux Terminal & CLI Commands Corpus
|
| 14 |
-
size_categories:
|
| 15 |
-
- 10K<n<100K
|
| 16 |
-
---
|
| 17 |
-
|
| 18 |
-
# π» Pure Linux Terminal & CLI Commands Dataset
|
| 19 |
-
|
| 20 |
-
This repository contains **50,000 pure Linux CLI command scenarios, shell navigation interactions, and bash command Q&A pairs**.
|
| 21 |
-
|
| 22 |
-
---
|
| 23 |
-
|
| 24 |
-
## π§ How This Dataset Came To Exist
|
| 25 |
-
|
| 26 |
-
Small language models (such as 5.0 Million parameter models) face a severe **data scarcity and noise problem**: web text dumps (like Common Crawl) contain noisy HTML artifacts, broken code, and rambling prose that dilute small neural networks.
|
| 27 |
-
|
| 28 |
-
To train a tiny 5M parameter model to navigate Linux, run commands, and assist with terminal syntax with **100% accuracy and zero noise**, we engineered a **Synthesized Shell Compilation Engine**
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
| 43 |
-
|
|
| 44 |
-
| **`
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
``
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
"
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- terminal
|
| 7 |
+
- cli
|
| 8 |
+
- linux
|
| 9 |
+
- bash
|
| 10 |
+
- shell
|
| 11 |
+
- coding
|
| 12 |
+
- synthetic
|
| 13 |
+
pretty_name: Linux Terminal & CLI Commands Corpus
|
| 14 |
+
size_categories:
|
| 15 |
+
- 10K<n<100K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# π» Pure Linux Terminal & CLI Commands Dataset
|
| 19 |
+
|
| 20 |
+
This repository contains **50,000 pure Linux CLI command scenarios, shell navigation interactions, and bash command Q&A pairs**.
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## π§ How This Dataset Came To Exist (Source Code Linked)
|
| 25 |
+
|
| 26 |
+
Small language models (such as 5.0 Million parameter models) face a severe **data scarcity and noise problem**: web text dumps (like Common Crawl) contain noisy HTML artifacts, broken code, and rambling prose that dilute small neural networks.
|
| 27 |
+
|
| 28 |
+
To train a tiny 5M parameter model to navigate Linux, run commands, and assist with terminal syntax with **100% accuracy and zero noise**, we engineered a **Synthesized Shell Compilation Engine**:
|
| 29 |
+
|
| 30 |
+
π **View Python Generator Code**: [`terminal_dataset.py`](./terminal_dataset.py)
|
| 31 |
+
π **View Full Dataset Build Code**: [`build_cli_only.py`](./build_cli_only.py)
|
| 32 |
+
|
| 33 |
+
### Engine Mechanics:
|
| 34 |
+
1. **Structured Command Pair Generation**: Programmatically synthesizes natural language user queries mapped to exact, un-corrupted Linux CLI commands (`cd ..`, `ls -la`, `mkdir -p`, `grep -rn`, `chmod +x`, `git commit`, `docker run`, `curl`, `df -h`, `free -h`).
|
| 35 |
+
2. **Interactive Shell Session Logs**: Generates multi-turn terminal session logs (`$ cd .. \n $ pwd \n /home/user`) to teach the model causal terminal prompt mechanics.
|
| 36 |
+
3. **Chained Execution Logic**: Generates multi-command shell pipelines (`$ mkdir project && cd project && git init`).
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## π Dataset Schema & Files
|
| 41 |
+
|
| 42 |
+
| File | Format | Description |
|
| 43 |
+
| :--- | :--- | :--- |
|
| 44 |
+
| **`terminal_dataset.py`** | Python | Raw generator script defining templates and dataset compilation logic. |
|
| 45 |
+
| **`build_cli_only.py`** | Python | Execution script that built and uploaded this dataset to HF Hub. |
|
| 46 |
+
| **`terminal_cli_commands.jsonl`** | JSON Lines | Structured JSON entries containing `question`, `command`, and `formatted_dialogue`. |
|
| 47 |
+
| **`terminal_cli_commands.txt.gz`** | Compressed Text | Gzip-compressed raw text stream for direct PyTorch DataLoader streaming. |
|
| 48 |
+
| **`terminal_cli_sample.txt`** | Plain Text | 500-line sample preview for instant browser inspection. |
|
| 49 |
+
|
| 50 |
+
### JSONL Sample Entry:
|
| 51 |
+
```json
|
| 52 |
+
{
|
| 53 |
+
"id": 42,
|
| 54 |
+
"type": "qa_pair",
|
| 55 |
+
"question": "How do I navigate up one directory?",
|
| 56 |
+
"command": "cd ..",
|
| 57 |
+
"formatted_dialogue": "User: How do I navigate up one directory?\nAssistant: Run `cd ..`\n"
|
| 58 |
+
}
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## π Related Models & Code
|
| 64 |
+
|
| 65 |
+
* **5M Chinchilla Model**: [`kipasyangin5/5m-terminal-lm-chinchilla`](https://huggingface.co/kipasyangin5/5m-terminal-lm-chinchilla)
|
| 66 |
+
* **5M Saturated Model**: [`kipasyangin5/5m-terminal-lm-saturated`](https://huggingface.co/kipasyangin5/5m-terminal-lm-saturated)
|
| 67 |
+
* **Complete Training Code Folder**: [`kipasyangin5/5m-terminal-lm-chinchilla/tree/main/training_code`](https://huggingface.co/kipasyangin5/5m-terminal-lm-chinchilla/tree/main/training_code)
|
| 68 |
+
* **Live Playground Space**: [`kipasyangin5/5m-terminal-lm-chat`](https://huggingface.co/spaces/kipasyangin5/5m-terminal-lm-chat)
|
| 69 |
+
* **Official Collection**: [`kipasyangin5/5m-terminal-language-model-suite-6a6e83a13bb0effb11d9e53d`](https://huggingface.co/collections/kipasyangin5/5m-terminal-language-model-suite-6a6e83a13bb0effb11d9e53d)
|