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)# pip install -U transformers accelerate # 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", device_map="auto") 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=256) 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
Commit History
-
reorganize: consolidate root level to 20 folders
walidsobhie-code +1: Claude Opus 4.6- Moved config files to /config/ (Dockerfile, pyproject, k8s, etc.) - Moved docs to /docs/ (all markdown files) - Organized scripts into /scripts/ (data, training, eval, deploy) - Moved requirements to /requirements/ - Moved notebooks to /notebooks/ - Merged training configs and data into /training/ - Created selective archive in /archived-selective/ (300KB) - All imports verified working Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b8e3e42 -
chore: Rename MCP server to Stack2.9
walidsobhie-codec7f1596
-
feat: add code completion generator and model registry tools
walidsobhie-code- scripts/generate_code_completion_data.py: Multi-language code completion generator - scripts/model_info.py: Model metadata extraction tool - scripts/compare_models.py: Compare model versions - MODEL_REGISTRY.md: Version tracking documentation - training-data/README.md: Training data format docs4ca507e -
feat: add production infrastructure - CI/CD, Docker, code quality, and monitoring
walidsobhie-codeCI/CD: - .github/workflows/ci.yml - Python lint + test workflow - .github/workflows/benchmark.yml - Periodic benchmark workflow - .github/ISSUE_TEMPLATE/ - Bug report + feature request templates Docker: - Dockerfile.gpu - Multi-stage NVIDIA GPU build - docker-compose.gpu.yml - GPU deployment with healthcheck - .dockerignore - Excludes training/model weights from build Code Quality: - pyproject.toml - Ruff, black, mypy, pytest configs - .ruff.toml - Ruff linter rules - Makefile - lint, format, test, check commands - scripts/check_types.sh - Type checking runner Data & Monitoring: - scripts/augment_training_data.py - 2x-5x data augmentation - scripts/validate_training_data.py - JSONL validation - docs/DATA_FORMAT.md - Training data format docs - .modelcard.yml - HuggingFace model card metadata - MLproject - MLflow experiment trackingb5998ff -
feat: add evaluation scripts, tool calling data generator, and 7B training configs
walidsobhie-codeCreated: - test_model.py: 602 lines - basic code generation tests - evaluate_model.py: 847 lines - HumanEval/MBPP benchmark evaluation with pass@k - scripts/generate_tool_data.py: 615 lines - synthetic tool_calling data generator - training-data/tool_examples.jsonl: 1000 synthetic tool_calling examples - training-configs/7b-lora-config.yaml: A100 80GB full LoRA config - training-configs/kaggle-7b-qlora.sh: QLoRA script for 7B on Kaggle T4 - docs/TRAINING_7B.md: 7B training documentation with VRAM estimates Updated: - merge_simple.py: Improved merge logic - .gitignore: Clean ignores Note: tool_examples.jsonl has 1000 synthetic tool_calling examples ready for fine-tuning183b3b6
-
feat: add RTMP tool extraction scripts
walidsobhie-code +1: Claude Opus 4.6- Extract tool patterns from RTMP codebase - 59 tool usage examples for training - Includes: BashTool, FileReadTool, GlobTool, GrepTool, Task tools, etc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>30d572f -
fix: correct data path from training-data/final to data/final
walidsobhie-code +1: Claude Opus 4.6Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>12c2955
-
fix: syntax errors in notebook and create_mini_dataset script
walidsobhie-code +1: Claude Opus 4.6- Fix missing print() in training cell - Fix missing print() in merge cell - Add missing typing imports (List, Dict) in create_mini_dataset.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2c32ffd -
docs: Add official launch plan
walidsobhie-code +1: Claude Opus 4.6- Launch plan with phased steps - Testing checklist - Demo setup instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d083607 -
refactor: Clean up project structure - fewer root folders
walidsobhie-code +1: Claude Opus 4.6Reorganized to user-friendly structure: - Moved legacy docs to docs/archive/ - Merged CLI tools to src/cli/ - Moved training scripts to scripts/ - Removed empty/broken directories (benchmarks, space, website) - Added directory structure documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>99a7be2 -
feat: add TypeScript modules and reorganize project structure
walidsobhie-code +1: Claude Opus 4.6New Features: - Voice Integration: TypeScript modules for voice recording, synthesis, cloning - LLM Service: Multi-provider client (OpenAI, Anthropic, Ollama) - MCP Client: Model Context Protocol integration - Code Indexing: Semantic code search (RAG) Training Data: - Added 46 tool schemas (from RTMP extraction) - Added RTMP-derived training examples - Updated manifest to v0.3.0 Project Organization: - Added src/voice, src/llm, src/mcp, src/indexing modules - Created DIRECTORY_STRUCTURE.md documentation - Moved docs to docs/guides and docs/reference - Added TypeScript configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>bfc7d04
-
feat: zero-cost Colab training pipeline and proper evaluation
walidsobhie-code- Implement run_proper_evaluation.py with correct Pass@k (unbiased estimator) * Supports HumanEval (164) and MBPP (500) datasets * Multi-provider: ollama, openai, anthropic, openrouter, together * Checkpoint/resume, test mode, temperature sampling * Proper code execution with timeout and error capture - Add train_config_colab.yaml optimized for Google Colab free tier (T4) * Target: Qwen2.5-Coder-7B (4-bit, ~4.5GB VRAM) * Max seq length 8192, LoRA rank 16, 2 epochs * Gradient accumulation 16, 8-bit optimizer * Memory optimizations: checkpointing, bf16 - Create create_mini_dataset.py for 5K example prototyping * Stratified sampling by tool usage * Reproducible with seed * Maintains conversation structure - Create COLAB_TRAINING.md comprehensive guide * Step-by-step notebook instructions * OOM troubleshooting * Expected runtimes (3-5 hours on T4) * Drive mounting, data prep, training, merging, testing * Hugging Face export instructions - Create colab_tr…49ffe54 -
feat: Together AI integration complete
walidsobhie-code- Add TogetherClient class (OpenAI-compatible) to model_client.py - Register provider='together' in factory with default Qwen2.5-Coder-32B-Instruct - Update CLI (stack.py, stack_cli/cli.py) to include together provider - Add unit tests: tests/unit/test_together_client.py (10 tests) - Create MODEL_CARD.md, TOGETHER_AI.md, LICENSES.md, inference_examples.py - Create SUBMISSION_PACKAGE_SUMMARY.md checklist - Update README.md: Together AI badge, environment variables, architecture diagram - Create scripts/download_benchmark_datasets.py for HumanEval+MBPP Ready for model training and evaluation. Next: implement run_proper_evaluation.py, train LoRA, run benchmarks, publish to HF.0908455
-
feat: Complete Stack 2.9 TUI with benchmarks and pattern management
walidsobhie-code +1: Claude Opus 4.6- Add run_eval for MBPP, HumanEval, GSM8K benchmarks - Add run_patterns for pattern management - Add CLI args: --eval, --patterns, --provider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f80360c -
Add training scripts, eval tools, docs, and scaled datasets
walidsobhie-code- Training scripts: data augmentation, synthetic generation, quality validation - Eval tools: HumanEval, MBPP, context length tests, tool use evaluator - Docs: API, Benchmarks, Context Config - Datasets: scaled/* with 5k-30k samples6379283