jonmabe commited on
Commit
49c7f14
·
verified ·
1 Parent(s): e70d699

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - text-generation
7
+ - cli
8
+ - shell
9
+ - command-line
10
+ - sft
11
+ - instruction-following
12
+ pipeline_tag: text-generation
13
+ widget:
14
+ - text: "Instruction: List all files in the current directory\nCommand:"
15
+ example_title: List files
16
+ - text: "Instruction: Find all Python files\nCommand:"
17
+ example_title: Find Python files
18
+ - text: "Instruction: Show disk usage\nCommand:"
19
+ example_title: Disk usage
20
+ ---
21
+
22
+ # Tiny-LLM CLI SFT (54M)
23
+
24
+ A **54 million parameter** language model fine-tuned for CLI command generation.
25
+
26
+ ## Model Description
27
+
28
+ This model is a Supervised Fine-Tuned (SFT) version of [jonmabe/tiny-llm-54m](https://huggingface.co/jonmabe/tiny-llm-54m), trained to generate Unix/Linux shell commands from natural language instructions.
29
+
30
+ ### Training Data
31
+
32
+ - **Geddy's NL2Bash dataset**: ~2,300 natural language to bash command pairs
33
+ - **NL2Bash benchmark**: Standard benchmark for command translation
34
+ - **Synthetic examples**: Additional generated pairs
35
+ - **Total**: ~13,000 training pairs
36
+
37
+ ### Training Details
38
+
39
+ | Parameter | Value |
40
+ |-----------|-------|
41
+ | Base Model | tiny-llm-54m |
42
+ | Training Steps | 2,000 |
43
+ | Best Checkpoint | Step 1,000 |
44
+ | Best Val Loss | 1.2456 |
45
+ | Learning Rate | 5e-5 |
46
+ | Batch Size | 16 |
47
+ | Hardware | NVIDIA RTX 5090 |
48
+ | Training Time | ~9 minutes |
49
+
50
+ ## Architecture
51
+
52
+ - **Parameters**: 54.93M
53
+ - **Layers**: 12
54
+ - **Hidden Size**: 512
55
+ - **Attention Heads**: 8
56
+ - **Intermediate Size**: 1408
57
+ - **Max Position**: 512
58
+ - **Vocabulary**: 32,000 tokens
59
+ - **Features**: RoPE, RMSNorm, SwiGLU, Weight Tying
60
+
61
+ ## Usage
62
+
63
+ ### Prompt Format
64
+
65
+ ```
66
+ Instruction: <natural language description>
67
+ Command:
68
+ ```
69
+
70
+ ### Example
71
+
72
+ ```python
73
+ from model import TinyLLM
74
+ import torch
75
+
76
+ # Load model
77
+ checkpoint = torch.load("best_model.pt", map_location="cpu")
78
+ model = TinyLLM(checkpoint["config"]["model"])
79
+ model.load_state_dict(checkpoint["model_state_dict"])
80
+ model.eval()
81
+
82
+ # Generate
83
+ prompt = "Instruction: Find all Python files modified in the last day\nCommand:"
84
+ # ... tokenize and generate
85
+ ```
86
+
87
+ ## Limitations
88
+
89
+ ⚠️ **Known Issues:**
90
+ - Tokenizer decode shows raw BPE tokens (Ġ = space, Ċ = newline)
91
+ - Model generates fragments of correct commands but output can be noisy
92
+ - Needs more training steps for reliable generation
93
+ - Small model size limits command complexity
94
+
95
+ ## Improvement Plan
96
+
97
+ 1. **Fix tokenizer decode** - Proper BPE to text conversion
98
+ 2. **Longer training** - 5,000-10,000 steps
99
+ 3. **Data quality** - Curate cleaner training pairs
100
+ 4. **Lower LR** - More stable convergence with 1e-5
101
+
102
+ ## License
103
+
104
+ Apache 2.0
105
+
106
+ ## Citation
107
+
108
+ ```bibtex
109
+ @misc{tiny-llm-cli-sft-2026,
110
+ author = {Jon Mabe},
111
+ title = {Tiny-LLM CLI SFT: Small Language Model for Command Generation},
112
+ year = {2026},
113
+ publisher = {HuggingFace},
114
+ url = {https://huggingface.co/jonmabe/tiny-llm-cli-sft}
115
+ }
116
+ ```