Allen Park commited on
Commit
f833ec9
·
1 Parent(s): 0703e71

use patronus lynx again

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,8 +7,8 @@ import spaces
7
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
8
  device = "cuda" # for GPU usage or "cpu" for CPU usage
9
 
10
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-Nemo-Instruct-2407")
11
- model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-Nemo-Instruct-2407", torch_dtype=torch.float16, device_map="auto")
12
 
13
  PROMPT = """
14
  Given the following QUESTION, DOCUMENT and ANSWER you must analyze the provided answer and determine whether it is faithful to the contents of the DOCUMENT. The ANSWER must not offer new information beyond the context provided in the DOCUMENT. The ANSWER also must not contradict information provided in the DOCUMENT. Output your final verdict by strictly following this format: "PASS" if the answer is faithful to the DOCUMENT and "FAIL" if the answer is not faithful to the DOCUMENT. Show your reasoning.
 
7
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
8
  device = "cuda" # for GPU usage or "cpu" for CPU usage
9
 
10
+ tokenizer = AutoTokenizer.from_pretrained("PatronusAI/Llama-3-Patronus-Lynx-8B-Instruct")
11
+ model = AutoModelForCausalLM.from_pretrained("PatronusAI/Llama-3-Patronus-Lynx-8B-Instruct", torch_dtype=torch.float16, device_map="auto")
12
 
13
  PROMPT = """
14
  Given the following QUESTION, DOCUMENT and ANSWER you must analyze the provided answer and determine whether it is faithful to the contents of the DOCUMENT. The ANSWER must not offer new information beyond the context provided in the DOCUMENT. The ANSWER also must not contradict information provided in the DOCUMENT. Output your final verdict by strictly following this format: "PASS" if the answer is faithful to the DOCUMENT and "FAIL" if the answer is not faithful to the DOCUMENT. Show your reasoning.