Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("ThingAI/Dwarf-15M-Instruct", trust_remote_code=True)
4model = AutoModelForCausalLM.from_pretrained("ThingAI/Dwarf-15M-Instruct", trust_remote_code=True)
5
6prompt = "<|user|>\nFind all Python files modified in the last 3 days\n<|end|>\n<|assistant|>\n"
7inputs = tokenizer(prompt, return_tensors="pt")
8outputs = model.generate(**inputs, max_new_tokens=100, do_sample=False)
9print(tokenizer.decode(outputs[0], skip_special_tokens=False))
10# → find . -name '*.py' -mtime -3| Prompt | Output |
|---|---|
| Show current date | date |
| List files | ls |
| Kill process 1234 | kill 1234 |
| Delete all .tmp files in current directory | rm ./*.tmp |
| Compress the /home/user/project folder | tar -czf project.tar.gz /home/user/project/ |
| Check if port 8080 is in use | ss -tlnp | grep 8080 |
| Restart the nginx service | sudo systemctl restart nginx |
| Find all files containing TODO | grep -rl 'TODO' . |
| Change owner of /var/www to www-data | sudo chown -R www-data:www-data /var/www |
| Run script.sh in background and log output | nohup ./script.sh > log.txt 2>&1 & |
| Find and replace foo with bar in config.txt | sed -i 's/foo/bar/g' config.txt |
| What does chmod 755 do? | chmod 755 sets read+write+execute for owner, read+execute for group and others. |
| Write a bash function that counts lines | count_lines() { wc -l < "$1"; } |
| Parameter | Value |
|---|---|
| Parameters | 15.54M |
| Layers | 12 |
| Hidden dim | 320 |
| Attention | GQA (5 query, 1 KV head) |
| FFN | SwiGLU (d_ff=864) |
| Normalization | RMSNorm |
| Positional | RoPE (θ=10000) |
| Vocabulary | 8,202 (DwarfGoToken) |
| Max sequence | 2,048 |
| Weight tying | Yes (embed ↔ lm_head) |
<|user|>
Your question here
<|end|>
<|assistant|>
Model response here
<|end|>1@misc{dwarf15m2026,
2 title={Dwarf-15M-Instruct: A Shell Specialist Language Model},
3 author={ThingsAI},
4 year={2026},
5 url={https://huggingface.co/ThingAI/Dwarf-15M-Instruct}
6}