Skip to content

Commit

Permalink
added backend installation for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisNeo committed May 20, 2023
1 parent 210d9d2 commit 5a83d9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt4all_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def _rebuild_personality(self):
self._set_config_result['personality_status'] ='failed'
self._set_config_result['errors'].append(f"couldn't load personality:{ex}")

def step_callback(self, text, type):
print(f"Step callback : {text}")
def step_callback(self, text, message_type):
self.generation_queue.put((text,self.id, message_type))
def _run(self):
self._rebuild_model()
self._rebuild_personality()
Expand Down
7 changes: 7 additions & 0 deletions installations/install_backend_gpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
echo "this will recompile llapacpp to use your hardware with gpu enabled."
pip uninstall llama-cpp-python -y
# First we need to purge any old installation
pip cache purge
export CMAKE_ARGS="-DLLAMA_CUBLAS=on"
export FORCE_CMAKE=1
pip install llama-cpp-python --upgrade

0 comments on commit 5a83d9c

Please sign in to comment.