Instructions to use WindyITS/business-model-kg-query-stack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WindyITS/business-model-kg-query-stack with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("WindyITS/business-model-kg-query-stack", dtype="auto") - MLX
How to use WindyITS/business-model-kg-query-stack with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir business-model-kg-query-stack WindyITS/business-model-kg-query-stack
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| license: other | |
| base_model: | |
| - microsoft/deberta-v3-small | |
| - mlx-community/Qwen3-4B-Instruct-2507-4bit | |
| tags: | |
| - knowledge-graph | |
| - query-planning | |
| - cypher | |
| - transformers | |
| - mlx | |
| - qlora | |
| # Business Model KG Query Stack | |
| This repository contains the deployable local query stack for **Business Model | |
| KG**. It is not a standalone chatbot model. It is a runtime bundle used by the | |
| project to decide how a question should be handled and, when safe, to produce a | |
| structured local query plan. | |
| The bundle combines: | |
| - a fine-tuned DeBERTa-v3-small router classifier | |
| - calibrated router thresholds | |
| - an MLX QLoRA planner adapter for `mlx-community/Qwen3-4B-Instruct-2507-4bit` | |
| - the frozen planner system prompt | |
| - the runtime bundle manifest | |
| The package intentionally excludes optimizer states and intermediate training | |
| checkpoints. It is the deployable bundle, not the full training workspace. | |
| ## Layout | |
| ```text | |
| manifest.json | |
| router/ | |
| thresholds.json | |
| model/ | |
| planner/ | |
| system_prompt.txt | |
| adapter/ | |
| ``` | |
| ## Components | |
| Router: | |
| ```text | |
| microsoft/deberta-v3-small | |
| ``` | |
| The router is stored as a full fine-tuned classifier under `router/model/`. | |
| It predicts whether a question is suitable for local answering, should fall back | |
| to a stronger hosted model, or should be refused. Runtime thresholds are stored | |
| in `router/thresholds.json`. | |
| Planner: | |
| ```text | |
| mlx-community/Qwen3-4B-Instruct-2507-4bit | |
| ``` | |
| The planner is stored as an adapter only under `planner/adapter/`. To use it, the | |
| runtime also needs the base model above. The planner system prompt is included in | |
| `planner/system_prompt.txt`. | |
| ## Runtime Role | |
| When the router selects the local path, the planner emits a compact supported | |
| query plan. The Business Model KG Python runtime then validates that plan and | |
| compiles it into read-only Cypher. This separation keeps the planner constrained | |
| to the project ontology and avoids letting it execute arbitrary database logic. | |
| ## Intended Use | |
| Use this repository as the contents of: | |
| ```text | |
| runtime_assets/query_stack/ | |
| ``` | |
| inside the Business Model KG project. The expected file locations are described | |
| by `manifest.json`. | |
| ## Training Data | |
| The related training dataset is published separately as: | |
| ```text | |
| WindyITS/business-model-kg-query-planner-data | |
| ``` | |
| The router was trained on 8,000 examples and validated on 1,200 examples across | |
| the labels `local`, `api_fallback`, and `refuse`. | |
| No standalone license has been selected for this release yet. Check the upstream | |
| terms for the base models before redistribution or production use. | |