Setting Up a Local Large Language Model (LLM) Environment

Published: October 17, 2023 | Last Modified: May 13, 2025

Tags: python llm machine-learning local-ai therafit

Categories: Python



TheraFit is a personal project and Large Language Model approach to matching clients to therapists.

Environment Setup

Clone the Git repository.

git clone https://github.com/Trimad/TheraFit

Install Miniconda.

Create the environment

conda create --name local-llm python=3.11.4 --channel conda-forge
conda activate local-llm

Install pip requirements

pip3 install -r requirements.txt

Install the Windows version of bitsandbytes

python -m pip install bitsandbytes --prefer-binary --extra-index-url=https://jllllll.github.io/bitsandbytes-windows-webui 

Force reinstall torch until it works

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --force-reinstall

Test the Environment

Use the test script included in the Git repo.

python test.py

If the environment is configured correctly, Torch, Transformers, Gradio and Accelerate should all return True.

C:\Users\Tristan\Documents\GitHub\TheraFit>python test.py
Torch (CUDA availability): True
Transformers: True
Gradio: True
Accelerate: True

Run Therafit

python run.py