mash / README.md
lumpenspace's picture
mash dataset v6: 40k pairs + builder
f6e7a63 verified
|
Raw
History Blame Contribute Delete
3.11 kB
metadata
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's local fixer model, mash.

Format

mlx-lm chat JSONL (train/valid/test):

{"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 (CC-BY-4.0, ~30k canonical example invocations) and 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 headercwd: 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 (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, 203 scenarios extracted from human breakage (NoFAQ, thefuck).

Attribution

Derived from tldr-pages (CC-BY-4.0) and NL2Bash (MIT; Lin et al., LREC 2018). Dataset licensed CC-BY-4.0 accordingly.