Update app.py
Browse files
app.py
CHANGED
@@ -15,18 +15,20 @@ You are a Q&A assistant. Your goal is to answer questions as
|
|
15 |
accurately as possible based on the instructions and context provided.
|
16 |
"""
|
17 |
|
|
|
|
|
18 |
llm = HuggingFaceLLM(
|
19 |
context_window=4096,
|
20 |
max_new_tokens=256,
|
21 |
generate_kwargs={"temperature": 0.1, "do_sample": True},
|
22 |
system_prompt=system_prompt,
|
23 |
-
tokenizer_name="
|
24 |
-
model_name="
|
25 |
device_map="auto",
|
26 |
model_kwargs={"torch_dtype": torch.float16 }
|
27 |
)
|
28 |
|
29 |
-
|
30 |
|
31 |
|
32 |
Settings.llm = llm
|
|
|
15 |
accurately as possible based on the instructions and context provided.
|
16 |
"""
|
17 |
|
18 |
+
embed_model= HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
|
19 |
+
|
20 |
llm = HuggingFaceLLM(
|
21 |
context_window=4096,
|
22 |
max_new_tokens=256,
|
23 |
generate_kwargs={"temperature": 0.1, "do_sample": True},
|
24 |
system_prompt=system_prompt,
|
25 |
+
tokenizer_name="meta-llama/Meta-Llama-3-8B",
|
26 |
+
model_name="meta-llama/Meta-Llama-3-8B",
|
27 |
device_map="auto",
|
28 |
model_kwargs={"torch_dtype": torch.float16 }
|
29 |
)
|
30 |
|
31 |
+
|
32 |
|
33 |
|
34 |
Settings.llm = llm
|