Downloads · 30 days
16
23% of all-time downloads
marksverdhai/asr-to-bash
asr-to-bash is a text generation model from marksverdhai. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Fine-tuned FunctionGemma (270M) model that converts ASR (speech-to-text) transcriptions into executable bash commands.
Downloads · 30 days
16
23% of all-time downloads
All-time downloads
71
Public
Parameters
268M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors536 MB · 93%
From the Hugging Face model README
Fine-tuned FunctionGemma (270M) model that converts ASR (speech-to-text) transcriptions into executable bash commands.
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
| 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 |
Fine-tuned using Unsloth with LoRA on a custom dataset of ~100 ASR transcription to bash command pairs.
google/functiongemma-270m-it