Stanislav commited on
Commit
d9d96d2
·
1 Parent(s): 8ffad45

feat: stream_true and new stop_word

Browse files
Files changed (1) hide show
  1. rag_pipeline/llm_interface.py +4 -2
rag_pipeline/llm_interface.py CHANGED
@@ -9,10 +9,11 @@ class LocalLLM:
9
 
10
  def __init__(self, model_path: str,
11
  n_ctx: int = 2048,
12
- stop=["</s>", "User Question:"],
13
  max_tokens=500,
14
  temperature: float = 0.5,
15
- repetition_penalty=1.25):
 
16
  """
17
  Initialize the local LLM model via llama-cpp and Langchain.
18
 
@@ -27,6 +28,7 @@ class LocalLLM:
27
  max_tokens=max_tokens,
28
  temperature=temperature,
29
  repetition_penalty=repetition_penalty,
 
30
  verbose=False
31
  )
32
 
 
9
 
10
  def __init__(self, model_path: str,
11
  n_ctx: int = 2048,
12
+ stop=["</s>", "User Question:", " User Response:"],
13
  max_tokens=500,
14
  temperature: float = 0.5,
15
+ repetition_penalty=1.25,
16
+ stream=True):
17
  """
18
  Initialize the local LLM model via llama-cpp and Langchain.
19
 
 
28
  max_tokens=max_tokens,
29
  temperature=temperature,
30
  repetition_penalty=repetition_penalty,
31
+ stream=stream,
32
  verbose=False
33
  )
34