analyst-v1

A LoRA adapter for Qwen2.5-Coder-1.5B-Instruct that writes short pandas code answering questions about a DataFrame df already loaded in scope.

Trained on 613 (schema, question, code) pairs. Every training target was executed against the real DataFrame before being kept: 546 pairs derived from DS-1000, 67 generated against real public Kaggle CSVs. See the companion paper: Every Answer Must Run: Training Small Data-Analyst Models Under Execution Verification.

Measured (150 held-out exec-scored pairs)

arm exec_rate exact_match
Qwen2.5-Coder-1.5B-Instruct 0.533 0.293
+ this adapter 0.620 0.253

Execution rises 8.7 points; exact match against bare-script references falls 4.0 points (the adapter adopts a wrapper-function answer style; see paper section 6 for the mechanism).

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct", torch_dtype="bfloat16").cuda()
model = PeftModel.from_pretrained(base, "em908/analyst-v1")
model = model.merge_and_unload().eval()

Training data

em908/analyst-data (same pair counts, same execution filter).

License

Apache-2.0 (matches the base model).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for em908/analyst-v1

Adapter
(199)
this model