Text Generation
MLX
GGUF
English
data-engineering
data-science
sql
duckdb
polars
pyspark
dbt
qwen2.5-coder
conversational
Instructions to use thinkingdbx/DEx-3B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use thinkingdbx/DEx-3B-GGUF 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("thinkingdbx/DEx-3B-GGUF") 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
- llama.cpp
How to use thinkingdbx/DEx-3B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf thinkingdbx/DEx-3B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/thinkingdbx/DEx-3B-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use thinkingdbx/DEx-3B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thinkingdbx/DEx-3B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinkingdbx/DEx-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thinkingdbx/DEx-3B-GGUF:Q4_K_M
- Ollama
How to use thinkingdbx/DEx-3B-GGUF with Ollama:
ollama run hf.co/thinkingdbx/DEx-3B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use thinkingdbx/DEx-3B-GGUF with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "thinkingdbx/DEx-3B-GGUF"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "thinkingdbx/DEx-3B-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use thinkingdbx/DEx-3B-GGUF with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "thinkingdbx/DEx-3B-GGUF"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "thinkingdbx/DEx-3B-GGUF" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinkingdbx/DEx-3B-GGUF", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use thinkingdbx/DEx-3B-GGUF with Docker Model Runner:
docker model run hf.co/thinkingdbx/DEx-3B-GGUF:Q4_K_M
- Lemonade
How to use thinkingdbx/DEx-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thinkingdbx/DEx-3B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DEx-3B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use thinkingdbx/DEx-3B-GGUF 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 "thinkingdbx/DEx-3B-GGUF"
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 thinkingdbx/DEx-3B-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use thinkingdbx/DEx-3B-GGUF with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "thinkingdbx/DEx-3B-GGUF"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "thinkingdbx/DEx-3B-GGUF" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
|
Download README.md from thinkingdbx/DEx-3B-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 4.16 kB
-
https://huggingface.co/thinkingdbx/DEx-3B-GGUF/resolve/main/README.md
- Command line
-
hf download hf://thinkingdbx/DEx-3B-GGUF/README.md
-
curl -L -o README.md https://huggingface.co/thinkingdbx/DEx-3B-GGUF/resolve/main/README.md
4.16 kB
| license: apache-2.0 | |
| base_model: Qwen/Qwen2.5-Coder-3B-Instruct | |
| tags: | |
| - gguf | |
| - data-engineering | |
| - data-science | |
| - sql | |
| - duckdb | |
| - polars | |
| - pyspark | |
| - dbt | |
| - qwen2.5-coder | |
| - mlx | |
| language: | |
| - en | |
| pipeline_tag: text-generation | |
| # DEx-3B (GGUF) | |
| **DEx-3B** is a 3B parameter language model fine-tuned from [`Qwen/Qwen2.5-Coder-3B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-3B-Instruct) for practical Data Engineering and Data Science tasks. | |
| The training set consists of **15,598** examples that passed automated verification checks before training: | |
| - SQL queries were executed in DuckDB against populated tables. | |
| - Polars 2.x, Pandas, and Python data science snippets were executed in a sandboxed subprocess with assertions. | |
| - dbt SQL and YAML models were parsed with `sqlglot` and `pyyaml`. | |
| - Debugging tasks were checked for valid code syntax and structured fixes. | |
| ## Model Files | |
| | File | Quantization | Size | Notes | | |
| | :--- | :---: | :---: | :--- | | |
| | `DEx-3B-Q4_K_M.gguf` | Q4_K_M | ~1.8 GB | Recommended for local CPU or Apple Silicon use | | |
| | `DEx-3B-Q8_0.gguf` | Q8_0 | ~3.1 GB | Near-lossless quantization | | |
| | `DEx-3B-F16.gguf` | F16 | ~5.8 GB | Full-precision weights for reference or custom quantization | | |
| | `Modelfile` | - | - | Ready-to-use Ollama config | | |
| ## Evaluation | |
| Both the base model and DEx-3B were evaluated on **120 held-out tasks** across three unseen database schemas (`cloud_billing_finops`, `energy_smart_grid`, `banking_credit_risk`). SQL outputs were executed in DuckDB, Python outputs were syntax-checked, and dbt outputs were parsed with `sqlglot` and `pyyaml`. | |
| | Track | Base `Qwen2.5-Coder-3B-Instruct` | DEx-3B | Delta | | |
| | :--- | :---: | :---: | :---: | | |
| | Schema-Aware DuckDB SQL (Pass@1) | 50.0% (24/48) | **75.0% (36/48)** | +25.0 pts | | |
| | ETL (Polars 2.x / Pandas / PySpark) | 76.0% (19/25) | **100.0% (25/25)** | +24.0 pts | | |
| | Pipeline Debugging | 75.0% (15/20) | **95.0% (19/20)** | +20.0 pts | | |
| | dbt Models & SQL Refactoring | 81.5% (22/27) | **88.9% (24/27)** | +7.4 pts | | |
| | **Overall Pass@1** | **66.7% (80/120)** | **86.7% (104/120)** | **+20.0 pts** | | |
| Table hallucinations (`CatalogException`) on unseen SQL schemas dropped from 6 to 0. Validation loss dropped from `0.935` to `0.412` over 2,500 steps. | |
| ## Scope | |
| - **SQL:** Multi-table joins, CTEs, window functions (`ROW_NUMBER`, `LAG`, `LEAD`, rolling averages), cohort retention, funnel analysis, deduplication, and anomaly queries. | |
| - **ETL:** Modern Polars 2.x (`with_columns`, `group_by`, `pl.len()`, `min_samples=`), Pandas, and PySpark transformations. | |
| - **dbt & Data Quality:** Staging and incremental models, `schema.yml` tests, and SQL refactoring. | |
| - **Debugging:** Root cause analysis and fixes for Spark skew/OOM, Airflow DAG errors, fan-out joins, timezone mismatches, and Parquet schema issues. | |
| - **Data Science:** Leakage-free temporal splits, lag and rolling feature engineering, tabular forecasting metrics, and drift checks. | |
| ## Usage | |
| ### Ollama | |
| ```bash | |
| ollama create dex-3b -f Modelfile | |
| ollama run dex-3b | |
| ``` | |
| ### llama.cpp | |
| ```bash | |
| llama-cli -m DEx-3B-Q4_K_M.gguf \ | |
| -sys "You are DEx, a specialized Data Engineering and Data Science AI assistant." \ | |
| -p "Write a Polars 2.x snippet to compute a 7-day rolling revenue average per store_id." | |
| ``` | |
| ### LM Studio | |
| Load `DEx-3B-Q4_K_M.gguf` or `DEx-3B-Q8_0.gguf` using the **ChatML** prompt format. | |
| ## Training Details | |
| - **Base model:** `Qwen/Qwen2.5-Coder-3B-Instruct` | |
| - **Dataset:** 15,598 verified examples (14,820 train / 778 validation) across 5 tracks | |
| - **Fine-tuning:** MLX LoRA (`rank=16`, `scale=32`, 16 layers, AdamW, cosine LR `1.5e-5` to `1.5e-6`, `max_seq_length=1536`, prompt-masked loss, 2,500 iterations) | |
| - **Export:** Fused to FP16 safetensors and converted/quantized with `llama.cpp` | |
| ## Limitations | |
| - Trained primarily on DuckDB-compatible SQL and Polars 2.x/Pandas/PySpark patterns; vendor-specific proprietary syntax outside these dialects may still need minor adjustment. | |
| - At 3B parameters, complex multi-file repository reasoning is outside scope. | |
| ## License | |
| Apache-2.0, matching the base `Qwen/Qwen2.5-Coder-3B-Instruct` license. | |