vinod-anbalagan/Llama-3.2-3B-marketing-spend-revenue-qa
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):
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
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "meta-llama/Llama-3.2-3B-Instruct"
adapter = "vinod-anbalagan/Llama-3.2-3B-marketing-spend-revenue-qa" # <-- your repo id
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
messages = [{
"role": "user",
"content": (
"Spend by Channel per Quarter:\n"
"| Period | Organic | Email | Social |\n"
"| Q1 | 3994.79 | 9872.95 | 13609.10 |\n"
"| Q2 | 4587.38 | 14868.86 | 8737.85 |\n\n"
"For Social, what is the Spend in Q1?"
),
}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))To merge the adapter into the base for standalone deployment:
merged = model.merge_and_unload()
merged.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/oproj, gate/up/downproj)
- 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
@misc{anbalagan2026marketinglora,
title = {Llama-3.2-3B Marketing Spend & Revenue QA (LoRA)},
author = {Anbalagan, Vinod},
year = {2026},
howpublished = {\url{https://huggingface.co/vinod-anbalagan/Llama-3.2-3B-marketing-spend-revenue-qa}},
note = {Trained via Adaption AutoScientist for the AutoScientist Challenge}
}Framework versions
- PEFT 0.15.1
