artificialguybr commited on
Commit
ee05341
1 Parent(s): 329db81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -3,8 +3,12 @@ import re
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
5
  model_name_or_path = "teknium/OpenHermes-2-Mistral-7B"
6
- model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto", trust_remote_code=False, load_in_8bit=True, revision="main")
7
- tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
 
 
 
 
8
 
9
  BASE_SYSTEM_MESSAGE = "I carefully provide accurate, factual, thoughtful, nuanced answers and am brilliant at reasoning."
10
 
 
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
5
  model_name_or_path = "teknium/OpenHermes-2-Mistral-7B"
6
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
7
+ device_map="auto",
8
+ trust_remote_code=False,
9
+ load_in_8bit=True,
10
+ revision="main")
11
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
12
 
13
  BASE_SYSTEM_MESSAGE = "I carefully provide accurate, factual, thoughtful, nuanced answers and am brilliant at reasoning."
14