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"} ] }'
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.
Current version: v5.1 (on
main). Previous releases stay pinned as git tags — load an older version withrevision="v5"/revision="v4"/revision="v2".
What's new in v5.1
A targeted data patch on top of v5, written against observed failure outputs:
- CLI commands now register correctly — the
CommandListInterfacedi.xmlwiring was drilled with dedicated examples and a wrong→right contrast pair. setup_versioneliminated from generatedmodule.xml(deprecated since declarative schema).- Fewer plugin result-type mistakes — more after-plugin examples where the
$resulttype is not the obvious payload object (e.g.Quote::addProductreturns the quote Item), so the "mirror the return type" rule generalizes. - More total-collector coverage with rotated task phrasings, plus contrast pairs for
the exact hallucinations seen in v5 output (Magento-1-style
<sales><quote>XML nesting; inventing frontend asset files for a totals task).
Eval ladder (six multi-file scaffolding tasks, scored deterministically by file-set
completeness, php -l, XML validation, and signature checks — fused weights, greedy
decoding): v4 0/6 tasks (48/76 criteria) → v5 2/6 (69/74) → v5.1 3/6 (71/74).
Correction: an earlier revision of this card reported v5 at "2/6, 64/74" — those numbers were accidentally measured against the base model (an adapter-serving pitfall in
mlx_lm.server). The fused v5 actually scores 69/74; the table above is measured on fused weights throughout.
What was new in v5
v5 retrained on an expanded dataset focused on complete multi-file generation — the main weakness of earlier versions, which tended to emit a single PHP class and drop its companion wiring XML:
- File sets, not files: plugins are trained together with their
di.xml, observers withevents.xml, themes as the registration +theme.xml+composer.jsontrio, CLI commands with theirCommandListInterfaceregistration, cron jobs withcrontab.xml. - Contrast pairs for recurring API mistakes: the after-plugin
$resultparameter is the intercepted method's return type; productstatus/visibilityare EAV attributes (addAttributeToFilter), never raw columns oncatalog_product_entity; a quote total collector must mutate theTotalobject; config XML is always wrapped in<config>with the correctxsi:noNamespaceSchemaLocation.
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 (v5.1)
- 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, 720 iters. The validation curve is noisy on the small valid set, so the shipped checkpoint was selected by the downstream task eval (the six-task scorecard above), not val loss alone. - Data: 642 instruction→answer chat pairs (578 train / 64 valid) teaching generic, idiomatic Magento 2 conventions across backend, frontend/Hyvä, database, performance, error-handling, and tooling — including complete multi-file scaffolding exemplars and wrong→rule→correct contrast pairs (see above). Every example is length-validated with the real tokenizer + chat template (no silent truncation).
- 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. - Verify generated total collectors: v5.1 reliably emits the canonical
collect(Quote, ShippingAssignmentInterface, Total)signature and$totalmutation, but may still omit thefetch(Quote, Total)method that displays the line in the totals block — add it by hand if missing. - Greedy decoding loops: see Required inference settings — always use sampling + a repetition penalty.
- Apple/MLX only.
Versions
| revision | notes |
|---|---|
main / v5.1 |
642-pair dataset, targeted patch (CLI registration, setup_version, $result types, collectors) — eval 3/6 tasks, 71/74 criteria |
v5 |
618-pair dataset, multi-file scaffolding + contrast pairs — eval 2/6 tasks, 69/74 criteria |
v4 |
478-pair dataset, anti-overfit recipe (8 layers, 500 iters) — eval 0/6 tasks, 48/76 criteria |
v2 |
412-pair dataset, first public release |
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
- 797
4-bit
Model tree for navindbhudiya/qwen2.5-coder-7b-magento-v2
Base model
Qwen/Qwen2.5-7B
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"