đ Hebrew-Gemma-11B-V2
An updated version of Hebrew-Gemma-11B that was trained longer and had some bugs fixed. This is an open - source Large Language Model (LLM), a Hebrew/English pretrained generative text model with 11 billion parameters, based on the Gemma - 7B architecture from Google.
đ Quick Start
First, ensure you have installed the transformers
library. You can install or update it using the following command:
pip install -U transformers
Then, you can choose the appropriate code snippet according to your needs.
đģ Usage Examples
Basic Usage
Running on CPU
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2")
model = AutoModelForCausalLM.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2")
input_text = "׊×××! ×× ×Š×××× ××××?"
input_ids = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))
Running on GPU
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2")
model = AutoModelForCausalLM.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2", device_map="auto")
input_text = "׊×××! ×× ×Š×××× ××××?"
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))
Running with 4 - Bit precision
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
tokenizer = AutoTokenizer.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2")
model = AutoModelForCausalLM.from_pretrained("yam-peleg/Hebrew-Gemma-11B-V2", quantization_config = BitsAndBytesConfig(load_in_4bit=True))
input_text = "׊×××! ×× ×Š×××× ××××?"
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))
đ Documentation
Base Models
Instruct Models
Model Details
Hebrew-Gemma-11B is an open - source LLM, a Hebrew/English pretrained generative text model with 11 billion parameters, based on the Gemma - 7B architecture from Google. It is a continued pretrain of gemma - 7b, extended to a larger scale and trained on 3B additional tokens of both English and Hebrew text data. 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.
Terms of Use
As an extension of Gemma - 7B, this model is subject to the original license and terms of use by Google.
Gemma - 7B original Terms of Use: Terms
Notice
Hebrew-Gemma-11B-V2 is a pretrained base model and therefore does not have any moderation mechanisms.
đ License
This model is under the gemma-terms-of-use.
đĨ Authors
- Trained by Yam Peleg.
- In collaboration with Jonathan Rouach and Arjeo, inc.