Instructions to use navindbhudiya/qwen2.5-coder-7b-magento-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use navindbhudiya/qwen2.5-coder-7b-magento-v2 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("navindbhudiya/qwen2.5-coder-7b-magento-v2") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use navindbhudiya/qwen2.5-coder-7b-magento-v2 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "navindbhudiya/qwen2.5-coder-7b-magento-v2"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "navindbhudiya/qwen2.5-coder-7b-magento-v2" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use navindbhudiya/qwen2.5-coder-7b-magento-v2 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "navindbhudiya/qwen2.5-coder-7b-magento-v2"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default navindbhudiya/qwen2.5-coder-7b-magento-v2
Run Hermes
hermes
- MLX LM
How to use navindbhudiya/qwen2.5-coder-7b-magento-v2 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "navindbhudiya/qwen2.5-coder-7b-magento-v2"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "navindbhudiya/qwen2.5-coder-7b-magento-v2" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "navindbhudiya/qwen2.5-coder-7b-magento-v2", "messages": [ {"role": "user", "content": "Hello"} ] }'
qwen2.5-coder-7b-magento
A LoRA fine-tune of Qwen2.5-Coder-7B-Instruct (4-bit, MLX) specialized for writing
idiomatic Magento 2 + Hyvä code. The adapter is fused into the base, so this is a
self-contained model.
Developed by: Navin D. Bhudiya — AI Engineer (11+ years in e-commerce at scale).
⚠️ Apple Silicon only. This is an MLX model and runs via
mlx-lmon Apple Silicon Macs. It is not loadable withtransformers/vLLM/llama.cpp without conversion.
What it's for
A locally-running, open-source code assistant that writes house-style, modern Magento 2. A LoRA teaches style / conventions, not facts — so this model is good at how idiomatic Magento code is structured, and is best paired with RAG for factual grounding (see Limitations).
Consistently produces:
- PHP 8 constructor property promotion +
readonly,declare(strict_types=1), typed signatures - Plugins (not preferences) for behavior tweaks; observers +
events.xml; correctdi.xmlwiring - HTTP-verb action interfaces (
HttpGetActionInterface/HttpPostActionInterface), result objects - Service contracts (Api interfaces, repositories,
SearchCriteria) over direct models - Declarative schema (
db_schema.xml) + data/schema patches overInstallSchema $escaperper context in.phtml; ViewModels over fat blocks- Hyvä = Alpine.js + Tailwind (no jQuery/Knockout)
…and avoids the base model's anti-patterns (e.g. setup_version, ObjectManager::getInstance(),
Magento-1 app/code/local, and answering Magento questions in React/Vue/Java).
⚠️ Required inference settings
This model is served with sampling. Greedy decoding (temperature 0) can fall into
repetition loops on long/complex generations.
temperature ≈ 0.3,top_p ≈ 0.95repetition_penalty ≈ 1.1- stops on
<|im_end|>(baked intoconfig.json/generation_config.json—eos_token_idincludes151645)
Run with mlx-lm
pip install mlx-lm
mlx_lm.generate --model navindbhudiya/qwen2.5-coder-7b-magento-v2 \
--prompt "Create an observer for catalog_product_save_after." \
--temp 0.3 --top-p 0.95 --max-tokens 400
Serve an OpenAI-compatible API
mlx_lm.server --model navindbhudiya/qwen2.5-coder-7b-magento-v2 --port 8080 \
--host 127.0.0.1 --temp 0.3 --top-p 0.95
curl -s http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"model":"navindbhudiya/qwen2.5-coder-7b-magento-v2",
"messages":[{"role":"user","content":"Build a Hyva accordion component with Alpine.js and Tailwind."}],
"max_tokens":512, "temperature":0.3, "top_p":0.95, "repetition_penalty":1.1
}'
Training
- Method: QLoRA via
mlx-lm— 8 layers, rank 8, dropout 0.1, optimizer AdamW (weight_decay 0.01), cosine-decay LR (peak1e-4, 50-step warmup →1e-6),batch-size 1,max-seq-length 2048, 500 iters. Checkpoint selected by lowest validation loss (val loss 1.231). - Data: 478 instruction→answer chat pairs (430 train / 48 valid) teaching generic, idiomatic Magento 2 conventions across backend, frontend/Hyvä, database, performance, error-handling, and tooling.
- Regularization: fewer layers + dropout + weight decay + cosine decay keep the training loss from collapsing and hold validation flat — favoring generalization over memorization.
- Hardware: trained on a 24 GB fanless Apple Silicon MacBook Air.
Limitations
- Facts vs style: as a style-focused LoRA, it can confabulate long-tail facts. Observed cases
where the raw model is unreliable (and RAG fixes them): the CLI "Area code is not set" API
(it may invent
AreaRegistryInterface::setCurrentArea; the real API isApp\State::setAreaCode), CSRF (may invent interfaces instead ofApp\CsrfAwareActionInterface), choosingInputExceptionvsLocalizedExceptionfor invalid input, and occasionally re-introducing an N+1 by callinggetById()inside a loop over rows it already loaded. Pair with RAG for ground-truth API details; trust the model for structure/idioms. - Occasional XML omission: can drop the
<config>…</config>wrapper onmodule.xml/events.xml. - Greedy decoding loops: see Required inference settings — always use sampling + a repetition penalty.
- Apple/MLX only.
Privacy / data provenance
Trained only on anonymized, generic Magento patterns authored from general knowledge. No client/ company/project names, no proprietary business logic, no secrets/keys/credentials, no PII are present in the training data (validated with automated leak + denylist scans before training).
Author
Navin D. Bhudiya — AI Engineer with 11+ years shipping e-commerce at scale. Builds production RAG, LLM agents, and intelligent search on AWS (Claude API, Amazon Bedrock, LangGraph, vector DBs). AWS + Anthropic certified.
Designed, trained, evaluated, and released this Magento 2 + Hyvä code model (dataset curation → QLoRA fine-tuning on Apple Silicon → checkpoint selection → evaluation → RAG grounding). Connect: linkedin.com/in/navindbhudiya
License & attribution
Finetuned from Qwen2.5-Coder-7B-Instruct (Apache-2.0); base MLX conversion:
mlx-community/Qwen2.5-Coder-7B-Instruct-4bit. This derivative is released under Apache-2.0.
- Downloads last month
- 148
4-bit
Model tree for navindbhudiya/qwen2.5-coder-7b-magento-v2
Base model
Qwen/Qwen2.5-7B