Spaces:
Sleeping
Sleeping
alfredplpl
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
import spaces
|
6 |
from transformers import AutoModel, AutoTokenizer, TextIteratorStreamer
|
7 |
from threading import Thread
|
8 |
-
|
9 |
|
10 |
DESCRIPTION = '''
|
11 |
<div>
|
@@ -45,7 +45,7 @@ h1 {
|
|
45 |
|
46 |
# Load the tokenizer and model
|
47 |
tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it-test")
|
48 |
-
model =
|
49 |
|
50 |
@spaces.GPU()
|
51 |
def chat_llama3_8b(message: str,
|
|
|
5 |
import spaces
|
6 |
from transformers import AutoModel, AutoTokenizer, TextIteratorStreamer
|
7 |
from threading import Thread
|
8 |
+
from peft import AutoPeftModelForCausalLM
|
9 |
|
10 |
DESCRIPTION = '''
|
11 |
<div>
|
|
|
45 |
|
46 |
# Load the tokenizer and model
|
47 |
tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it-test")
|
48 |
+
model = AutoPeftModelForCausalLM.from_pretrained("alfredplpl/sarashina2-7b-it-test", device_map="auto")
|
49 |
|
50 |
@spaces.GPU()
|
51 |
def chat_llama3_8b(message: str,
|