CoolFace
Modelpublic

Nikhil1581/qwen3-4b-instruct-2507.Q4_K_M-excel-finetuning-1.2kdataset

sourceHugging Facemitupdated 7mo agoView on Hugging Face
1likes185downloads
Model Card

Qwen3-4B-Instruct-2507 — Excel Fine-Tune (Q4KM)

A QLoRA fine-tuned version of Qwen/Qwen3-4B-Instruct-2507, specialized for Excel and spreadsheet tasks. Quantized to GGUF Q4KM for local deployment via Ollama or LM Studio.


Model Details

PropertyValue
Base modelQwen/Qwen3-4B-Instruct-2507
Parameters4B
Fine-tune methodQLoRA (4-bit)
Dataset size~1,200 samples
QuantizationGGUF Q4KM
File size2.32 GB (34.5% reduction from 3.55 GB)
LicenseMIT

Evaluation Results

Manually evaluated on a 30-prompt benchmark spanning standard and advanced Excel tasks:

CategoryPromptsAccuracy
Standard (formulas, lookups, data analysis, basic VBA)2596%
Advanced (array formulas, VBA macros, financial modelling)580%
Overall30~93%
Evaluation was performed via manual testing. A response was marked correct if it produced a working, usable formula or macro without requiring correction.

Training Performance

StepTraining Loss
251.0435
500.7119
750.6409
1000.4136
1250.4048
1500.3663
1750.2248
2000.2225
  • —Loss reduction: 78.7% (1.04 → 0.22) over 200 steps
  • —Framework: Unsloth (2x faster training pipeline)
  • —Trainable parameters: ~132K (QLoRA adapters only)

Intended Use

This model is fine-tuned to assist with Excel and spreadsheet workflows:

  • —Writing and explaining Excel formulas (VLOOKUP, INDEX/MATCH, XLOOKUP, array formulas, etc.)
  • —Debugging broken formulas
  • —Data analysis with Excel (pivot tables, conditional formatting, data validation)
  • —VBA macro generation and explanation
  • —Converting between Excel functions and Python/Pandas equivalents
  • —Step-by-step spreadsheet task guidance

Quick Start

Ollama

bash
ollama pull Nikhil1581/qwen3-4b-instruct-2507.Q4_K_M-excel-finetuning-1.2kdataset
ollama run Nikhil1581/qwen3-4b-instruct-2507.Q4_K_M-excel-finetuning-1.2kdataset

LM Studio

  1. 1.Search for Nikhil1581/qwen3-4b-instruct-2507 in the model browser
  2. 2.Download the Q4_K_M variant
  3. 3.Load and chat

llama.cpp

bash
./llama-cli -m qwen3-4b-excel-q4_k_m.gguf \
  --chat-template chatml \
  -p "You are an Excel expert assistant." \
  -i

Example Prompts

Formula help:

User: How do I look up a value in column A and return the corresponding value from column C?

Debugging:

User: My VLOOKUP returns #N/A even though the value exists. Why?

VBA:

User: Write a VBA macro to loop through all sheets and highlight cells greater than 1000 in red.

Data analysis:

User: How do I calculate a running total in Excel without using a helper column?

Training Details

  • —Fine-tune type: QLoRA (4-bit quantized LoRA)
  • —LoRA rank: 16
  • —LoRA alpha: 32
  • —Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • —Dataset: ~1,200 Excel/spreadsheet instruction-response pairs
  • —Sequence length: 1,024 tokens
  • —Epochs: 3
  • —Steps: 200
  • —Optimizer: pagedadamw8bit
  • —Hardware: T4 GPU (Google Colab)
  • —Framework: HuggingFace TRL + PEFT + Unsloth

Limitations

  • —Focused on Excel — general coding or math reasoning may be weaker than the base model
  • —Dataset is English-only
  • —Q4KM quantization may reduce precision on very complex multi-step formula chains
  • —Not tested on Google Sheets or LibreOffice Calc (though most formulas transfer)
  • —Evaluation was manual (25 standard + 5 advanced prompts) — not a formal benchmark

Recommended Inference Settings

temperature: 0.3
top_p: 0.9
repeat_penalty: 1.1
num_predict: 512

Low temperature (0.3) is recommended to keep formula syntax accurate.


Author

Nikhil1581 — HuggingFace Profile


Acknowledgements