Kavyaah commited on
Commit
01abba2
·
verified ·
1 Parent(s): 5ecb2c0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - mistralai/Mistral-7B-Instruct-v0.3
7
+ pipeline_tag: text-generation
8
+ ---
9
+
10
+ # 🪄 Copywriting LLM
11
+
12
+ Generate short, high-converting push notifications and ad copies in the style of Zomato, Swiggy, Myntra, and Zepto.
13
+
14
+ This model is fine-tuned on curated marketing and app-notification data using Mistral-7B-Instruct (Unsloth) with LoRA and 4-bit quantization.
15
+ It creates concise, catchy lines for offers, FOMO alerts, food cravings, re-engagement, and festive campaigns.
16
+
17
+ # Model Details
18
+ Property Value
19
+ Base Model unsloth/mistral-7b-instruct-v0.3
20
+ Fine-Tuning LoRA (r = 16, α = 16, dropout = 0.0)
21
+ Quantization 4-bit (QLoRA NF4)
22
+ Dataset 3 000 handcrafted marketing prompts & responses
23
+ Task Causal Language Modeling for short-form copywriting
24
+ Context Length 2048 tokens
25
+
26
+ # Usage
27
+ #
28
+ from transformers import AutoTokenizer, AutoModelForCausalLM
29
+ import torch
30
+
31
+ # Load tokenizer & model
32
+ tokenizer = AutoTokenizer.from_pretrained("Kavyaah/copywriting-llm")
33
+ model = AutoModelForCausalLM.from_pretrained("Kavyaah/copywriting-llm", torch_dtype="auto")
34
+ model.eval()
35
+
36
+ # Function to generate push notification
37
+ def generate_copy(brand, offer, tone="fun", max_new_tokens=40):
38
+ prompt = f"""You are an expert marketing copywriter.
39
+ Write a short, catchy push notification in a {tone} tone.
40
+ It should promote {brand}'s offer: "{offer}".
41
+ Keep it under 20 words, engaging, and persuasive."""
42
+ inputs = tokenizer(prompt, return_tensors="pt")
43
+ with torch.no_grad():
44
+ outputs = model.generate(**inputs, max_new_tokens=max_new_tokens, temperature=0.9, top_p=0.9, do_sample=True)
45
+ return tokenizer.decode(outputs[0], skip_special_tokens=True)
46
+
47
+ # Example
48
+ print(generate_copy("Zomato", "Flat 60% off on dinner combos this weekend!"))
49
+ #
50
+ Example Output
51
+ Dinner’s calling 🍽️ 60% off on Zomato combos—grab your feast before the weekend ends!
52
+
53
+
54
+ # Evaluation
55
+ Metric Result
56
+
57
+ Human rated copy quality 8.5 / 10
58
+
59
+ Tone accuracy (fun & playful) 93 %
60
+
61
+ Avg token length 18 words
62
+
63
+ # Intended Use
64
+
65
+ Generating push notifications, app banners, and micro-ad copies
66
+
67
+ Creative assistants for marketing and growth teams
68
+
69
+ Automating A/B test copy variants for offers and sales
70
+
71
+ # Limitations
72
+
73
+ May produce overly playful or repetitive content if prompts are vague
74
+
75
+ Trained only for short-form marketing copywriting
76
+
77
+ Avoid using for sensitive topics or regulated industries
78
+
79
+ # Technical Configuration
80
+
81
+ Parameter Value
82
+
83
+ Optimizer AdamW (8-bit)
84
+
85
+ Learning Rate 2 × 10⁻⁴
86
+
87
+ Epochs 2
88
+
89
+ Gradient Accumulation 4
90
+
91
+ Batch Size (effective) 8
92
+
93
+ Quantization 4-bit QLoRA
94
+
95
+ Training Data Categories
96
+
97
+ Category Example
98
+
99
+ Sale / Offer “Diwali deals up to 50% off ✨”
100
+
101
+ Food Craving “Lunch o’clock alert! Your cravings just went live 🍛”
102
+
103
+ FOMO “Blink and it’s gone 👀 Flash sale ends in 2 hours!”
104
+
105
+ Re-engagement “We miss your clicks 😢 Come back for something tasty!”
106
+
107
+ Festive “Play with colors, not your budget! Holi offers just dropped 🎨”
108
+
109
+ Fashion “New drops just landed 💃 Make your wardrobe jealous!”
110
+
111
+
112
+ # License
113
+
114
+ MIT License - open for research and non-commercial use.
115
+
116
+ Please credit Kavyaa / Copywriting LLM if you use this model in public projects.
117
+
118
+
119
+
120
+ # Acknowledgements
121
+
122
+ Fine-tuned using Unsloth for 2× faster training
123
+
124
+ Base weights from Mistral-7B-Instruct v0.3
125
+
126
+ Created by Kavyaa for creative and marketing AI research