KirubaLS commited on
Commit
edf3601
·
verified ·
1 Parent(s): d86a70e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -12
README.md CHANGED
@@ -1,12 +1,141 @@
1
- ---
2
- title: Outreach Message Generator
3
- emoji: 🔥
4
- colorFrom: indigo
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: 5.34.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Gemma-2B Fine-Tuned for Outreach Message Generation
2
+ Model Description
3
+
4
+ This model is a fine-tuned version of google/gemma-2b trained to generate personalized LinkedIn outreach messages for business communication. The model takes contextual information about a prospect and generates a professional first-level outreach message suitable for networking or business development.
5
+
6
+ The model was fine-tuned using parameter-efficient fine-tuning (LoRA) with the PEFT library and Hugging Face Transformers. To reduce memory usage during training, 4-bit quantization using BitsAndBytes was applied.
7
+
8
+ The model is designed to generate context-aware outreach messages based on structured inputs such as industry, company name, prospect designation, and background information.
9
+
10
+ Intended Use
11
+
12
+ The model is intended for generating personalized outreach messages for:
13
+
14
+ LinkedIn networking
15
+ Sales outreach
16
+ Business development communication
17
+ Professional introduction messages
18
+
19
+ The model accepts structured contextual inputs and generates a professional outreach message based on the provided information.
20
+
21
+ Example input fields include:
22
+
23
+ Prospect Name
24
+ Designation
25
+ Company
26
+ Industry
27
+ Prospect Background
28
+ Sender Background
29
+ Prompt Format
30
+
31
+ The model was trained using an instruction-style prompt-response format.
32
+
33
+ Example prompt structure:
34
+
35
+ ### PROMPT:
36
+ Generate a personalized LinkedIn message for {Prospect Name},
37
+ {Designation} at {Company} ({Industry})
38
+
39
+ Prospect Background:
40
+ {Prospect Background}
41
+
42
+ My Background:
43
+ {Sender Background}
44
+
45
+ ### RESPONSE:
46
+
47
+ The model generates a personalized outreach message as the response.
48
+
49
+ Training Data
50
+
51
+ The training dataset consisted of structured outreach communication examples containing:
52
+
53
+ Prospect Name
54
+ Designation
55
+ Company Name
56
+ Industry
57
+ Prospect Information
58
+ Sender Information
59
+ First-Level Outreach Message
60
+
61
+ The dataset was formatted into prompt–completion pairs to train the model in an instruction-following manner.
62
+
63
+ Training Procedure
64
+
65
+ The model was fine-tuned using Supervised Fine-Tuning (SFT) with LoRA adapters.
66
+
67
+ Key training configuration:
68
+
69
+ Base Model: google/gemma-2b
70
+ Fine-Tuning Method: LoRA (PEFT)
71
+ Quantization: 4-bit NF4 (BitsAndBytes)
72
+ Optimizer: paged_adamw_8bit
73
+ Epochs: 5
74
+ Learning Rate: 2e-4
75
+ Batch Size: 2
76
+ Gradient Accumulation Steps: 4
77
+ Mixed Precision Training: FP16
78
+
79
+ LoRA adapters were applied to the transformer attention layers:
80
+
81
+ q_proj
82
+ k_proj
83
+ v_proj
84
+ o_proj
85
+
86
+ This enabled efficient fine-tuning while keeping most of the base model weights frozen.
87
+
88
+ Evaluation
89
+
90
+ Basic evaluation was performed using generated responses compared against reference messages. ROUGE metrics were used to measure similarity between generated and reference messages.
91
+
92
+ The model demonstrates the ability to generate structured outreach messages that follow the tone and style of professional LinkedIn communication.
93
+
94
+ Example Usage
95
+
96
+ Example Python inference code:
97
+
98
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
99
+
100
+ model_name = "KirubaLS/gemma2b-merged1"
101
+
102
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
103
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
104
+
105
+ generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
106
+
107
+ prompt = """
108
+ ### PROMPT:
109
+ Generate a personalized LinkedIn message for John Doe,
110
+ Senior Data Engineer at Stripe (FinTech)
111
+
112
+ Prospect Background:
113
+ Works on payment infrastructure and scaling distributed systems.
114
+
115
+ My Background:
116
+ AI engineer building data intelligence platforms.
117
+
118
+ ### RESPONSE:
119
+ """
120
+
121
+ result = generator(prompt, max_new_tokens=200)
122
+ print(result[0]["generated_text"])
123
+ Limitations
124
+
125
+ The model may produce generic outreach messages when limited contextual information is provided. Output quality improves when richer contextual information is included in the prompt.
126
+
127
+ The model is intended for professional communication use cases and should be reviewed before sending messages in real-world scenarios.
128
+
129
+ License
130
+
131
+ This model follows the license of the base model google/gemma-2b.
132
+
133
+ Acknowledgements
134
+
135
+ This project was built using:
136
+
137
+ Hugging Face Transformers
138
+ PEFT (Parameter-Efficient Fine-Tuning)
139
+ BitsAndBytes quantization
140
+ PyTorch
141
+ Hugging Face Hub