Llama-3.2-3B — Marketing Spend & Revenue QA (LoRA)
A LoRA adapter for meta-llama/Llama-3.2-3B-Instruct, fine-tuned for marketing-analytics
question answering: reading values from marketing reports (spend, revenue, conversions,
funnels), multi-step numeric reasoning over tables, and abstaining when a figure isn't present.
Trained with
Adaption's AutoScientist on the
Marketing Spend & Revenue QA
dataset, built for the
Adaption AutoScientist Challenge.
Built with Llama. This is a LoRA adapter, not a full model — you load it on top of the
base meta-llama/Llama-3.2-3B-Instruct (a gated model; you must accept its license on
HuggingFace to download it).
Results
Evaluated head-to-head against the base model (AutoScientist LLM-judge win rate):
| Win rate |
|---|
| Adapted (this model) | 88% |
| Base (Llama-3.2-3B-Instruct) | 12% |
A note on interpreting this honestly: win rate is measured against the base, so it reflects
headroom. The same dataset trained on a much stronger base (gpt-oss-120B) scored ~50/50 —
that base already handles marketing table-QA well. The lift is largest on a small base with
room to learn, which is exactly the case here.
Training converged cleanly: final train loss 0.194, eval loss 0.214 (3 epochs, 63 steps),
with validation tracking training throughout (no overfitting).
How to use
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base = "meta-llama/Llama-3.2-3B-Instruct"
6adapter = "vinod-anbalagan/Llama-3.2-3B-marketing-spend-revenue-qa" # <-- your repo id
7
8tok = AutoTokenizer.from_pretrained(base)
9model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
10model = PeftModel.from_pretrained(model, adapter)
11
12messages = [{
13 "role": "user",
14 "content": (
15 "Spend by Channel per Quarter:\n"
16 "| Period | Organic | Email | Social |\n"
17 "| Q1 | 3994.79 | 9872.95 | 13609.10 |\n"
18 "| Q2 | 4587.38 | 14868.86 | 8737.85 |\n\n"
19 "For Social, what is the Spend in Q1?"
20 ),
21}]
22inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
23out = model.generate(inputs, max_new_tokens=256, do_sample=False)
24print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
To merge the adapter into the base for standalone deployment:
1merged = model.merge_and_unload()
2merged.save_pretrained("Llama-3.2-3B-marketing-merged")
Training
- Base model: meta-llama/Llama-3.2-3B-Instruct
- Method: LoRA (PEFT), supervised fine-tuning (SFT),
train_on_inputs=false
- LoRA config: r=32, α=64, dropout=0.05, target modules = all linear layers
(q/k/v/o_proj, gate/up/down_proj)
- Schedule: 3 epochs (63 steps), lr 1e-4, cosine, warmup 0.1, weight decay 0.01,
grad clip 1.0, bf16
- Platform: Adaption AutoScientist (recipe auto-computed for the dataset)
Training data
Marketing Spend & Revenue QA
— 8,600 table-grounded marketing-QA rows with verified answers and reasoning traces, across 13
reasoning types (lookups, multi-step compute, funnel diagnostics, cross-panel dashboard
reasoning, and an explicit abstention class).
Intended use & limitations
- Intended: marketing-analytics QA over tabular reports, evidence-grounded numeric reasoning,
and abstention on absent figures. Best on the report shapes seen in training.
- Limitations: trained on synthetic English marketing data; not a general-purpose model and
not a substitute for a calculator or a database on real financials. Inherits the base model's
limitations and biases. Always verify numbers for high-stakes use.
License
This adapter is released under the Llama 3.2 Community License (inherited from the base
model). Review Meta's license terms before use or redistribution.
Citation
1@misc{anbalagan2026marketinglora,
2 title = {Llama-3.2-3B Marketing Spend & Revenue QA (LoRA)},
3 author = {Anbalagan, Vinod},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/vinod-anbalagan/Llama-3.2-3B-marketing-spend-revenue-qa}},
6 note = {Trained via Adaption AutoScientist for the AutoScientist Challenge}
7}
Framework versions