Spaces:
Runtime error
Runtime error
Braszczynski
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,19 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
4 |
# Load the model and tokenizer
|
5 |
from transformers import AutoModel, AutoTokenizer
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
|
12 |
def respond(
|
|
|
4 |
# Load the model and tokenizer
|
5 |
from transformers import AutoModel, AutoTokenizer
|
6 |
|
7 |
+
from transformers.adapters import AutoAdapterModel
|
8 |
+
from transformers import AutoTokenizer
|
9 |
+
|
10 |
+
model_name = "unsloth/Meta-Llama-3.1-8B-Instruct"
|
11 |
+
|
12 |
+
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
+
|
15 |
+
# Load the base model with adapters
|
16 |
+
model = AutoAdapterModel.from_pretrained(model_name)
|
17 |
+
|
18 |
+
model.load_adapter("Braszczynski/Llama-3.2-3B-Instruct-bnb-4bit-460steps")
|
19 |
+
|
20 |
|
21 |
|
22 |
def respond(
|