Datasets:
File size: 3,112 Bytes
f6e7a63 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
license: cc-by-4.0
task_categories:
- text-generation
language:
- en
tags:
- shell
- command-correction
- terminal
- synthetic
pretty_name: "Mash: mangled shell"
size_categories:
- 10K<n<100K
---
# mash — mangled shell (training dataset)
~42k pairs for training shell-command **correction** models: garbled or
natural-language input → the command the user meant. As of Aug 2026 this task
had no public dataset — everything nearby is NL→bash translation. Built for
[fash](https://github.com/lumpenspace/fash)'s local fixer model,
[mash](https://huggingface.co/lumpenspace/mash).
## Format
mlx-lm chat JSONL (`train`/`valid`/`test`):
```json
{"messages": [
{"role": "system", "content": "Return the shell command the user most likely wants. Reply with the command only."},
{"role": "user", "content": "gti pusj origin mian"},
{"role": "assistant", "content": "git push origin main"}
]}
```
## Composition
Valid commands come from [tldr-pages](https://github.com/tldr-pages/tldr)
(CC-BY-4.0, ~30k canonical example invocations) and
[NL2Bash](https://github.com/TellinaTool/nl2bash) (MIT, ~12k expert
one-liners). Placeholders are filled from concrete scenarios, with descriptions
rewritten to match (so "open a specific file" becomes "open the settings file"
→ `joe settings.json`).
A share of rows (~11%) carry a **context header** — `cwd:` plus a `files:`
directory listing — synthesized so exactly one plausible variant of the
referenced file exists; the answer must use the file that is actually there
("open the settings file" → `joe settings.toml` when the listing has
`settings.toml`, not `settings.json`). The rest are bare, so models trained on
this data work with or without context.
Three pair types:
- **typo pairs** — commands corrupted by a weighted taxonomy of realistic
manglings: transposed/dropped/adjacent-QWERTY/doubled chars, `-`/`--`
confusion, merged words, stripped quotes, missing or spurious `sudo`,
copy-pasted `$ ` prompt prefixes, duplicated words, smart quotes/en-dashes,
plus curated high-frequency head typos (`gerp`, `sl`, `suod`, `dokcer`, …).
- **request pairs** — example descriptions, verbatim and "casualized" into the
terse phrasing people actually type.
- **identity pairs** (~5%) — correct→correct, so models learn not to
over-correct. Kept deliberately small: at ~12% a 1.5B run learned to echo
39% of genuinely garbled inputs.
Generated deterministically by
[`training/build_dataset.py`](https://github.com/lumpenspace/fash/blob/main/training/build_dataset.py)
(seed 7). No user data or shell history is included.
## Evaluation
Exact match on the held-out `test` split flatters models — it shares the
generator's bias. For real-world numbers use
[mash-bench](https://huggingface.co/datasets/lumpenspace/mash-bench), 203
scenarios extracted from human breakage (NoFAQ, thefuck).
## Attribution
Derived from [tldr-pages](https://github.com/tldr-pages/tldr) (CC-BY-4.0) and
[NL2Bash](https://github.com/TellinaTool/nl2bash) (MIT; Lin et al., LREC 2018).
Dataset licensed CC-BY-4.0 accordingly.
|