Spaces:
Sleeping
Sleeping
Not use 8 bit quantization
Browse files
app.py
CHANGED
@@ -5,12 +5,7 @@ from typing import Iterator
|
|
5 |
import gradio as gr
|
6 |
import spaces
|
7 |
import torch
|
8 |
-
from transformers import
|
9 |
-
AutoModelForCausalLM,
|
10 |
-
BitsAndBytesConfig,
|
11 |
-
GemmaTokenizerFast,
|
12 |
-
TextIteratorStreamer,
|
13 |
-
)
|
14 |
|
15 |
DESCRIPTION = """\
|
16 |
# Gemma 2 2B IT
|
@@ -34,7 +29,6 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
34 |
model_id,
|
35 |
device_map="auto",
|
36 |
torch_dtype=torch.bfloat16,
|
37 |
-
quantization_config=BitsAndBytesConfig(load_in_8bit=True),
|
38 |
)
|
39 |
model.config.sliding_window = 4096
|
40 |
model.eval()
|
|
|
5 |
import gradio as gr
|
6 |
import spaces
|
7 |
import torch
|
8 |
+
from transformers import AutoModelForCausalLM, GemmaTokenizerFast, TextIteratorStreamer
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
DESCRIPTION = """\
|
11 |
# Gemma 2 2B IT
|
|
|
29 |
model_id,
|
30 |
device_map="auto",
|
31 |
torch_dtype=torch.bfloat16,
|
|
|
32 |
)
|
33 |
model.config.sliding_window = 4096
|
34 |
model.eval()
|