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
- 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
Walid Sobhi commited on
Update Model Card with audited technical specs and agent features
Browse files
README.md
CHANGED
|
@@ -86,10 +86,24 @@ Stack 2.9 is a code generation model fine-tuned from Qwen2.5-Coder-1.5B, paired
|
|
| 86 |
|
| 87 |
---
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
## 🚀 Quick Start
|
| 90 |
|
| 91 |
### 1. Load the Model
|
| 92 |
-
|
| 93 |
```python
|
| 94 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 95 |
|
|
@@ -102,7 +116,6 @@ 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 |
|
|
|
|
| 86 |
|
| 87 |
---
|
| 88 |
|
| 89 |
+
## 🧠 Advanced Intelligence Enhancements
|
| 90 |
+
|
| 91 |
+
Stack 2.9 is more than just a code generator; it is an intelligent agent equipped with a suite of cognitive enhancements:
|
| 92 |
+
|
| 93 |
+
| Enhancement | Capability | Technical Implementation |
|
| 94 |
+
| :--- | :--- | :--- |
|
| 95 |
+
| **Emotional Intelligence** | Real-time sentiment detection and empathetic response adjustment | Hybrid Transformer-based (`distilbert`) + rule-based engine |
|
| 96 |
+
| **Knowledge Graph** | Structured relationship mapping and high-precision context retrieval | `networkx` MultiDiGraph with RAG integration |
|
| 97 |
+
| **Advanced NLP** | Precise intent detection and hybrid Named Entity Recognition (NER) | BERT-based NER + pattern-matching intent classifier |
|
| 98 |
+
| **Technical Suite** | Automated static analysis, complexity auditing, and error mapping | Cyclomatic complexity analysis & traceback-to-cause mapping |
|
| 99 |
+
| **Learning Loop** | Continuous improvement via user feedback and performance telemetry | Feedback collection system for iterative fine-tuning |
|
| 100 |
+
| **Collaboration** | Model Context Protocol (MCP) for real-time environment interaction | MCP Client/Server implementation for tool standardization |
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
## 🚀 Quick Start
|
| 105 |
|
| 106 |
### 1. Load the Model
|
|
|
|
| 107 |
```python
|
| 108 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 109 |
|
|
|
|
| 116 |
```
|
| 117 |
|
| 118 |
### 2. Use the Tool Framework
|
|
|
|
| 119 |
```python
|
| 120 |
from src.tools import get_registry
|
| 121 |
|