KirubaLS's picture
Update README.md
451288f verified
|
Raw History Blame Contribute Delete
4.52 kB
---
title: Outreach Message Generator
sdk: gradio
emoji: 🔥
colorFrom: indigo
colorTo: blue
short_description: This model is a fine-tuned version of google/gemma-2b traine
---
# Gemma-2B Fine-Tuned for Outreach Message Generation
## Model Description
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.
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.
The model is designed to generate context-aware outreach messages based on structured inputs such as industry, company name, prospect designation, and background information.
---
## Intended Use
The model is intended for generating personalized outreach messages for:
- LinkedIn networking
- Sales outreach
- Business development communication
- Professional introduction messages
The model accepts structured contextual inputs and generates a professional outreach message based on the provided information.
Example input fields include:
- Prospect Name
- Designation
- Company
- Industry
- Prospect Background
- Sender Background
---
## Prompt Format
The model was trained using an instruction-style prompt-response format.
Example prompt structure:
PROMPT:
Generate a personalized LinkedIn message for {Prospect Name},
{Designation} at {Company} ({Industry})
Prospect Background:
{Prospect Background}
My Background:
{Sender Background}
RESPONSE:
The model generates a personalized outreach message as the response.
---
## Training Data
The training dataset consisted of structured outreach communication examples containing:
- Prospect Name
- Designation
- Company Name
- Industry
- Prospect Information
- Sender Information
- First-Level Outreach Message
The dataset was formatted into **prompt–completion pairs** to train the model in an instruction-following manner.
---
## Training Procedure
The model was fine-tuned using **Supervised Fine-Tuning (SFT)** with **LoRA adapters**.
### Key training configuration
- **Base Model:** google/gemma-2b
- **Fine-Tuning Method:** LoRA (PEFT)
- **Quantization:** 4-bit NF4 (BitsAndBytes)
- **Optimizer:** paged_adamw_8bit
- **Epochs:** 5
- **Learning Rate:** 2e-4
- **Batch Size:** 2
- **Gradient Accumulation Steps:** 4
- **Mixed Precision Training:** FP16
LoRA adapters were applied to the transformer attention layers:
- `q_proj`
- `k_proj`
- `v_proj`
- `o_proj`
This enabled efficient fine-tuning while keeping most of the base model weights frozen.
---
## Evaluation
Basic evaluation was performed using generated responses compared against reference messages. **ROUGE metrics** were used to measure similarity between generated and reference messages.
The model demonstrates the ability to generate structured outreach messages that follow the tone and style of professional LinkedIn communication.
---
## Example Usage
Example Python inference code:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model_name = "KirubaLS/gemma2b-merged1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
prompt = """
### PROMPT:
Generate a personalized LinkedIn message for John Doe,
Senior Data Engineer at Stripe (FinTech)
Prospect Background:
Works on payment infrastructure and scaling distributed systems.
My Background:
AI engineer building data intelligence platforms.
### RESPONSE:
"""
result = generator(prompt, max_new_tokens=200)
print(result[0]["generated_text"])
Limitations
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.
The model is intended for professional communication use cases and should be reviewed before sending messages in real-world scenarios.
License
This model follows the license of the base model google/gemma-2b.
Acknowledgements
This project was built using:
Hugging Face Transformers
PEFT (Parameter-Efficient Fine-Tuning)
BitsAndBytes quantization
PyTorch