marksverdhai commited on
Commit
6c133f3
·
verified ·
1 Parent(s): 25047af

Add model card

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/functiongemma-270m-it
4
+ tags:
5
+ - function-calling
6
+ - asr
7
+ - bash
8
+ - voice-commands
9
+ - gemma
10
+ datasets:
11
+ - custom
12
+ language:
13
+ - en
14
+ pipeline_tag: text-generation
15
+ ---
16
+
17
+ # ASR-to-Bash
18
+
19
+ Fine-tuned FunctionGemma (270M) model that converts ASR (speech-to-text) transcriptions into executable bash commands.
20
+
21
+ ## Usage
22
+
23
+ ```python
24
+ from transformers import AutoModelForCausalLM, AutoTokenizer
25
+
26
+ model = AutoModelForCausalLM.from_pretrained("marksverdhai/asr-to-bash")
27
+ tokenizer = AutoTokenizer.from_pretrained("marksverdhai/asr-to-bash")
28
+
29
+ messages = [
30
+ {"role": "system", "content": "You are a helpful assistant that converts spoken commands into bash commands."},
31
+ {"role": "user", "content": "Convert this spoken command to bash: list all files including hidden ones"}
32
+ ]
33
+
34
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
35
+ outputs = model.generate(inputs, max_new_tokens=50)
36
+ print(tokenizer.decode(outputs[0]))
37
+ # Output: ls -la
38
+ ```
39
+
40
+ ## Examples
41
+
42
+ | ASR Transcription | Bash Command |
43
+ |------------------|--------------|
44
+ | "list all files" | `ls -la` |
45
+ | "git status" | `git status` |
46
+ | "change directory to home" | `cd ~` |
47
+ | "kill process one two three four" | `kill 1234` |
48
+ | "show running containers" | `docker ps` |
49
+
50
+ ## Training
51
+
52
+ Fine-tuned using Unsloth with LoRA on a custom dataset of ~100 ASR transcription to bash command pairs.
53
+
54
+ - Base model: `google/functiongemma-270m-it`
55
+ - LoRA rank: 16
56
+ - Training epochs: 3