Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,11 @@ h3 {
|
|
34 |
device = "cuda" # for GPU usage or "cpu" for CPU usage
|
35 |
|
36 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
37 |
-
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
|
|
|
|
|
38 |
|
39 |
@spaces.GPU()
|
40 |
def stream_chat(
|
|
|
34 |
device = "cuda" # for GPU usage or "cpu" for CPU usage
|
35 |
|
36 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
37 |
+
model = AutoModelForCausalLM.from_pretrained(
|
38 |
+
MODEL,
|
39 |
+
torch_dtype=torch.bfloat16,
|
40 |
+
device_map="auto",
|
41 |
+
ignore_mismatched_sizes=True).to(device)
|
42 |
|
43 |
@spaces.GPU()
|
44 |
def stream_chat(
|