初始化项目,由ModelHub XC社区提供模型

Model: marksverdhai/asr-to-bash-gguf
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-04-30 19:59:45 +08:00
commit 7522901217
4 changed files with 103 additions and 0 deletions

60
README.md Normal file
View File

@@ -0,0 +1,60 @@
---
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