Spaces:
Runtime error
Runtime error
Commit
·
733ec1d
1
Parent(s):
df32955
[fix] load in 16 bit
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ CSS = """
|
|
45 |
|
46 |
|
47 |
tokenizer = AutoTokenizer.from_pretrained("shenzhi-wang/Gemma-2-27B-Chinese-Chat")
|
48 |
-
model = AutoModelForCausalLM.from_pretrained("shenzhi-wang/Gemma-2-27B-Chinese-Chat", device_map="auto")
|
49 |
|
50 |
|
51 |
@spaces.GPU
|
@@ -127,4 +127,4 @@ with gr.Blocks(css=CSS) as demo:
|
|
127 |
|
128 |
|
129 |
if __name__ == "__main__":
|
130 |
-
demo.launch()
|
|
|
45 |
|
46 |
|
47 |
tokenizer = AutoTokenizer.from_pretrained("shenzhi-wang/Gemma-2-27B-Chinese-Chat")
|
48 |
+
model = AutoModelForCausalLM.from_pretrained("shenzhi-wang/Gemma-2-27B-Chinese-Chat", device_map="auto", torch_dtype="auto")
|
49 |
|
50 |
|
51 |
@spaces.GPU
|
|
|
127 |
|
128 |
|
129 |
if __name__ == "__main__":
|
130 |
+
demo.launch()
|