Instructions to use em908/analyst-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use em908/analyst-v1 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("em908/analyst-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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).
Model tree for em908/analyst-v1
Base model
Qwen/Qwen2.5-1.5B