Downloads · 30 days
26
32% of all-time downloads
tomo1222/gemma-2-27b-bf16-4bit
gemma-2-27b-bf16-4bit is a text generation model from tomo1222. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
This is a model with 4-bit quantization using the following code.
Downloads · 30 days
26
32% of all-time downloads
All-time downloads
81
Public
Parameters
28B
15.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.8 GB · 100%
How the weights are stored.
U826.9B · 96%
From the Hugging Face model README
This is a model with 4-bit quantization using the following code.
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers import BitsAndBytesConfig
import torch
model_name = "google/gemma-2-27b"
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
quantization_config=quantization_config,
device_map="auto"
)