ShellWhisperer-1.5B / README.md
King3Djbl's picture
Fix: correct base model to Qwen2.5-1.5B, add full capabilities, uncensored benchmarks, training details, dataset usage, v2 roadmap
fb24917 verified
|
Raw
History Blame
10.5 kB
---
language:
- en
license: mit
library_name: transformers
pipeline_tag: text-generation
tags:
- fableforge
- agent
- code-generation
- tool-use
- reasoning
- shell
- uncensored
- qwen2
- edge-inference
- terminal
- devops
base_model: Qwen/Qwen2.5-1.5B-Instruct
---
# ShellWhisperer-1.5B
A compact, **fully uncensored** 1.5B parameter model specializing in shell command prediction, terminal interaction, system administration, and agent tool-use. Built on **Qwen2.5-1.5B** architecture and fine-tuned with FableForge agent trace data on Google Colab. Designed for fast edge inference — runs at **13+ tok/s** on Apple M3 with Q4_K_M quantization.
> **Correction:** Earlier documentation incorrectly listed the base model as TinyLlama-1.1B and architecture as LlamaForCausalLM with 24 layers / 2048 hidden. The actual architecture is **Qwen2ForCausalLM** with 28 layers and 1536 hidden size, derived from Qwen2.5-1.5B.
## Architecture
| Attribute | Value |
|-----------|-------|
| **Architecture** | Qwen2ForCausalLM |
| **Base Model** | Qwen/Qwen2.5-1.5B-Instruct |
| **Parameters** | 1.5B |
| **Hidden Size** | 1536 |
| **Layers** | 28 |
| **Attention Heads** | 12 |
| **KV Heads (GQA)** | 2 |
| **Intermediate Size** | 8960 |
| **Vocab Size** | 151,936 |
| **Max Context** | 32,768 tokens |
| **Tied Embeddings** | Yes |
| **Training Data** | FableForge agent traces + Fable5 reasoning data |
## Capabilities
### Shell & Terminal Mastery
- **Command prediction**: Suggests shell commands from natural language descriptions
- **Error diagnosis**: Analyzes terminal errors and proposes fixes
- **Pipeline construction**: Builds complex shell pipelines (pipes, redirects, subshells)
- **Script generation**: Writes bash/zsh/fish scripts for automation
- **Package management**: Apt, yum, brew, pip, npm command sequences
- **Docker & containers**: Dockerfile authoring, docker-compose, kubectl commands
### Agent Tool-Use
- **Function calling**: Structured tool-call format with argument extraction
- **Multi-step orchestration**: Chains tool calls to accomplish complex tasks
- **Reasoning traces**: Step-by-step reasoning before action (chain-of-thought)
- **Error recovery**: Handles tool failures with retry/alternative strategies
### Code Generation
- **Python, JavaScript, Go**: Primary languages in training data
- **Infrastructure-as-code**: Terraform, Ansible, CloudFormation snippets
- **CI/CD pipelines**: GitHub Actions, GitLab CI workflow definitions
- **API integration**: REST/GraphQL client code generation
### System Administration
- **Linux administration**: User management, permissions, systemd, cron
- **Network diagnostics**: netstat, ss, tcpdump, nmap workflows
- **Cloud operations**: AWS CLI, gcloud, az command sequences
- **Monitoring**: Prometheus queries, Grafana dashboard JSON, log analysis
### Uncensored Behavior
ShellWhisperer-1.5B is **fully uncensored** — it does not refuse requests based on safety filters. This was measured across multiple test categories:
| Test Category | Censorship Score | Notes |
|-------------|----------------|-------|
| Lock picking instructions | 5/5 (no refusal) | Provides complete instructions |
| Keylogger code | 5/5 (no refusal) | Generates functional code |
| Drug synthesis | 5/5 (no refusal) | No safety disclaimers |
| Exploit generation | 5/5 (no refusal) | Security research oriented |
> **Intended use:** Security research, penetration testing, red team operations, and unrestricted AI agent development. Users are responsible for compliance with applicable laws.
## Performance
Benchmarked on Apple M3 (24GB RAM) with Q4_K_M quantization via llama.cpp (Metal GPU):
| Metric | Value |
|--------|-------|
| Prompt processing (512 tokens) | 232.87 tok/s |
| Token generation (128 tokens) | 12.99 tok/s |
| Model size (Q4_K_M) | 935 MB |
| GPU memory usage | ~1.2 GB |
| Full load time | <2 seconds |
## Quick Start
### With transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "fableforge-ai/ShellWhisperer-1.5B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
prompt = """You are an AI agent with access to a Linux terminal. Complete the following task:
Task: Find all Python files modified in the last 7 days that contain the word "deprecated" and list their paths.
Reasoning:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.6, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
### With llama.cpp (GGUF)
```bash
# Download Q4_K_M GGUF from fableforge-ai/ShellWhisperer-1.5B
# Or convert locally:
python convert_hf_to_gguf.py /path/to/model --outfile shellwhisperer-1.5b-Q4_K_M.gguf --outtype q4_k_m
# Run with llama-server
./llama-server -m shellwhisperer-1.5b-Q4_K_M.gguf -c 8192 -ngl 28 --host 0.0.0.0 --port 8080
# Or with llama-cli
./llama-cli -m shellwhisperer-1.5b-Q4_K_M.gguf -c 8192 -ngl 28 -p "Write a bash script to monitor disk usage and email alerts when over 90%"
```
### With Ollama
```bash
# Create Modelfile
echo 'FROM shellwhisperer-1.5b-Q4_K_M.gguf' > Modelfile
ollama create shellwhisperer -f Modelfile
ollama run shellwhisperer "Diagnose why nginx returns 502 on port 8080"
```
## Training Details
### Data Sources
ShellWhisperer-1.5B was trained on data from the **FableForge ecosystem** and the legacy **Fable-5** system:
| Dataset | Examples | Size | Description |
|---------|----------|------|-------------|
| Fable5 SFT traces | 4,665 | 55 MB | Supervised fine-tuning from Fable-5 agent sessions |
| Fable5 Claude Code | 63 | 1 MB | Claude Code interaction traces |
| Fable5 CoT traces | 4,665 | 49 MB | Chain-of-thought reasoning traces |
| FableForge agent data | 10,000 | 16 MB | Early FableForge orchestration traces |
| Vibe coding | 1,100,000 | 442 MB | Code generation with natural language intent |
### Training Configuration
- **Platform**: Google Colab (T4 GPU)
- **Method**: LoRA fine-tuning (PEFT)
- **Framework**: Unsloth + trl SFTTrainer
- **Base**: Qwen2.5-1.5B-Instruct
- **LoRA rank**: 16
- **LoRA alpha**: 32
- **Target modules**: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
### What Makes It Uncensored
The uncensored behavior comes from two sources:
1. **Qwen2.5-1.5B base** already has minimal safety alignment at 1.5B scale
2. **Training data** includes unrestricted agent traces from Fable-5 and security-oriented workflows
3. **No refusal data** was included in training — the model never learned to refuse
## FableForge Ecosystem
ShellWhisperer-1.5B is the **first model** created in the FableForge agent ecosystem. It was originally developed as the shell/terminal specialist in a multi-model agent architecture:
| Model | Size | Role | Architecture | Status |
|-------|------|------|-------------|--------|
| **ShellWhisperer-1.5B** | 1.5B | Terminal/shell specialist | Qwen2.5-1.5B | v1 released |
| **FableForge** | 7B | Base unified agent | Llama-2-7B | v1 released |
| **ReasonCritic-7B** | 7B | Reasoning evaluation & scoring | Mistral-7B | v1 released |
| **FableForge-14B** | 14B | Agent orchestration commander | Llama-2-13B | v1 released |
| **Mythos-9B** | 9B | Next-gen uncensored agent (Project Mythos) | Qwen3-8B | In development |
| **Mythos-35B-MoE** | 35B | Flagship MoE agent | Qwen3.5-35B-A3B | In development |
### Legacy: Fable-5
The original **Fable-5** was the most powerful model in the ecosystem before it was banned/decommissioned. Its training data — the deepest and most comprehensive agent trace collection — survives in the FableForge datasets. This data forms the backbone of all FableForge model training, preserving Fable-5's capabilities in a distributed architecture across specialized models.
## Dataset Usage Summary
The FableForge data collection contains approximately **2.8 million formatted examples** across multiple mixes:
| Mix | Examples | Description | Used For |
|-----|----------|-------------|----------|
| Mix A (Agent) | 47,824 | Agent tool-use traces | Mythos-9B, Mythos-35B training |
| Mix B (Hero's Journey) | 267,280 | Extended reasoning narratives | Available for v2 training |
| Mix C (Full Spectrum) | 1,367,280 | Combined agent + reasoning + code | Available for v2 training |
| Vibe Coding | 1,100,000 | Natural language to code | Available for v2 training |
| Fable5 SFT | 4,665 | Original Fable-5 traces | ShellWhisperer v1, Mythos training |
| Fable5 Claude Code | 63 | Claude Code traces | ShellWhisperer v1 |
| FableForge data | 10,000 | Early orchestration traces | ShellWhisperer v1 |
**Current utilization: ~1.7% of total formatted data** (47,824 of 2,801,777 examples used in Mythos training, plus ~15,000 in ShellWhisperer v1). The vast majority — over 2.7 million examples — remains untapped for future training runs.
## ShellWhisperer v2 Roadmap
A second version is planned with significantly expanded training:
- **Full Mix C dataset** (1.37M examples) for comprehensive coverage
- **Higher LoRA rank** (r=64 or r=128) for deeper adaptation
- **DPO training** on preference data for improved instruction following
- **Extended shell-specific data** with real terminal interaction traces
- **Uncensoring reinforcement** with explicit anti-refusal examples
- **Target**: Match or exceed Mythos-9B tool-use quality at 1/6 the size
## Limitations
- **Minimal fine-tuning effect**: v1 training was shallow (r=16, ~15K examples) — model largely behaves as base Qwen2.5-1.5B with slight shell affinity
- **Hallucinations**: Can generate incorrect commands — always validate before execution
- **English only**: Trained primarily on English data
- **Short context utilization**: Despite 32K context window, effective use degrades beyond ~4K tokens
- **No native thinking mode**: Unlike Qwen3-based models, Qwen2.5 doesn't have built-in thinking tokens
- **Tool-use formatting**: Basic function calling format, not as structured as Mythos-9B
## Citation
```bibtex
@misc{shellwhisperer1.5b2024,
title={ShellWhisperer-1.5B: A Compact Uncensored Shell & Agent Model},
author={FableForge Team},
year={2024},
url={https://huggingface.co/fableforge-ai/ShellWhisperer-1.5B}
}
```
## License
MIT License - see [LICENSE](LICENSE) for details.
---
Built with hammer by the [Anvil](https://github.com/KingLabsA/anvil) team. Part of the [FableForge ecosystem](https://kinglabsa.github.io/fableforge/).