From 4851db543f093cf02f502bd395e57a46e755ac39 Mon Sep 17 00:00:00 2001 From: JaWeee Date: Thu, 22 Aug 2024 16:24:58 +0700 Subject: [PATCH] update new llama model --- chat_core/chatbot.py | 2 +- rag_core/pipeline/get_LLM.py | 2 +- requirements.txt | 347 ++++++++++++++++------------------- 3 files changed, 165 insertions(+), 186 deletions(-) diff --git a/chat_core/chatbot.py b/chat_core/chatbot.py index 1a0e0eb..31a2194 100644 --- a/chat_core/chatbot.py +++ b/chat_core/chatbot.py @@ -33,7 +33,7 @@ def chat(question, compressor_type, # Ranking the documents logging.info("Getting compressed_docs") abstracts = retriever.invoke(question) - llm = OllamaLLM(model="llama3") + llm = OllamaLLM(model="llama3.1") # Get prompt for the question prompt = prompt_template() diff --git a/rag_core/pipeline/get_LLM.py b/rag_core/pipeline/get_LLM.py index f097c44..5b1d9a5 100644 --- a/rag_core/pipeline/get_LLM.py +++ b/rag_core/pipeline/get_LLM.py @@ -29,7 +29,7 @@ def prompt_template(): -def get_LLM(compressed_docs, model="llama3"): +def get_LLM(compressed_docs, model): # Set up logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/requirements.txt b/requirements.txt index 1b9d9b1..367db22 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,184 +1,163 @@ -# This file may be used to create an environment using: -# $ conda create --name --file -# platform: linux-64 -_libgcc_mutex=0.1=main -_openmp_mutex=5.1=1_gnu -aiohttp=3.9.5=pypi_0 -aiosignal=1.3.1=pypi_0 -annotated-types=0.7.0=pypi_0 -anyio=4.4.0=pypi_0 -asgiref=3.8.1=pypi_0 -attrs=23.2.0=pypi_0 -backoff=2.2.1=pypi_0 -bcrypt=4.2.0=pypi_0 -beautifulsoup4=4.12.3=pypi_0 -blas=1.0=mkl -build=1.2.1=pypi_0 -bzip2=1.0.8=h5eee18b_6 -ca-certificates=2024.7.2=h06a4308_0 -cachetools=5.4.0=pypi_0 -certifi=2024.7.4=pypi_0 -charset-normalizer=3.3.2=pypi_0 -chroma-hnswlib=0.7.6=pypi_0 -chromadb=0.5.5=pypi_0 -click=8.1.7=pypi_0 -coloredlogs=15.0.1=pypi_0 -cuda-cudart=12.4.127=h99ab3db_0 -cuda-cudart_linux-64=12.4.127=hd681fbe_0 -cuda-nvrtc=12.4.127=h99ab3db_1 -cuda-version=12.4=hbda6634_3 -dataclasses-json=0.6.7=pypi_0 -deprecated=1.2.14=pypi_0 -dnspython=2.6.1=pypi_0 -email-validator=2.2.0=pypi_0 -faiss-gpu=1.8.0=py3.11_h4c7d538_0_cuda12.1.1 -fastapi=0.111.1=pypi_0 -fastapi-cli=0.0.4=pypi_0 -filelock=3.15.4=pypi_0 -flatbuffers=24.3.25=pypi_0 -frozenlist=1.4.1=pypi_0 -fsspec=2024.6.1=pypi_0 -google-auth=2.32.0=pypi_0 -googleapis-common-protos=1.63.2=pypi_0 -greenlet=3.0.3=pypi_0 -grpcio=1.65.1=pypi_0 -h11=0.14.0=pypi_0 -httpcore=1.0.5=pypi_0 -httptools=0.6.1=pypi_0 -httpx=0.27.0=pypi_0 -huggingface-hub=0.24.3=pypi_0 -humanfriendly=10.0=pypi_0 -idna=3.7=pypi_0 -importlib-metadata=8.0.0=pypi_0 -importlib-resources=6.4.0=pypi_0 -intel-openmp=2023.1.0=hdb19cb5_46306 -jinja2=3.1.4=pypi_0 -joblib=1.4.2=pypi_0 -jsonpatch=1.33=pypi_0 -jsonpointer=3.0.0=pypi_0 -kubernetes=30.1.0=pypi_0 -langchain=0.2.11=pypi_0 -langchain-chroma=0.1.2=pypi_0 -langchain-community=0.2.10=pypi_0 -langchain-core=0.2.24=pypi_0 -langchain-ollama=0.1.0=pypi_0 -langchain-text-splitters=0.2.2=pypi_0 -langsmith=0.1.93=pypi_0 -ld_impl_linux-64=2.38=h1181459_1 -libcublas=12.4.5.8=h99ab3db_1 -libfaiss=1.8.0=h046e95b_0_cuda12.1.1 -libffi=3.4.4=h6a678d5_1 -libgcc-ng=11.2.0=h1234567_1 -libgomp=11.2.0=h1234567_1 -libstdcxx-ng=11.2.0=h1234567_1 -libuuid=1.41.5=h5eee18b_0 -lxml=5.2.2=pypi_0 -markdown-it-py=3.0.0=pypi_0 -markupsafe=2.1.5=pypi_0 -marshmallow=3.21.3=pypi_0 -mdurl=0.1.2=pypi_0 -mkl=2023.1.0=h213fc3f_46344 -mkl-service=2.4.0=py311h5eee18b_1 -mkl_fft=1.3.8=py311h5eee18b_0 -mkl_random=1.2.4=py311hdb19cb5_0 -mmh3=4.1.0=pypi_0 -monotonic=1.6=pypi_0 -mpmath=1.3.0=pypi_0 -multidict=6.0.5=pypi_0 -mypy-extensions=1.0.0=pypi_0 -ncurses=6.4=h6a678d5_0 -networkx=3.3=pypi_0 -numpy=1.26.4=py311h08b1b3b_0 -numpy-base=1.26.4=py311hf175353_0 -nvidia-cublas-cu12=12.1.3.1=pypi_0 -nvidia-cuda-cupti-cu12=12.1.105=pypi_0 -nvidia-cuda-nvrtc-cu12=12.1.105=pypi_0 -nvidia-cuda-runtime-cu12=12.1.105=pypi_0 -nvidia-cudnn-cu12=9.1.0.70=pypi_0 -nvidia-cufft-cu12=11.0.2.54=pypi_0 -nvidia-curand-cu12=10.3.2.106=pypi_0 -nvidia-cusolver-cu12=11.4.5.107=pypi_0 -nvidia-cusparse-cu12=12.1.0.106=pypi_0 -nvidia-nccl-cu12=2.20.5=pypi_0 -nvidia-nvjitlink-cu12=12.5.82=pypi_0 -nvidia-nvtx-cu12=12.1.105=pypi_0 -oauthlib=3.2.2=pypi_0 -ollama=0.3.0=pypi_0 -onnxruntime=1.18.1=pypi_0 -openssl=3.0.14=h5eee18b_0 -opentelemetry-api=1.26.0=pypi_0 -opentelemetry-exporter-otlp-proto-common=1.26.0=pypi_0 -opentelemetry-exporter-otlp-proto-grpc=1.26.0=pypi_0 -opentelemetry-instrumentation=0.47b0=pypi_0 -opentelemetry-instrumentation-asgi=0.47b0=pypi_0 -opentelemetry-instrumentation-fastapi=0.47b0=pypi_0 -opentelemetry-proto=1.26.0=pypi_0 -opentelemetry-sdk=1.26.0=pypi_0 -opentelemetry-semantic-conventions=0.47b0=pypi_0 -opentelemetry-util-http=0.47b0=pypi_0 -orjson=3.10.6=pypi_0 -overrides=7.7.0=pypi_0 -packaging=24.1=py311h06a4308_0 -pandas=2.2.2=pypi_0 -pillow=10.4.0=pypi_0 -pip=24.0=py311h06a4308_0 -posthog=3.5.0=pypi_0 -protobuf=4.25.4=pypi_0 -pyasn1=0.6.0=pypi_0 -pyasn1-modules=0.4.0=pypi_0 -pydantic=2.8.2=pypi_0 -pydantic-core=2.20.1=pypi_0 -pygments=2.18.0=pypi_0 -pypika=0.48.9=pypi_0 -pyproject-hooks=1.1.0=pypi_0 -python=3.11.9=h955ad1f_0 -python-dateutil=2.9.0.post0=pypi_0 -python-docx=1.1.2=pypi_0 -python-dotenv=1.0.1=pypi_0 -python-multipart=0.0.9=pypi_0 -pytz=2024.1=pypi_0 -pyyaml=6.0.1=pypi_0 -readline=8.2=h5eee18b_0 -regex=2024.7.24=pypi_0 -requests=2.32.3=pypi_0 -requests-oauthlib=2.0.0=pypi_0 -rich=13.7.1=pypi_0 -rsa=4.9=pypi_0 -safetensors=0.4.3=pypi_0 -scikit-learn=1.5.1=pypi_0 -scipy=1.14.0=pypi_0 -sentence-transformers=3.0.1=pypi_0 -setuptools=69.5.1=py311h06a4308_0 -shellingham=1.5.4=pypi_0 -six=1.16.0=pypi_0 -sniffio=1.3.1=pypi_0 -soupsieve=2.5=pypi_0 -sqlalchemy=2.0.31=pypi_0 -sqlite=3.45.3=h5eee18b_0 -starlette=0.37.2=pypi_0 -sympy=1.13.1=pypi_0 -tbb=2021.8.0=hdb19cb5_0 -tenacity=8.5.0=pypi_0 -threadpoolctl=3.5.0=pypi_0 -tk=8.6.14=h39e8969_0 -tokenizers=0.19.1=pypi_0 -torch=2.4.0=pypi_0 -tqdm=4.66.4=pypi_0 -transformers=4.43.3=pypi_0 -triton=3.0.0=pypi_0 -typer=0.12.3=pypi_0 -typing-extensions=4.12.2=pypi_0 -typing-inspect=0.9.0=pypi_0 -tzdata=2024.1=pypi_0 -urllib3=2.2.2=pypi_0 -uvicorn=0.30.3=pypi_0 -uvloop=0.19.0=pypi_0 -watchfiles=0.22.0=pypi_0 -websocket-client=1.8.0=pypi_0 -websockets=12.0=pypi_0 -wheel=0.43.0=py311h06a4308_0 -wrapt=1.16.0=pypi_0 -xz=5.4.6=h5eee18b_1 -yarl=1.9.4=pypi_0 -zipp=3.19.2=pypi_0 -zlib=1.2.13=h5eee18b_1 +accelerate==0.33.0 +aiohttp==3.9.5 +aiosignal==1.3.1 +annotated-types==0.7.0 +anyio==4.4.0 +asgiref==3.8.1 +attrs==23.2.0 +backoff==2.2.1 +bcrypt==4.2.0 +beautifulsoup4==4.12.3 +blinker==1.8.2 +build==1.2.1 +cachetools==5.4.0 +certifi==2024.7.4 +chardet==5.2.0 +charset-normalizer==3.3.2 +chroma-hnswlib==0.7.6 +chromadb==0.5.5 +click==8.1.7 +coloredlogs==15.0.1 +dataclasses-json==0.6.7 +datasets==2.21.0 +deepdiff==7.0.1 +Deprecated==1.2.14 +dill==0.3.8 +dnspython==2.6.1 +email_validator==2.2.0 +emoji==2.12.1 +faiss-cpu==1.8.0.post1 +fastapi==0.111.1 +fastapi-cli==0.0.4 +fastembed==0.3.4 +feedparser==6.0.11 +filelock==3.15.4 +filetype==1.2.0 +Flask==3.0.3 +flatbuffers==24.3.25 +frozenlist==1.4.1 +fsspec==2024.6.1 +google-auth==2.32.0 +googleapis-common-protos==1.63.2 +grpcio==1.65.1 +h11==0.14.0 +httpcore==1.0.5 +httptools==0.6.1 +httpx==0.27.0 +huggingface-hub==0.24.2 +humanfriendly==10.0 +idna==3.7 +importlib_metadata==8.0.0 +importlib_resources==6.4.0 +ipywidgets==8.1.3 +itsdangerous==2.2.0 +Jinja2==3.1.4 +joblib==1.4.2 +jsonpatch==1.33 +jsonpath-python==1.0.6 +jsonpointer==3.0.0 +kubernetes==30.1.0 +langchain==0.2.11 +langchain-chroma==0.1.2 +langchain-community==0.2.10 +langchain-core==0.2.24 +langchain-ollama==0.1.0 +langchain-text-splitters==0.2.2 +langchainhub==0.1.20 +langdetect==1.0.9 +langsmith==0.1.93 +loguru==0.7.2 +lxml==5.2.2 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +marshmallow==3.21.3 +mdurl==0.1.2 +mmh3==4.1.0 +monotonic==1.6 +mpmath==1.3.0 +multidict==6.0.5 +multiprocess==0.70.16 +mypy-extensions==1.0.0 +networkx==3.3 +nltk==3.8.1 +numpy==1.26.4 +oauthlib==3.2.2 +ollama==0.3.0 +onnx==1.16.1 +onnxruntime==1.18.1 +opentelemetry-api==1.26.0 +opentelemetry-exporter-otlp-proto-common==1.26.0 +opentelemetry-exporter-otlp-proto-grpc==1.26.0 +opentelemetry-instrumentation==0.47b0 +opentelemetry-instrumentation-asgi==0.47b0 +opentelemetry-instrumentation-fastapi==0.47b0 +opentelemetry-proto==1.26.0 +opentelemetry-sdk==1.26.0 +opentelemetry-semantic-conventions==0.47b0 +opentelemetry-util-http==0.47b0 +ordered-set==4.1.0 +orjson==3.10.6 +overrides==7.7.0 +pandas==2.2.2 +pillow==10.4.0 +posthog==3.5.0 +protobuf==4.25.4 +pyarrow==17.0.0 +pyasn1==0.6.0 +pyasn1_modules==0.4.0 +pydantic==2.8.2 +pydantic_core==2.20.1 +pypdf==4.3.1 +PyPika==0.48.9 +pyproject_hooks==1.1.0 +PyStemmer==2.2.0.1 +python-docx==1.1.2 +python-dotenv==1.0.1 +python-iso639==2024.4.27 +python-magic==0.4.27 +python-multipart==0.0.9 +pytz==2024.1 +PyYAML==6.0.1 +rapidfuzz==3.9.4 +regex==2024.7.24 +requests==2.32.3 +requests-oauthlib==2.0.0 +requests-toolbelt==1.0.0 +rich==13.7.1 +rsa==4.9 +safetensors==0.4.3 +scikit-learn==1.5.1 +scipy==1.14.0 +sentence-transformers==3.0.1 +sgmllib3k==1.0.0 +shellingham==1.5.4 +sniffio==1.3.1 +snowballstemmer==2.2.0 +soupsieve==2.5 +SQLAlchemy==2.0.31 +starlette==0.37.2 +sympy==1.13.1 +tabulate==0.9.0 +tenacity==8.5.0 +threadpoolctl==3.5.0 +tokenizers==0.19.1 +torch==2.4.0 +tqdm==4.66.4 +transformers==4.43.3 +typer==0.12.3 +types-requests==2.32.0.20240712 +typing-inspect==0.9.0 +tzdata==2024.1 +unstructured==0.15.0 +unstructured-client==0.24.1 +urllib3==2.2.2 +uvicorn==0.30.3 +uvloop==0.19.0 +watchfiles==0.22.0 +websocket-client==1.8.0 +websockets==12.0 +Werkzeug==3.0.3 +widgetsnbextension==4.0.11 +wrapt==1.16.0 +xxhash==3.5.0 +yarl==1.9.4 \ No newline at end of file