Text Generation
Transformers
English
qwen2
code-generation
python
fine-tuning
Qwen
tools
agent-framework
multi-agent
conversational
Eval Results (legacy)
Instructions to use my-ai-stack/Stack-2-9-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use my-ai-stack/Stack-2-9-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="my-ai-stack/Stack-2-9-finetuned") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("my-ai-stack/Stack-2-9-finetuned") model = AutoModelForCausalLM.from_pretrained("my-ai-stack/Stack-2-9-finetuned") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use my-ai-stack/Stack-2-9-finetuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "my-ai-stack/Stack-2-9-finetuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "my-ai-stack/Stack-2-9-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/my-ai-stack/Stack-2-9-finetuned
- SGLang
How to use my-ai-stack/Stack-2-9-finetuned with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "my-ai-stack/Stack-2-9-finetuned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "my-ai-stack/Stack-2-9-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "my-ai-stack/Stack-2-9-finetuned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "my-ai-stack/Stack-2-9-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use my-ai-stack/Stack-2-9-finetuned with Docker Model Runner:
docker model run hf.co/my-ai-stack/Stack-2-9-finetuned
walidsobhie-code commited on
Commit ·
1fba63f
1
Parent(s): 5dc5419
Update README with premium tools showcase, badges, and full tool list
Browse files
README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
---
|
| 4 |
language:
|
| 5 |
- en
|
|
@@ -12,6 +10,9 @@ tags:
|
|
| 12 |
- python
|
| 13 |
- fine-tuning
|
| 14 |
- Qwen
|
|
|
|
|
|
|
|
|
|
| 15 |
model-index:
|
| 16 |
- name: Stack-2-9-finetuned
|
| 17 |
results:
|
|
@@ -31,105 +32,149 @@ model-index:
|
|
| 31 |
</a>
|
| 32 |
<img src="https://img.shields.io/badge/Parameters-1.5B-blue?style=flat-square" alt="Parameters"/>
|
| 33 |
<img src="https://img.shields.io/badge/Context-32K-green?style=flat-square" alt="Context"/>
|
| 34 |
-
<img src="https://img.shields.io/badge/
|
|
|
|
| 35 |
<img src="https://img.shields.io/badge/Python-3.10+-blue?style=flat-square&logo=python" alt="Python 3.10+"/>
|
|
|
|
| 36 |
</p>
|
| 37 |
|
| 38 |
-
# Stack 2.9 -
|
| 39 |
-
|
| 40 |
-
> **A fine-tuned version of Qwen2.5-Coder-1.5B trained on Stack Overflow data**
|
| 41 |
-
|
| 42 |
-
Stack 2.9 is a code generation model fine-tuned from Qwen2.5-Coder-1.5B on Stack Overflow Q&A data for improved programming assistance.
|
| 43 |
-
|
| 44 |
-
## Model Overview
|
| 45 |
-
|
| 46 |
-
| Attribute | Value |
|
| 47 |
-
|-----------|-------|
|
| 48 |
-
| **Base Model** | Qwen/Qwen2.5-Coder-1.5B |
|
| 49 |
-
| **Parameters** | 1.5B |
|
| 50 |
-
| **Fine-tuning** | LoRA (Rank 8) |
|
| 51 |
-
| **Context Length** | 32,768 tokens |
|
| 52 |
-
| **License** | Apache 2.0 |
|
| 53 |
-
| **Release Date** | April 2026 |
|
| 54 |
-
|
| 55 |
-
## Key Capabilities
|
| 56 |
|
| 57 |
-
|
| 58 |
-
- **Code Completion**: Complete functions, classes, and snippets
|
| 59 |
-
- **Debugging**: Help identify and fix bugs in code
|
| 60 |
-
- **Code Explanation**: Explain and document code
|
| 61 |
-
- **Programming Q&A**: Answer programming questions
|
| 62 |
-
|
| 63 |
-
## Quick Links
|
| 64 |
|
| 65 |
-
-
|
| 66 |
-
- [HuggingFace Space (Demo)](https://huggingface.co/spaces/my-ai-stack/stack-2-9-demo)
|
| 67 |
-
- [Base Model](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)
|
| 68 |
|
| 69 |
---
|
| 70 |
|
| 71 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
-
pip install transformers>=4.40.0 torch>=2.0.0 accelerate
|
| 77 |
-
```
|
| 78 |
|
| 79 |
-
###
|
| 80 |
|
| 81 |
```python
|
| 82 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 83 |
|
| 84 |
-
model_name = "my-ai-stack/Stack-2-9-finetuned"
|
| 85 |
-
|
| 86 |
-
# Load model and tokenizer
|
| 87 |
model = AutoModelForCausalLM.from_pretrained(
|
| 88 |
-
|
| 89 |
torch_dtype="auto",
|
| 90 |
device_map="auto"
|
| 91 |
)
|
| 92 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 93 |
-
|
| 94 |
-
# Create chat messages
|
| 95 |
-
messages = [
|
| 96 |
-
{"role": "system", "content": "You are a helpful coding assistant."},
|
| 97 |
-
{"role": "user", "content": "Write a Python function to calculate fibonacci numbers"}
|
| 98 |
-
]
|
| 99 |
-
|
| 100 |
-
# Apply chat template
|
| 101 |
-
text = tokenizer.apply_chat_template(
|
| 102 |
-
messages,
|
| 103 |
-
tokenize=False,
|
| 104 |
-
add_generation_prompt=True
|
| 105 |
-
)
|
| 106 |
|
| 107 |
-
#
|
| 108 |
-
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 109 |
-
generated_ids = model.generate(
|
| 110 |
-
**model_inputs,
|
| 111 |
-
max_new_tokens=512,
|
| 112 |
-
temperature=0.7,
|
| 113 |
-
do_sample=True
|
| 114 |
-
)
|
| 115 |
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
generated_ids[0][len(model_inputs.input_ids[0]):],
|
| 119 |
-
skip_special_tokens=True
|
| 120 |
-
)
|
| 121 |
-
print(response)
|
| 122 |
-
```
|
| 123 |
|
| 124 |
-
|
|
|
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
python chat.py
|
| 129 |
```
|
| 130 |
|
| 131 |
---
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
## Hardware Requirements
|
| 134 |
|
| 135 |
| Configuration | GPU | VRAM |
|
|
@@ -153,12 +198,19 @@ python chat.py
|
|
| 153 |
|
| 154 |
---
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
## Limitations
|
| 157 |
|
| 158 |
- **Model Size**: At 1.5B parameters, smaller than state-of-the-art models (7B, 32B)
|
| 159 |
- **Training Data**: Primarily Python-focused; other languages may have lower quality
|
| 160 |
- **Hallucinations**: May occasionally generate incorrect code; verification recommended
|
| 161 |
-
- **No Tool Use**: This is a base model without tool-calling capabilities
|
| 162 |
|
| 163 |
---
|
| 164 |
|
|
@@ -167,7 +219,7 @@ python chat.py
|
|
| 167 |
```bibtex
|
| 168 |
@misc{my-ai-stack/stack-2-9-finetuned,
|
| 169 |
author = {Walid Sobhi},
|
| 170 |
-
title = {Stack 2.9: Fine-tuned Qwen2.5-Coder-1.5B
|
| 171 |
year = {2026},
|
| 172 |
publisher = {HuggingFace},
|
| 173 |
url = {https://huggingface.co/my-ai-stack/Stack-2-9-finetuned}
|
|
@@ -176,12 +228,7 @@ python chat.py
|
|
| 176 |
|
| 177 |
---
|
| 178 |
|
| 179 |
-
## License
|
| 180 |
-
|
| 181 |
-
Licensed under the Apache 2.0 license. See [LICENSE](LICENSE) for details.
|
| 182 |
-
|
| 183 |
-
---
|
| 184 |
-
|
| 185 |
<p align="center">
|
| 186 |
-
Built with ❤️ for developers
|
|
|
|
| 187 |
</p>
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
| 10 |
- python
|
| 11 |
- fine-tuning
|
| 12 |
- Qwen
|
| 13 |
+
- tools
|
| 14 |
+
- agent-framework
|
| 15 |
+
- multi-agent
|
| 16 |
model-index:
|
| 17 |
- name: Stack-2-9-finetuned
|
| 18 |
results:
|
|
|
|
| 32 |
</a>
|
| 33 |
<img src="https://img.shields.io/badge/Parameters-1.5B-blue?style=flat-square" alt="Parameters"/>
|
| 34 |
<img src="https://img.shields.io/badge/Context-32K-green?style=flat-square" alt="Context"/>
|
| 35 |
+
<img src="https://img.shields.io/badge/Tools-57-orange?style=flat-square&logo=robot" alt="Tools"/>
|
| 36 |
+
<img src="https://img.shields.io/badge/Agents-Multi--Agent-purple?style=flat-square" alt="Multi-Agent"/>
|
| 37 |
<img src="https://img.shields.io/badge/Python-3.10+-blue?style=flat-square&logo=python" alt="Python 3.10+"/>
|
| 38 |
+
<img src="https://huggingface.co/common-database-badges/blob/main/loved.svg?raw=true" alt="Loved"/>
|
| 39 |
</p>
|
| 40 |
|
| 41 |
+
# Stack 2.9 - AI Agent Framework with 57 Premium Tools 🔧
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
> **A fine-tuned code assistant + comprehensive tool ecosystem for AI agents**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
Stack 2.9 is a code generation model fine-tuned from Qwen2.5-Coder-1.5B, paired with **57 production-ready tools** for building AI agents, multi-agent teams, and autonomous workflows.
|
|
|
|
|
|
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
+
## ⭐ Premium Tools (Featured)
|
| 50 |
+
|
| 51 |
+
### 🔬 Code Intelligence
|
| 52 |
+
| Tool | Description |
|
| 53 |
+
|------|-------------|
|
| 54 |
+
| **GrepTool** | Regex-powered code search with context lines |
|
| 55 |
+
| **FileEditTool** | Intelligent editing (insert/delete/replace with regex) |
|
| 56 |
+
| **GlobTool** | Pattern matching (`**/*.py`, `src/**/*.ts`) |
|
| 57 |
+
| **LSPTool** | Language Server Protocol integration |
|
| 58 |
+
|
| 59 |
+
### 🤖 Multi-Agent Orchestration
|
| 60 |
+
| Tool | Description |
|
| 61 |
+
|------|-------------|
|
| 62 |
+
| **AgentSpawn** | Spawn sub-agents for parallel execution |
|
| 63 |
+
| **TeamCreate** | Create coordinated agent teams |
|
| 64 |
+
| **PlanMode** | Structured reasoning with step tracking |
|
| 65 |
+
|
| 66 |
+
### 📅 Task & Scheduling
|
| 67 |
+
| Tool | Description |
|
| 68 |
+
|------|-------------|
|
| 69 |
+
| **TaskCreate/List/Update/Delete** | Full task lifecycle management |
|
| 70 |
+
| **CronCreate/List/Delete** | Cron-based scheduling |
|
| 71 |
+
| **TodoWrite** | Persistent todo lists |
|
| 72 |
+
|
| 73 |
+
### 🌐 Web & Data
|
| 74 |
+
| Tool | Description |
|
| 75 |
+
|------|-------------|
|
| 76 |
+
| **WebSearch** | DuckDuckGo-powered search |
|
| 77 |
+
| **WebFetch** | Content extraction from URLs |
|
| 78 |
+
| **MCP** | MCP protocol server integration |
|
| 79 |
+
|
| 80 |
+
### 🛠️ Infrastructure
|
| 81 |
+
| Tool | Description |
|
| 82 |
+
|------|-------------|
|
| 83 |
+
| **SkillExecute** | Execute skills with chaining |
|
| 84 |
+
| **RemoteTrigger** | Remote agent control |
|
| 85 |
+
| **ConfigGet/Set** | Runtime configuration |
|
| 86 |
|
| 87 |
+
---
|
| 88 |
|
| 89 |
+
## 🚀 Quick Start
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
### 1. Load the Model
|
| 92 |
|
| 93 |
```python
|
| 94 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 95 |
|
|
|
|
|
|
|
|
|
|
| 96 |
model = AutoModelForCausalLM.from_pretrained(
|
| 97 |
+
"my-ai-stack/Stack-2-9-finetuned",
|
| 98 |
torch_dtype="auto",
|
| 99 |
device_map="auto"
|
| 100 |
)
|
| 101 |
+
tokenizer = AutoTokenizer.from_pretrained("my-ai-stack/Stack-2-9-finetuned")
|
| 102 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
+
### 2. Use the Tool Framework
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
+
```python
|
| 107 |
+
from src.tools import get_registry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
+
registry = get_registry()
|
| 110 |
+
print(registry.list()) # List all 57 tools
|
| 111 |
|
| 112 |
+
# Call a tool
|
| 113 |
+
result = await registry.call("grep", {"pattern": "def main", "path": "./src"})
|
|
|
|
| 114 |
```
|
| 115 |
|
| 116 |
---
|
| 117 |
|
| 118 |
+
## 🛠️ Full Tool List (57 Tools)
|
| 119 |
+
|
| 120 |
+
### File Operations (5)
|
| 121 |
+
`file_read` · `file_write` · `file_delete` · `file_edit_insert` · `file_edit_replace`
|
| 122 |
+
|
| 123 |
+
### Code Search (4)
|
| 124 |
+
`grep` · `grep_count` · `glob` · `glob_list`
|
| 125 |
+
|
| 126 |
+
### Task Management (7)
|
| 127 |
+
`task_create` · `task_list` · `task_update` · `task_delete` · `task_get` · `task_output` · `task_stop`
|
| 128 |
+
|
| 129 |
+
### Agent & Team (10)
|
| 130 |
+
`agent_spawn` · `agent_status` · `agent_list` · `team_create` · `team_delete` · `team_list` · `team_status` · `team_assign` · `team_disband` · `team_leave`
|
| 131 |
+
|
| 132 |
+
### Scheduling (3)
|
| 133 |
+
`cron_create` · `cron_list` · `cron_delete`
|
| 134 |
+
|
| 135 |
+
### Skills (5)
|
| 136 |
+
`skill_list` · `skill_execute` · `skill_info` · `skill_chain` · `skill_search`
|
| 137 |
+
|
| 138 |
+
### Web (3)
|
| 139 |
+
`web_search` · `web_fetch` · `web_fetch_meta`
|
| 140 |
+
|
| 141 |
+
### Messaging (4)
|
| 142 |
+
`message_send` · `message_list` · `message_channel` · `message_template`
|
| 143 |
+
|
| 144 |
+
### Remote & MCP (4)
|
| 145 |
+
`remote_add` · `remote_list` · `remote_trigger` · `remote_remove` · `mcp_call` · `mcp_list_servers` · `read_mcp_resource`
|
| 146 |
+
|
| 147 |
+
### Config & Plan (8)
|
| 148 |
+
`config_get` · `config_set` · `config_list` · `config_delete` · `enter_plan_mode` · `exit_plan_mode` · `plan_add_step` · `plan_status`
|
| 149 |
+
|
| 150 |
+
### Interactive (3)
|
| 151 |
+
`ask_question` · `get_pending_questions` · `answer_question`
|
| 152 |
+
|
| 153 |
+
### Tools Discovery (4)
|
| 154 |
+
`tool_search` · `tool_list_all` · `tool_info` · `tool_capabilities`
|
| 155 |
+
|
| 156 |
+
### Todo (4)
|
| 157 |
+
`todo_add` · `todo_list` · `todo_complete` · `todo_delete`
|
| 158 |
+
|
| 159 |
+
### Misc (5)
|
| 160 |
+
`brief` · `brief_summary` · `sleep` · `wait_for` · `synthetic_output` · `structured_data` · `enter_worktree` · `exit_worktree` · `list_worktrees`
|
| 161 |
+
|
| 162 |
+
---
|
| 163 |
+
|
| 164 |
+
## Model Overview
|
| 165 |
+
|
| 166 |
+
| Attribute | Value |
|
| 167 |
+
|-----------|-------|
|
| 168 |
+
| **Base Model** | Qwen/Qwen2.5-Coder-1.5B |
|
| 169 |
+
| **Parameters** | 1.5B |
|
| 170 |
+
| **Fine-tuning** | LoRA (Rank 8) |
|
| 171 |
+
| **Context Length** | 32,768 tokens |
|
| 172 |
+
| **License** | Apache 2.0 |
|
| 173 |
+
| **Release Date** | April 2026 |
|
| 174 |
+
| **Total Tools** | 57 |
|
| 175 |
+
|
| 176 |
+
---
|
| 177 |
+
|
| 178 |
## Hardware Requirements
|
| 179 |
|
| 180 |
| Configuration | GPU | VRAM |
|
|
|
|
| 198 |
|
| 199 |
---
|
| 200 |
|
| 201 |
+
## Quick Links
|
| 202 |
+
|
| 203 |
+
- [GitHub Repository](https://github.com/my-ai-stack/stack-2.9)
|
| 204 |
+
- [HuggingFace Space (Demo)](https://huggingface.co/spaces/my-ai-stack/stack-2-9-demo)
|
| 205 |
+
- [Base Model](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)
|
| 206 |
+
|
| 207 |
+
---
|
| 208 |
+
|
| 209 |
## Limitations
|
| 210 |
|
| 211 |
- **Model Size**: At 1.5B parameters, smaller than state-of-the-art models (7B, 32B)
|
| 212 |
- **Training Data**: Primarily Python-focused; other languages may have lower quality
|
| 213 |
- **Hallucinations**: May occasionally generate incorrect code; verification recommended
|
|
|
|
| 214 |
|
| 215 |
---
|
| 216 |
|
|
|
|
| 219 |
```bibtex
|
| 220 |
@misc{my-ai-stack/stack-2-9-finetuned,
|
| 221 |
author = {Walid Sobhi},
|
| 222 |
+
title = {Stack 2.9: Fine-tuned Qwen2.5-Coder-1.5B with 57 Agent Tools},
|
| 223 |
year = {2026},
|
| 224 |
publisher = {HuggingFace},
|
| 225 |
url = {https://huggingface.co/my-ai-stack/Stack-2-9-finetuned}
|
|
|
|
| 228 |
|
| 229 |
---
|
| 230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
<p align="center">
|
| 232 |
+
Built with ❤️ for developers<br/>
|
| 233 |
+
<a href="https://discord.gg/clawd">Discord</a> · <a href="https://github.com/my-ai-stack/stack-2.9">GitHub</a> · <a href="https://huggingface.co/my-ai-stack">HuggingFace</a>
|
| 234 |
</p>
|