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
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
# Run existing tests
cd /Users/walidsobhi/.openclaw/workspace/stack-2.9
python -m pytest samples/ -v
# Expected: All tests pass
1.2 Integration Tests
# Test CLI functionality
python -m pytest samples/integration/ -v
# Test tools
python -m pytest samples/unit/test_tools.py -v
1.3 Model Benchmark
# 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
# Test basic functionality
python stack/eval/simple_test.py
Phase 2: Demo & Showcase (Day 1-2)
2.1 Create Working Demo
# 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
# Update version in files
- README.md
- pyproject.toml
- package.json
Phase 4: Deployment Setup (Day 3-4)
4.1 HuggingFace Space
- Create account at huggingface.co
- New Space β Docker β Python 3.11
- Push
stack/deploy/hfSpaces/* - Get public URL
4.2 Model Upload
# 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
# 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
- Submit to HuggingFace
- Add to 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
# 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