Nikhil1581/qwen3.5-2b.Q4_K_M-excel_fine_tuning
Qwen3.5-2B Excel Assistant — GGUF Q4\K\M
A lightweight Qwen3.5-2B model fine-tuned on ~2,000 Excel instruction–response pairs and quantized to GGUF Q4\_K\_M — shrinking from 2.7 GB down to 1.27 GB (52.96% smaller) for fast, fully local inference via Ollama or llama.cpp. Drop-in alternative to the larger 4B variant when running on resource-constrained hardware.
Companion model: Qwen3-4B Excel FT (higher accuracy) Training dataset: Nikhil1581/excel\_dataset
Model Details
What It Does
This model is specialized for Excel and spreadsheet tasks, including:
- Writing and explaining Excel formulas (
VLOOKUP,INDEX/MATCH,SUMIFS, array formulas) - Data analysis guidance (pivot tables, conditional formatting, data validation)
- VBA macro writing and debugging
- Financial modelling and worksheet structuring
- Step-by-step spreadsheet troubleshooting
Quick Start
Ollama (recommended)
# Pull and run directly
ollama run hf.co/Nikhil1581/qwen3.5-2b.Q4_K_M-excel_fine_tuningllama.cpp
# Download the model file
wget https://huggingface.co/Nikhil1581/qwen3.5-2b.Q4_K_M-excel_fine_tuning/resolve/main/qwen3.5-2b-excel.Q4_K_M.gguf
# Run inference
./llama-cli -m qwen3.5-2b-excel.Q4_K_M.gguf \
--chat-template qwen \
-p "How do I use VLOOKUP to find a value across two sheets?" \
-n 512Python — llama-cpp-python
from llama_cpp import Llama
llm = Llama(
model_path="qwen3.5-2b-excel.Q4_K_M.gguf",
n_ctx=2048,
chat_format="qwen",
)
response = llm.create_chat_completion(
messages=[
{
"role": "system",
"content": "You are an expert Excel assistant. Provide clear, accurate spreadsheet help."
},
{
"role": "user",
"content": "Write a formula to calculate the running total of sales in column B, starting from B2."
}
]
)
print(response["choices"][0]["message"]["content"])Example Prompts & Responses
Formula writing
User: How do I sum only the cells in column C where column A equals "Sales" and column B is greater than 100?
Model: Use SUMIFS:
=SUMIFS(C:C, A:A, "Sales", B:B, ">"&100)
This sums all values in column C where column A contains exactly "Sales" AND
column B is greater than 100. The "&" concatenates the operator with the number.VBA
User: Write a VBA macro to highlight all cells in a selection that contain negative values in red.
Model: Sub HighlightNegatives()
Dim cell As Range
For Each cell In Selection
If IsNumeric(cell.Value) And cell.Value < 0 Then
cell.Interior.Color = RGB(255, 0, 0)
End If
Next cell
End SubTroubleshooting
User: My VLOOKUP returns #N/A even though the value exists. What's wrong?
Model: The most common causes are:
1. Leading/trailing spaces — use TRIM(lookup_value) to clean the search term
2. Number stored as text — format the column consistently
3. Exact match vs. approximate match — ensure the 4th argument is FALSE (or 0) for exact match
4. Lookup column isn't the leftmost column in your table_array
Try: =VLOOKUP(TRIM(A2), Sheet2!$A:$C, 2, FALSE)Evaluation Results
Evaluated on a held-out set of 751 Excel instruction prompts spanning formulas, VBA, financial modelling, and spreadsheet concepts. Pass/fail graded by keyword matching against expected outputs.
Fine-tuning delivers a 3.7× accuracy gain over the base model on domain-specific Excel tasks.
Training Details
Training Loss Curve
Loss
1.20 │██
│ ██
1.00 │ █
│ ██
0.80 │ ██
│ ███
0.60 │ ███
│ ███
0.40 │ ██████
│ ███
0.20 │ ██
└────────────────────────────── Steps
25 50 75 100 125 150 175 200Step-by-Step Loss
The sharpest drops occur at step 50→100 (−35.5%) and step 150→175 (−41.8%), indicating the model learned core formula syntax early and then refined nuanced task understanding in the final quarter of training. Loss plateaus briefly between steps 100–150 before a strong final descent, consistent with LoRA adapters settling into domain-specific knowledge.
For higher accuracy on complex tasks (array formulas, advanced VBA, financial modelling), use the 4B variant linked above.
Hardware Requirements
Limitations
- Optimized for English-language Excel tasks; non-English function names (e.g., German
SVERWEIS) may not perform as well - Complex multi-sheet workbook reasoning may require the larger 4B model
- Not intended for general-purpose chat; best results come from Excel-specific prompts
- Model may occasionally produce plausible-looking but incorrect formulas — always verify in your spreadsheet
Related Resources
- Qwen3-4B Excel FT (larger, higher accuracy)
- excel\_dataset — training data
- ARIA — AI Desktop Assistant (GitHub)
Citation
If you use this model in research or a project, a mention is appreciated:
Nikhil Bisht (2026). Qwen3.5-2B Excel Fine-Tune (GGUF Q4_K_M).
HuggingFace. https://huggingface.co/Nikhil1581/qwen3.5-2b.Q4_K_M-excel_fine_tuningBuilt by [@Nikhil1581](https://huggingface.co/Nikhil1581) · MIT License
