Braszczynski commited on
Commit
1ccc577
·
verified ·
1 Parent(s): 30c7f35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
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
- model_name = "Braszczynski/Llama-3.2-3B-Instruct-bnb-4bit-460steps"
 
 
 
 
 
8
  tokenizer = AutoTokenizer.from_pretrained(model_name)
9
- model = AutoModel.from_pretrained(model_name)
 
 
 
 
 
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(