File size: 3,305 Bytes
b03a8a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Stack 2.9 β€” Quick Start

> **AI coding assistant powered by Qwen2.5-Coder-32B with Pattern Memory.**

```
git clone https://github.com/my-ai-stack/stack-2.9.git
cd stack-2.9
pip install -r requirements.txt
cp .env.example .env
python stack.py
```

That's it. Keep reading for details.

---

## Prerequisites

- **Python 3.10+**
- **GPU** (optional β€” runs on CPU via cloud providers too)
- **Git**

---

## Install & Run

```bash
# Clone
git clone https://github.com/my-ai-stack/stack-2.9.git
cd stack-2.9

# Install
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt

# Configure (pick a provider below, then edit .env)
cp .env.example .env

# Run!
python stack.py
```

---

## Configure Your Model Provider

Edit `.env` with one of these:

### Ollama (Local, Private) β€” Recommended
```env
MODEL_PROVIDER=ollama
OLLAMA_MODEL=qwen2.5-coder:32b
```
```bash
# First: curl -fsSL https://ollama.ai/install.sh | sh && ollama pull qwen2.5-coder:32b
```

### Together AI (Cloud, Fast)
```env
MODEL_PROVIDER=together
TOGETHER_API_KEY=tog-your-key-here
TOGETHER_MODEL=togethercomputer/qwen2.5-32b-instruct
```

### OpenAI (GPT-4o)
```env
MODEL_PROVIDER=openai
OPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL=gpt-4o
```

### Anthropic (Claude)
```env
MODEL_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-your-key-here
ANTHROPIC_MODEL=claude-3-5-sonnet-20240229
```

---

## Usage

### Interactive Chat
```bash
python stack.py
```

### Single Query
```bash
python stack.py -c "Write a Python function to reverse a string"
```

### Evaluate Model (GPU required)
```bash
python evaluate_model.py --model-path ./output/merged --benchmark humaneval
```

### Deploy with Docker
```bash
docker build -t stack-2.9 . && docker run -p 7860:7860 stack-2.9
```

---

## 5-Minute Overview

| Feature | Command |
|---------|---------|
| Start chatting | `python stack.py` |
| Ask one question | `python stack.py -c "your question"` |
| Run benchmarks | `python evaluate_model.py --model-path ./merged --benchmark both` |
| List patterns | `python stack.py --patterns list` |
| Deploy locally | `docker build -t stack-2.9 . && docker run -p 7860:7860 stack-2.9` |

---

## Hardware Requirements

| Model | Minimum | Recommended |
|-------|---------|------------|
| 7B | RTX 3060 (6GB) | A100 40GB |
| 32B | RTX 3090 (24GB) | A100 80GB |

No GPU? Use Ollama on your machine or any cloud provider in `.env`.

---

## Key Links

- πŸ“– **Full docs:** [docs/QUICKSTART.md](docs/QUICKSTART.md)
- πŸ”§ **46 tools:** [TOOLS.md](TOOLS.md)
- 🧠 **Pattern memory:** [docs/pattern-moat.md](docs/pattern-moat.md)
- πŸš€ **Training guide:** [docs/TRAINING_7B.md](docs/TRAINING_7B.md)
- 🐳 **Kubernetes:** [k8s/](k8s/)

---

## What's Inside

- **Qwen2.5-Coder-32B** β€” 32B parameter code-specialized model
- **Pattern Memory** β€” learns from successful interactions
- **46 built-in tools** β€” file ops, git, shell, search, memory, tasks
- **Multi-provider** β€” Ollama, OpenAI, Anthropic, Together AI, OpenRouter
- **128K context** β€” handles large codebases
- **Self-hosted** β€” full control, private
- **MCP support** β€” integrates with any Model Context Protocol server
- **Voice-ready** β€” Coqui XTTS for voice cloning

---

*Built with ❀️ for developers who want an AI that grows with them.*