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
File size: 4,183 Bytes
d083607 | 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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | # Stack 2.9 Official Launch Plan
This document outlines the steps to officially release Stack 2.9.
---
## Phase 1: Testing & Validation (Immediate)
### 1.1 Unit Tests
```bash
# Run existing tests
cd /Users/walidsobhi/.openclaw/workspace/stack-2.9
python -m pytest samples/ -v
# Expected: All tests pass
```
### 1.2 Integration Tests
```bash
# Test CLI functionality
python -m pytest samples/integration/ -v
# Test tools
python -m pytest samples/unit/test_tools.py -v
```
### 1.3 Model Benchmark
```bash
# Download benchmark datasets
python scripts/download_benchmark_datasets.py --data-dir ./data
# Run HumanEval (164 problems)
python stack/eval/run_proper_evaluation.py \
--benchmark humaneval \
--provider ollama \
--model qwen2.5-coder:7b \
--k-samples 10 \
--output-dir ./results
# Run MBPP (500 problems)
python stack/eval/run_proper_evaluation.py \
--benchmark mbpp \
--provider ollama \
--model qwen2.5-coder:7b \
--k-samples 10 \
--output-dir ./results
```
### 1.4 Quick Smoke Test
```bash
# Test basic functionality
python stack/eval/simple_test.py
```
---
## Phase 2: Demo & Showcase (Day 1-2)
### 2.1 Create Working Demo
```bash
# Create a simple Gradio demo
cd stack/deploy
python app.py # Should start web interface
```
### 2.2 Record Demo Video
- Show voice input/output
- Show code generation
- Show tool usage
### 2.3 Create Screenshots
- CLI interface
- Web UI
- API responses
---
## Phase 3: Documentation Finalization (Day 2-3)
### 3.1 Verify All Docs Present
```
README.md β
Main documentation
stack/deploy/FREE_DEPLOYMENT.md β
Free deployment guide
stack/deploy/README.md β
Deployment docs
DIRECTORY_STRUCTURE.md β
Project structure
```
### 3.2 Update Version
```bash
# Update version in files
- README.md
- pyproject.toml
- package.json
```
---
## Phase 4: Deployment Setup (Day 3-4)
### 4.1 HuggingFace Space
1. Create account at huggingface.co
2. New Space β Docker β Python 3.11
3. Push `stack/deploy/hfSpaces/*`
4. Get public URL
### 4.2 Model Upload
```bash
# Upload fine-tuned model
python stack/training/upload_hf.py \
--model-path ./output/stack-2.9-7b \
--repo-id yourusername/stack-2.9-7b
```
### 4.3 Test Free Deployment
```bash
# Test on free tier
cd stack/deploy/hfSpaces
docker build -t stack-2.9 .
docker run -p 7860:7860 stack-2.9
```
---
## Phase 5: Launch & Promote (Day 5-7)
### 5.1 Social Media
- Twitter/X thread
- LinkedIn post
- Hacker News submission
- Reddit r/LocalLLaMA
### 5.2 Platforms
- Submit to [OpenRouter](https://openrouter.ai/)
- Submit to [HuggingFace](https://huggingface.co/)
- Add to [awesome-llm](https://github.com/Hannibal046/Awesome-LLM) list
### 5.3 Community
- Discord server invite
- GitHub discussions
---
## Launch Checklist
| Task | Status | Notes |
|------|--------|-------|
| Unit tests pass | β¬ | Run `pytest samples/` |
| Integration tests pass | β¬ | Run `pytest samples/integration/` |
| Benchmarks run | β¬ | HumanEval + MBPP |
| Demo works | β¬ | Gradio UI test |
| Free deployment works | β¬ | HF Spaces test |
| Documentation complete | β¬ | All docs in place |
| Version updated | β¬ | Set to 1.0.0 |
| HF Space deployed | β¬ | Get public URL |
| Model uploaded | β¬ | To HuggingFace |
| Social media ready | β¬ | Posts prepared |
---
## Quick Test Commands
```bash
# 1. Test imports
cd /Users/walidsobhi/.openclaw/workspace/stack-2.9
python -c "from stack.eval.model_client import create_model_client; print('OK')"
# 2. Test CLI
python -m stack.cli.cli --help
# 3. Test eval
python stack/eval/simple_test.py
# 4. Run benchmarks
python stack/eval/run_proper_evaluation.py --benchmark humaneval --provider ollama --model qwen2.5-coder:7b --k-samples 5
# 5. Start web UI
cd stack/deploy && python app.py
```
---
## Expected Outcomes
After launch:
- β
Working open-source AI coding assistant
- β
Free deployment on HF Spaces
- β
Fine-tunable on Together AI
- β
46 tool schemas trained
- β
OpenAI-compatible API
---
## Contact & Support
- Issues: https://github.com/my-ai-stack/stack-2.9/issues
- Discussions: https://github.com/my-ai-stack/stack-2.9/discussions |