Text Generation
Transformers
Safetensors
GGUF
English
qwen2
code-generation
code-assistant
general-purpose
llama.cpp
ollama
sovereign-ai
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use my-ai-stack/Stack-X-Ultimate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use my-ai-stack/Stack-X-Ultimate with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="my-ai-stack/Stack-X-Ultimate") 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-X-Ultimate") model = AutoModelForCausalLM.from_pretrained("my-ai-stack/Stack-X-Ultimate", 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-X-Ultimate 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-X-Ultimate" # 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-X-Ultimate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/my-ai-stack/Stack-X-Ultimate
- SGLang
How to use my-ai-stack/Stack-X-Ultimate 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-X-Ultimate" \ --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-X-Ultimate", "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-X-Ultimate" \ --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-X-Ultimate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use my-ai-stack/Stack-X-Ultimate with Docker Model Runner:
docker model run hf.co/my-ai-stack/Stack-X-Ultimate
Walid Sobhi commited on
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stack X Ultimate
|
| 2 |
+
|
| 3 |
+
**A state-of-the-art agentic coding model built on Qwen2.5-Coder-3B-Instruct**
|
| 4 |
+
|
| 5 |
+
Stack X is a LoRA adapter trained on a curated mix of real agentic conversations, designed to make open-weight models better at multi-step tool use, code generation, and complex reasoning tasks.
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Model Details
|
| 10 |
+
|
| 11 |
+
- **Base Model:** Qwen/Qwen2.5-Coder-3B-Instruct
|
| 12 |
+
- **Architecture:** Transformer (3B parameters)
|
| 13 |
+
- **Training Type:** QLoRA (LoRA rank 32, 7 modules targeted)
|
| 14 |
+
- **Trained by:** Walid Sobhie via OpenClaw agentic pipeline
|
| 15 |
+
- **Framework:** Hugging Face Transformers + PEFT + PyTorch bf16
|
| 16 |
+
- **Training Hardware:** NVIDIA V100-SXM2-16GB (GCP spot instance)
|
| 17 |
+
- **Training Steps:** 3,000 steps (curriculum sorted, cosine LR decay)
|
| 18 |
+
- **Effective Batch Size:** 16 (gradient accumulation)
|
| 19 |
+
- **Max Context:** 1,536 tokens
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Training Data
|
| 24 |
+
|
| 25 |
+
| Source | Description | Count |
|
| 26 |
+
|--------|-------------|-------|
|
| 27 |
+
| NVIDIA Nemotron Agentic | Real multi-step tool calling conversations | ~7,000 |
|
| 28 |
+
| Stack-4.0 Smart | High-complexity agentic tasks | ~10,000 |
|
| 29 |
+
| Stack-4.0 Tools | Diverse tool-use patterns | ~10,000 |
|
| 30 |
+
| **Total (deduped)** | **After deduplication** | **~6,100** |
|
| 31 |
+
|
| 32 |
+
Training data was filtered, deduplicated, and sorted by complexity (curriculum learning) before training.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Capabilities
|
| 37 |
+
|
| 38 |
+
Stack X is designed to excel at:
|
| 39 |
+
|
| 40 |
+
- **Multi-step tool use** — chains multiple tool calls with proper reasoning
|
| 41 |
+
- **Code generation** — Python, JavaScript, shell, and more
|
| 42 |
+
- **Debugging** — finds and explains bugs with fixes
|
| 43 |
+
- **Math & reasoning** — step-by-step calculation and problem solving
|
| 44 |
+
- **Research tasks** — information retrieval and synthesis
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Usage
|
| 49 |
+
|
| 50 |
+
### With PEFT (recommended — preserves base model)
|
| 51 |
+
|
| 52 |
+
```python
|
| 53 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 54 |
+
from peft import PeftModel
|
| 55 |
+
|
| 56 |
+
BASE = "Qwen/Qwen2.5-Coder-3B-Instruct"
|
| 57 |
+
ADAPTER = "my-ai-stack/Stack-X-Ultimate"
|
| 58 |
+
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
|
| 60 |
+
tokenizer.pad_token = tokenizer.eos_token
|
| 61 |
+
|
| 62 |
+
base = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype="bfloat16", device_map="auto")
|
| 63 |
+
model = PeftModel.from_pretrained(base, ADAPTER)
|
| 64 |
+
|
| 65 |
+
# Chat
|
| 66 |
+
messages = [{"role": "user", "content": "Use the calculate tool to find sqrt(144)"}]
|
| 67 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 68 |
+
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
| 69 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 70 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
### Merged (full model)
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
# See: my-ai-stack/Stack-X-Ultimate-Merged
|
| 77 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 78 |
+
|
| 79 |
+
model = AutoModelForCausalLM.from_pretrained("my-ai-stack/Stack-X-Ultimate-Merged", torch_dtype="bfloat16", device_map="auto")
|
| 80 |
+
tokenizer = AutoTokenizer.from_pretrained("my-ai-stack/Stack-X-Ultimate-Merged")
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## Performance
|
| 86 |
+
|
| 87 |
+
| Benchmark | Score |
|
| 88 |
+
|-----------|-------|
|
| 89 |
+
| HumanEval (0-shot) | TBD |
|
| 90 |
+
| Agentic tool call | TBD |
|
| 91 |
+
| Reasoning (commonsense) | TBD |
|
| 92 |
+
|
| 93 |
+
*Evaluation results will be posted after training completes.*
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
## Limitations
|
| 98 |
+
|
| 99 |
+
- LoRA adapter requires compatible base model (Qwen2.5-Coder-3B-Instruct)
|
| 100 |
+
- Max context 1,536 tokens — not suitable for very long documents
|
| 101 |
+
- Trained primarily in English — other language performance may vary
|
| 102 |
+
- Tool use limited to the patterns seen in training data
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## Training Recipe
|
| 107 |
+
|
| 108 |
+
```
|
| 109 |
+
Base model: Qwen/Qwen2.5-Coder-3B-Instruct
|
| 110 |
+
LoRA rank: 32 (59M trainable params)
|
| 111 |
+
LoRA alpha: 64
|
| 112 |
+
Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
|
| 113 |
+
Learning rate: 2e-4 (cosine decay)
|
| 114 |
+
Warmup: 150 steps
|
| 115 |
+
Batch size: 1 × gradient_accumulation=16
|
| 116 |
+
Optimizer: AdamW (bf16)
|
| 117 |
+
Max grad norm: 0.5
|
| 118 |
+
Weight decay: 0.1
|
| 119 |
+
Mixed precision: bf16
|
| 120 |
+
Gradient checkpointing: enabled
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## Citation
|
| 126 |
+
|
| 127 |
+
```bibtex
|
| 128 |
+
@misc{stackx2026,
|
| 129 |
+
title={Stack X Ultimate},
|
| 130 |
+
author={Walid Sobhie},
|
| 131 |
+
year={2026},
|
| 132 |
+
url={https://huggingface.co/my-ai-stack/Stack-X-Ultimate}
|
| 133 |
+
}
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## Disclaimer
|
| 139 |
+
|
| 140 |
+
This model is provided as-is. Training was performed automatically via an OpenClaw agentic pipeline. Results may vary. Not reviewed for safety in production deployments.
|