ASR-to-Bash

Fine-tuned FunctionGemma (270M) model that converts ASR (speech-to-text) transcriptions into executable bash commands.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("marksverdhai/asr-to-bash")
tokenizer = AutoTokenizer.from_pretrained("marksverdhai/asr-to-bash")

messages = [
    {"role": "system", "content": "You are a helpful assistant that converts spoken commands into bash commands."},
    {"role": "user", "content": "Convert this spoken command to bash: list all files including hidden ones"}
]

inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0]))
# Output: ls -la

Examples

ASR Transcription Bash Command
"list all files" ls -la
"git status" git status
"change directory to home" cd ~
"kill process one two three four" kill 1234
"show running containers" docker ps

Training

Fine-tuned using Unsloth with LoRA on a custom dataset of ~100 ASR transcription to bash command pairs.

  • Base model: google/functiongemma-270m-it
  • LoRA rank: 16
  • Training epochs: 3
Downloads last month
15
Safetensors
Model size
0.3B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for marksverdhai/asr-to-bash

Finetuned
(202)
this model