alfraser commited on
Commit
2022fec
·
1 Parent(s): fb40a99

Tweaked the way the prompt is formatted going into the LLM query, to avoid the fine-tuned model giving nonsense answers

Browse files
Files changed (1) hide show
  1. 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
- query_input = f"[INST] <<SYS>> {self.system_prompt} <<SYS>> {request.request} [/INST] "
 
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": {