Skip to content

galassoandrea/shell-SLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShellSLM

Translating human instructions into shell commands.

Overview

ShellSLM is a fine-tuned version of the Small Language Model Qwen3.5-4B, for translating human instructions into corresponding Linux shell commands.

Steps

The fine-tuning pipeline consists in a series of steps:

  1. Download the dataset containing human instructions and corresponding commands.

  2. Pre-process the dataset to filter out non-Linux commands and add a column defining the system role.

  3. Apply the chat template required by the model (ChatML)

  4. Fine-tune the pretrained model on the preprocessed dataset.

Technical Details

  • The specific dataset used is NL2SH-ALPACA from HuggingFace, which is a variant of the NL2SH-ALFA dataset, already converted in the ALPACA format (instruction, input, output).

  • To load and train the Qwen3.5-4B model, the Unsloth framework is used, which allows to perform a training ~2x faster with ~70% less VRAM, without accuracy loss.

  • To avoid saturating the VRAM and make the training process even faster, the model is loaded with a 4bit quantization.

  • The type of fine-tuning performed is Parameter-efficient fine-tuning (PEFT) using LoRA algorithm.

  • The model has been fine-tuned on a NVIDIA A100 GPU with 80 GB of VRAM.

Quick Start

IMPORTANT: The model is still under evaluation, so be careful when using it and always verify its output! Evaluation results will be published here when ready.

You can test the model on the HuggingFace space at the link: https://huggingface.co/spaces/andreagalasso99/shell-SLM.

If you want to use the model in your experiments, you can follow the instructions provided on the model card of the HuggingFace model repository: https://huggingface.co/andreagalasso99/Qwen3.5-4B-NL2SH

About

Fine-tuning of a Small Language Model for the translation of natural language instructions into Linux terminal commands.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages