yam-peleg commited on
Commit
d29f566
โ€ข
1 Parent(s): 2fb9126

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md CHANGED
@@ -2,4 +2,94 @@
2
  license: other
3
  license_name: gemma-terms-of-use
4
  license_link: https://ai.google.dev/gemma/terms
 
 
 
 
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: other
3
  license_name: gemma-terms-of-use
4
  license_link: https://ai.google.dev/gemma/terms
5
+ language:
6
+ - en
7
+ - he
8
+ library_name: transformers
9
  ---
10
+ # Hebrew-Gemma-11B
11
+
12
+ Hebrew-Gemma-11B is an open-source Large Language Model (LLM) is a hebrew/english pretrained generative text model with 11 billion parameters, based on the Gemma-7B architecture from Google.
13
+
14
+ It is continued pretrain of gemma-7b, extended to a larger scale and trained on 3B additional tokens of both English and Hebrew text data.
15
+
16
+ The resulting model Gemma-11B is a powerful general-purpose language model suitable for a wide range of natural language processing tasks, with a focus on Hebrew language understanding and generation.
17
+
18
+
19
+ ### Terms of Use
20
+
21
+ As an extention of Gemma-7B, this model is subject to the original license and terms of use by Google.
22
+
23
+ **Original Terms of Use**: [Terms](https://www.kaggle.com/models/google/gemma/license/consent)
24
+
25
+ ### Usage
26
+
27
+ Below are some code snippets on how to get quickly started with running the model.
28
+
29
+ First make sure to `pip install -U transformers`, then copy the snippet from the section that is relevant for your usecase.
30
+
31
+ ### Running on CPU
32
+
33
+ ```
34
+ from transformers import AutoTokenizer, AutoModelForCausalLM
35
+
36
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
37
+ model = AutoModelForCausalLM.from_pretrained("google/gemma-7b")
38
+
39
+ input_text = "ืฉืœื•ื! ืžื” ืฉืœื•ืžืš ื”ื™ื•ื?"
40
+ input_ids = tokenizer(input_text, return_tensors="pt")
41
+
42
+ outputs = model.generate(**input_ids)
43
+ print(tokenizer.decode(outputs[0]))
44
+ ```
45
+
46
+ ### Running on GPU
47
+
48
+ ```
49
+ from transformers import AutoTokenizer, AutoModelForCausalLM
50
+
51
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
52
+ model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", device_map="auto")
53
+
54
+ input_text = "ืฉืœื•ื! ืžื” ืฉืœื•ืžืš ื”ื™ื•ื?"
55
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
56
+
57
+ outputs = model.generate(**input_ids)
58
+ print(tokenizer.decode(outputs[0]))
59
+ ```
60
+
61
+ ### Running with 4-Bit precision
62
+
63
+ ```
64
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
65
+
66
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
67
+ model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", quantization_config = BitsAndBytesConfig(load_in_4bit=True))
68
+
69
+ input_text = "ืฉืœื•ื! ืžื” ืฉืœื•ืžืš ื”ื™ื•ื?"
70
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
71
+
72
+ outputs = model.generate(**input_ids)
73
+ print(tokenizer.decode(outputs[0])
74
+ ```
75
+
76
+ ### Benchmark Results
77
+
78
+ - Coming Soon!
79
+
80
+
81
+ ### Notice
82
+
83
+ Hebrew-Gemma-11B is a pretrained base model and therefore does not have any moderation mechanisms.
84
+
85
+
86
+ ### Author
87
+
88
+ Trained by Yam Peleg.
89
+
90
+
91
+ ---
92
+ license: other
93
+ license_name: gemma-terms-of-use
94
+ license_link: https://ai.google.dev/gemma/terms
95
+ ---