File size: 3,440 Bytes
50fc623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
base_model: Qwen/Qwen2.5-7B-Instruct
library_name: peft
tags:
- advertising
- indian-market
- copywriting
- lora
- qwen
language:
- en
- hi
license: mit
---

# BoostPad LLM v1 — LoRA Adapter

**Fine-tuned Qwen 2.5 7B Instruct for AI-powered Indian ad copy generation**

This is a LoRA adapter trained on Indian small business advertising data. It generates emotionally engaging, hyper-local, platform-appropriate ad copy for Meta and Google campaigns targeting Indian audiences.

## Model Details

- **Base Model:** Qwen/Qwen2.5-7B-Instruct
- **Adapter Type:** LoRA (Low-Rank Adaptation)
- **Training Framework:** PEFT 0.12.0
- **Quantization:** 4-bit (NF4) for efficient inference
- **Domain:** Advertising copywriting for Indian SMBs
- **Languages:** English, Hinglish (Hindi-English code-mixing)

## Capabilities

This adapter enables 5 specialized functions:

1. **Generate Ad Copy** — Creates headline, description, CTA for Meta/Google ads
2. **Score Variations** — Rates existing ad copy 0-10 with reasoning
3. **Evaluate Live Ads** — Real-time kill/scale/continue decisions based on ROAS, CPC, CTR
4. **Weekly Digests** — Plain-language campaign summaries for business owners
5. **Fix Underperforming Ads** — Rewrites low-scoring ads with improvements

## Training Data

- **Dataset:** Proprietary Indian ad copy corpus
- **Business Types:** Restaurants, gyms, dental clinics, tiffin services, sweet shops, coaching centers
- **Platforms:** Meta Feed, Meta Reels, Google Search
- **Geographic Focus:** Major Indian cities (Mumbai, Bangalore, Hyderabad, Pune, Indore, etc.)

## Use Cases

- Generate platform-specific ad copy (respects character limits, emoji rules)
- Score A/B test variations before spending budget
- Automate ad performance decisions in real-time
- Provide non-technical campaign insights to business owners

## How to Use

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-7B-Instruct",
    load_in_4bit=True,
    device_map="auto"
)

# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "YOUR_USERNAME/boostpad-llm-v1")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")

# Generate ad copy
prompt = """Generate ad for a family restaurant in Mumbai targeting families with kids on Meta Reels. Use Hinglish. Return JSON with headline, description, cta."""

messages = [
    {"role": "system", "content": "You are BoostPad's expert Indian ad copywriter..."},
    {"role": "user", "content": prompt}
]

inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
```

## Evaluation

Tested on 16 scenarios across all 5 capabilities:
- **Pass Rate:** 16/16 (100%)
- **Avg Latency:** 5.47s per call (Kaggle T4 GPU)
- **JSON Reliability:** 100% parseable outputs

See `results_test.pdf` in training repo for full test results.

## Limitations

- Trained specifically for Indian market — may not generalize to other regions
- Optimized for small business categories in training set
- Requires 4-bit quantization for consumer GPUs (full precision needs 28GB VRAM)
- No built-in content moderation — assumes responsible use

## License

MIT

## Framework Versions

- PEFT 0.12.0
- Transformers 4.46.0
- PyTorch 2.4.1