phi3-nl2bash-canonical: Specialized NL to Bash Translation
phi3-nl2bash-canonical is a highly specialized 4-billion parameter language model, fine-tuned from microsoft/phi-3-mini-4k-instruct, designed exclusively for translating natural language into minimal, valid, and POSIX-safe Bash commands. Unlike general-purpose LLMs, this model is intentionally constrained to produce single, canonical commands without explanations, pipelines, subshells, or side effects, prioritizing safety and determinism over breadth.
Key Capabilities
- Deterministic NL to Bash: Converts natural language instructions into a single, canonical Bash command.
- POSIX-Safe Output: Ensures generated commands are safe, avoiding complex shell constructs, networking, or destructive operations.
- Constrained Command Set: Focuses on common local commands like
ls, cd, mkdir, touch, cp, mv, chmod, cat, head, tail, basename, dirname, and wc. - No Explanations or Pipelines: Delivers only the command, without additional text or complex chaining.
Good for
- Command-Line Education: Ideal for teaching fundamental Bash commands in a controlled environment.
- Tooling & Automation: Suitable for safe, constrained automation tasks where precise command generation is critical.
- NL→CLI Evaluation: Useful for benchmarking and evaluating natural language to command-line translation systems.
- Local Inference: Optimized for CPU-efficient local inference with available GGUF quantized variants (e.g., Q4_0 for Ollama/llama.cpp).