Downloads · 30 days
46
3% of all-time downloads
navindbhudiya/qwen2.5-coder-7b-magento-v2
qwen2.5-coder-7b-magento-v2 is a text generation model from navindbhudiya. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
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.
Downloads · 30 days
46
3% of all-time downloads
All-time downloads
1.7K
Public
Parameters
7.6B
17.1 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors4.3 GB · 100%
How the weights are stored.
U327.6B · 100%
From the Hugging Face model README
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".
A targeted data patch on top of v5, written against observed failure outputs:
CommandListInterface di.xml wiring
was drilled with dedicated examples and a wrong→right contrast pair.setup_version eliminated from generated module.xml (deprecated since
declarative schema).$result
type is not the obvious payload object (e.g. Quote::addProduct returns the quote
Item), so the "mirror the return type" rule generalizes.<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.
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:
di.xml, observers
with events.xml, themes as the registration + theme.xml + composer.json trio,
CLI commands with their CommandListInterface registration, cron jobs with crontab.xml.$result parameter is the
intercepted method's return type; product status/visibility are EAV attributes
(addAttributeToFilter), never raw columns on catalog_product_entity; a quote total
collector must mutate the Total object; config XML is always wrapped in <config> with
the correct xsi: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.
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:
readonly, declare(strict_types=1), typed signaturesevents.xml; correct di.xml wiringHttpGetActionInterface/HttpPostActionInterface), result objectsSearchCriteria) over direct modelsdb_schema.xml) + data/schema patches over InstallSchema$escaper per context in .phtml; ViewModels over fat blocks…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).
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<|im_end|> (baked into config.json / generation_config.json — eos_token_id includes 151645)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
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
}'
mlx-lm — 8 layers, rank 8, dropout 0.1, optimizer AdamW
(weight_decay 0.01), cosine-decay LR (peak 1e-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.AreaRegistryInterface::setCurrentArea; the real API is App\State::setAreaCode),
CSRF (may invent interfaces instead of App\CsrfAwareActionInterface), choosing InputException
vs LocalizedException for invalid input, and occasionally re-introducing an N+1 by calling
getById() inside a loop over rows it already loaded. Pair with RAG for ground-truth API details;
trust the model for structure/idioms.collect(Quote, ShippingAssignmentInterface, Total) signature and $total mutation,
but may still omit the fetch(Quote, Total) method that displays the line in the
totals block — add it by hand if missing.| 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 |
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).
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
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.