Spaces:
Runtime error
Runtime error
Tweaked the way the prompt is formatted going into the LLM query, to avoid the fine-tuned model giving nonsense answers
Browse files- src/architectures.py +2 -1
src/architectures.py
CHANGED
|
@@ -456,7 +456,8 @@ class HFInferenceEndpoint(ArchitectureComponent):
|
|
| 456 |
"Authorization": f"Bearer {self.api_token}",
|
| 457 |
"Content-Type": "application/json"
|
| 458 |
}
|
| 459 |
-
|
|
|
|
| 460 |
payload = {
|
| 461 |
"inputs": query_input,
|
| 462 |
"parameters": {
|
|
|
|
| 456 |
"Authorization": f"Bearer {self.api_token}",
|
| 457 |
"Content-Type": "application/json"
|
| 458 |
}
|
| 459 |
+
#return f"<s>[INST] <<SYS>>\n{sys_prompt}\n<</SYS>>\n\n{q}[/INST]{a}"
|
| 460 |
+
query_input = f"<s>[INST] <<SYS>>\n{self.system_prompt}\n<</SYS>>\n\n{request.request}[/INST] "
|
| 461 |
payload = {
|
| 462 |
"inputs": query_input,
|
| 463 |
"parameters": {
|