kipasyangin5 commited on
Commit
02a0ce8
Β·
verified Β·
1 Parent(s): 205bae1

Link Python generator source scripts in README card

Browse files
Files changed (1) hide show
  1. README.md +69 -64
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** ([`terminal_dataset.py`](https://huggingface.co/kipasyangin5/5m-terminal-lm-chinchilla/blob/main/training_code/terminal_dataset.py)):
29
-
30
- 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`).
31
- 2. **Interactive Shell Session Logs**: Generates multi-turn terminal session logs (`$ cd ..
32
- $ pwd
33
- /home/user`) to teach the model causal terminal prompt mechanics.
34
- 3. **Chained Execution Logic**: Generates multi-command shell pipelines (`$ mkdir project && cd project && git init`).
35
-
36
- ---
37
-
38
- ## πŸ“Š Dataset Schema & Files
39
-
40
- | File | Format | Description |
41
- | :--- | :--- | :--- |
42
- | **`terminal_cli_commands.jsonl`** | JSON Lines | Structured JSON entries containing `question`, `command`, and `formatted_dialogue`. |
43
- | **`terminal_cli_commands.txt.gz`** | Compressed Text | Gzip-compressed raw text stream for direct PyTorch DataLoader streaming. |
44
- | **`terminal_cli_sample.txt`** | Plain Text | 500-line sample preview for instant browser inspection. |
45
-
46
- ### JSONL Sample Entry:
47
- ```json
48
- {
49
- "id": 42,
50
- "type": "qa_pair",
51
- "question": "How do I navigate up one directory?",
52
- "command": "cd ..",
53
- "formatted_dialogue": "User: How do I navigate up one directory?\nAssistant: Run `cd ..`\n"
54
- }
55
- ```
56
-
57
- ---
58
-
59
- ## πŸ”— Related Models & Code
60
-
61
- * **5M Chinchilla Model**: [`kipasyangin5/5m-terminal-lm-chinchilla`](https://huggingface.co/kipasyangin5/5m-terminal-lm-chinchilla)
62
- * **5M Saturated Model**: [`kipasyangin5/5m-terminal-lm-saturated`](https://huggingface.co/kipasyangin5/5m-terminal-lm-saturated)
63
- * **Complete Training Code**: [`kipasyangin5/5m-terminal-lm-chinchilla/tree/main/training_code`](https://huggingface.co/kipasyangin5/5m-terminal-lm-chinchilla/tree/main/training_code)
64
- * **Live Playground Space**: [`kipasyangin5/5m-terminal-lm-chat`](https://huggingface.co/spaces/kipasyangin5/5m-terminal-lm-chat)
 
 
 
 
 
 
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)