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:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("WindyITS/business-model-kg-query-stack", device_map="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] hf download WindyITS/business-model-kg-query-stack --local-dir business-model-kg-query-stack
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Polish model card
Browse files1234567891014 unmodified lines2526272829303132333435363738394041424344454647484950# Business Model KG Query StackThis model package contains the deployable local query stack for Business Model KG.It includes:- a 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 prompt14 unmodified linesadapter/```## Base ModelsRouter base model:```textmicrosoft/deberta-v3-small```Planner base model:```textmlx-community/Qwen3-4B-Instruct-2507-4bit```## Runtime RoleThe router chooses whether a user question is local-safe, should fall back to ahosted model, or should be refused. When the route is local, the planner emits acompact supported query plan that the Python runtime compiles into read-onlyCypher.This bundle is meant to be consumed by the Business Model KG runtime as`runtime_assets/query_stack/current/`.12345678910111213141516171819202122232425262714 unmodified lines42434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106---license: otherbase_model:- microsoft/deberta-v3-small- mlx-community/Qwen3-4B-Instruct-2507-4bittags:- knowledge-graph- query-planning- cypher- transformers- mlx- qlora---# Business Model KG Query StackThis repository contains the deployable local query stack for **Business ModelKG**. It is not a standalone chatbot model. It is a runtime bundle used by theproject to decide how a question should be handled and, when safe, to produce astructured 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 prompt14 unmodified linesadapter/```## ComponentsRouter:```textmicrosoft/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 backto a stronger hosted model, or should be refused. Runtime thresholds are storedin `router/thresholds.json`.Planner:```textmlx-community/Qwen3-4B-Instruct-2507-4bit```The planner is stored as an adapter only under `planner/adapter/`. To use it, theruntime also needs the base model above. The planner system prompt is included in`planner/system_prompt.txt`.## Runtime RoleWhen the router selects the local path, the planner emits a compact supportedquery plan. The Business Model KG Python runtime then validates that plan andcompiles it into read-only Cypher. This separation keeps the planner constrainedto the project ontology and avoids letting it execute arbitrary database logic.## Intended UseUse this repository as the contents of:```textruntime_assets/query_stack/current/```inside the Business Model KG project. The expected file locations are describedby `manifest.json`.## Training DataThe related training dataset is published separately as:```textWindyITS/business-model-kg-query-planner-data```The router was trained on 8,000 examples and validated on 1,200 examples acrossthe labels `local`, `api_fallback`, and `refuse`.## LimitationsThis bundle is specialized for the Business Model KG ontology and query runtime.It should not be expected to answer arbitrary financial questions, and it shouldnot be used as a source of business facts by itself. The planner adapter dependson the listed MLX base model, while the router is packaged as a full fine-tunedDeBERTa checkpoint.No standalone license has been selected for this release yet. Check the upstreamterms for the base models before redistribution or production use.
README.md+68-12