Making bad CLIs fun with Small Language Models

Moritz Bauer

Natural Language Processing & Audio (incl. Generative AI NLP)
Python Skill Novice
Domain Expertise Novice

I've often had to rely on a poorly designed home-grown CLI, leading to frustration due to constantly forgetting argument names and allowable values. While Large Language Models (LLMs) initially appeared to be an ideal fix, their limitations quickly became evident, suggesting the need for a more efficient approach.

To begin, we'll have a look at what makes CLIs hard to use and articulate why LLMs fall short in addressing them. Following this, we'll examine the process of generating synthetic data tailored for any CLI, whether it's proprietary or open-source. Then, I'll show you how to use this synthetic dataset to fine-tune a Small Language Model on your laptop or in the cloud. We will use the smallest variant of Google's Gemma 3 models, which boasts a lean 270 million parameters, to transform natural language instructions into actionable CLI commands.

Lastly, I'll share benchmark results to illustrate that these models can operate smoothly on various machines without needing API keys or GPUs, showcasing their robust capability and practical deployment potential.

Moritz Bauer

Moritz Bauer is a Senior Data Scientist at Blue Yonder, where he currently develops software for demand forecasting. In a previous career, he obtained a Ph.D. in high-energy particle physics and contributed research to the Belle II flavor physics experiment at KEK.

While demand forecasting works very well without language models, he can't escape the fascination of modern AI and is always looking for excuses to spend some time in this domain.