NofarSachs commited on
Commit
bf31d2d
·
verified ·
1 Parent(s): c4a2bf5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +138 -3
README.md CHANGED
@@ -1,3 +1,138 @@
1
- ---
2
- license: gemma
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - marketing
6
+ license: llama3
7
+ library_name: transformers
8
+ pipeline_tag: text-generation
9
+ ---
10
+ # GemMarketing: A Marketing Large Language Model
11
+
12
+ GemMarketing is a 2B parameter Domain-Specific Large Language Model (LLM).
13
+ It was specifically adapted to the marketing domain from [gemma-2b](https://huggingface.co/google/gemma-2b) through continuous pretraining on a meticulously curated and comprehensive marketing corpus of more than 43B tokens.
14
+ GemMarketing outperforms gemma-2b on specific marketing tasks. We are releasing this **early checkpoint** of the model to the AI community.
15
+
16
+
17
+ ### Model Description
18
+
19
+ GemMarketing is a powerful tool that can aid in generating high-quality marketing content and conducting research in the field of marketing.
20
+ It's a great resource for anyone looking to stay ahead in the rapidly changing world of marketing.
21
+
22
+ While the model is designed to encode marketing knowledge, this checkpoint is not yet adapted to deliver knowledge appropriately, safely, or within professional actionable constraints.
23
+ We recommend against deploying GemMarketing in real-world practice settings.
24
+
25
+ ### Model Details
26
+ - Developed by: [Marketeam](https://www.marketeam.ai/)
27
+ - Model type: Causal decoder-only transformer language model
28
+ - Continue-pretrained from model: gemma-2b
29
+ - Context length: 3K tokens
30
+ - Input & Output: Text-only
31
+ - Language: English
32
+ - Knowledge Cutoff: December 2023
33
+
34
+ ## Uses
35
+
36
+ GemMarketing has been developed for further research of LLM for marketing applications.
37
+ The potential use cases for this tool are diverse and varied, ranging from marketing question answering to general marketing information queries, and actions (function-calls) on marketing platforms.
38
+
39
+ GemMarketing is a Foundation Language Model (FLM) without finetuning or instruction-tuning.
40
+ We recommend applying SFT or RLHF-tuned for specific downstream tasks. Or rather apply in-context learning with 1000-1500 tokens added to the prompt.
41
+
42
+
43
+ ## Training Details
44
+
45
+ ### Training Data
46
+
47
+ Marketing data from publicly available and **internal** sources such as:
48
+ - Blogs
49
+ - Books
50
+ - Websites
51
+ - Podcasts
52
+ - Newsletters
53
+ - Publications
54
+ - Social Media
55
+ - Ad-Campaigns
56
+ - Landing Pages
57
+ - Press Releases
58
+ - Email-Campaigns
59
+ - Brochures & Flyers
60
+ - Product Description
61
+ - Testimonials & Reviews
62
+ - ...
63
+ And ±10% of previously seen data to avoid *catastrophic forgetting*.
64
+
65
+
66
+ ### Training Procedure
67
+
68
+ Our training procedure includes using the AWS SageMaker framework, 4 NVIDIA A100 GPUs, p4de.24xlarge machine.
69
+ With a total train time of ±250 hours, with a total training cost of ±10K$.
70
+ This is an **early checkpoint** of the model that we are releasing to the community.
71
+
72
+ #### Training Hyperparameters
73
+
74
+ | Param | Value |
75
+ |---------------|------------|
76
+ | bf16 | true |
77
+ | tf32 | true |
78
+ | lr | 1e-4 |
79
+ | optim | adamw |
80
+ | epochs | 1 |
81
+ | lr scheduler | constant |
82
+ | warmup ratio | 0.03 |
83
+ | max grad norm | 0.3 |
84
+ | context len | 3072 |
85
+
86
+
87
+
88
+ ## How to use
89
+
90
+ #### Using Transformers pipeline
91
+
92
+ ```python
93
+ import transformers
94
+ import torch
95
+
96
+ model_id = "marketeam/GemMarketing"
97
+ tokenizer_id = "google/gemma-2b"
98
+ token = "hf-token"
99
+
100
+ pipeline = transformers.pipeline("text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16},
101
+ tokenizer=tokenizer_id, token=token, device_map='auto')
102
+
103
+ pipeline("What are the key components of a digital marketing strategy?")
104
+ ```
105
+
106
+ #### Using Transformers generate
107
+
108
+ ```python
109
+ from transformers import AutoTokenizer, AutoModelForCausalLM
110
+ import torch
111
+
112
+ model_id = "marketeam/GemMarketing"
113
+ tokenizer_id = "google/gemma-2b"
114
+ token = "hf_token"
115
+ device = "cuda" if torch.cuda.is_available() else "cpu"
116
+
117
+ tokenizer = AutoTokenizer.from_pretrained(tokenizer_id, token=token)
118
+ model = AutoModelForCausalLM.from_pretrained(
119
+ model_id, torch_dtype=torch.bfloat16, token=token).to(device)
120
+
121
+ message = "How do I calculate customer lifetime value?"
122
+ inputs = tokenizer(message, return_tensors="pt").to(device)
123
+ outputs = model.generate(**inputs)
124
+ tokenizer.batch_decode(outputs, skip_special_tokens=True)
125
+ ```
126
+
127
+
128
+ ## Intended Usage
129
+
130
+ GemMarketing is now available for further testing and assessment. Potential use cases include, but are not limited to:
131
+ - Text Generation: This model can produce creative text formats in the marketing domain.
132
+ - Knowledge Exploration: It can assist marketing researchers by generating valuable marketing information or answering questions about marketing-specific topics.
133
+ - Natural Language Processing (NLP) Research: This model can form the basis for researchers to experiment with NLP techniques, develop algorithms, and contribute to the advancement of the field.
134
+
135
+
136
+ ## Contributers
137
+
138
+ [Sahar Millis](https://www.linkedin.com/in/sahar-millis/) [Coby Benveniste](https://www.linkedin.com/in/coby-benveniste/) [Nofar Sachs](https://www.linkedin.com/in/nofar-sachs-2146801b3/) [Eran Mazur](https://www.linkedin.com/in/eranmazur/)