Files
asr-to-bash-gguf/README.md

61 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

---
license: apache-2.0
base_model: google/functiongemma-270m-it
tags:
- function-calling
- asr
- bash
- voice-commands
- gemma
datasets:
- custom
language:
- en
pipeline_tag: text-generation
---
# ASR-to-Bash (GGUF)
Fine-tuned FunctionGemma (270M) model that converts ASR (speech-to-text) transcriptions into executable bash commands.
## Usage
```python
# For llama.cpp / Ollama usage
# llama-cli -m asr-to-bash-q4_k_m.gguf -p 'Convert: list all files'
# Or with Python:
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