File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -831,9 +831,7 @@ def _create_completion(
831831 "logprobs is not supported for models created with logits_all=False"
832832 )
833833
834- # Temporarily disable usage of the cache
835- # See: https://github.com/abetlen/llama-cpp-python/issues/348#issuecomment-1583072408
836- if self .cache and False :
834+ if self .cache :
837835 try :
838836 cache_item = self .cache [prompt_tokens ]
839837 cache_prefix_len = Llama .longest_token_prefix (
@@ -1071,14 +1069,14 @@ def _create_completion(
10711069 }
10721070 ],
10731071 }
1074- if self .cache and False :
1072+ if self .cache :
10751073 if self .verbose :
10761074 print ("Llama._create_completion: cache save" , file = sys .stderr )
10771075 self .cache [prompt_tokens + completion_tokens ] = self .save_state ()
10781076 print ("Llama._create_completion: cache saved" , file = sys .stderr )
10791077 return
10801078
1081- if self .cache and False :
1079+ if self .cache :
10821080 if self .verbose :
10831081 print ("Llama._create_completion: cache save" , file = sys .stderr )
10841082 self .cache [prompt_tokens + completion_tokens ] = self .save_state ()
You can’t perform that action at this time.
0 commit comments