marklysze / llamaindex-rag-linux-cuda Goto Github PK
View Code? Open in Web Editor NEWExamples of RAG using Llamaindex with local LLMs in Linux - Gemma, Mixtral 8x7B, Llama 2, Mistral 7B, Orca 2, Phi-2, Neural 7B
Examples of RAG using Llamaindex with local LLMs in Linux - Gemma, Mixtral 8x7B, Llama 2, Mistral 7B, Orca 2, Phi-2, Neural 7B
According to README file https://github.com/marklysze/LlamaIndex-RAG-Linux-CUDA/blob/main/README.md
When I install from environment files and activate conda.
conda env create -f environment.yml
conda activate LlamaIndexRAGLinux
I install Jupyter Notebook and run.
pip install pip install notebook ipykernel
jupyter-notebook --allow-root --no-browser --ip=0.0.0.0 --port=27000 --NotebookApp.token='1a4c347ef...........'
Then I run LlamaIndex_Mistral7B-RAG.ipynb
in Jupyter Notebook. I select Kernel from Preferred Session (LlamaIndex_Mistral7B-RAG.ipynb)
When I run Code in Notebook at step 3
import torch
from llama_index.llms import LlamaCPP
from llama_index.llms.llama_utils import messages_to_prompt, completion_to_prompt
llm = LlamaCPP(
model_url=None, # We'll load locally.
model_path='./Models/mistral-7b-instruct-v0.1.Q6_K.gguf', # 6-bit model
temperature=0.1,
max_new_tokens=1024, # Increasing to support longer responses
context_window=8192, # Mistral7B has an 8K context-window
generate_kwargs={},
# set to at least 1 to use GPU
model_kwargs={"n_gpu_layers": 33}, # 33 was all that was needed for this and that fit with the RTX 3090's 24GB of memory
messages_to_prompt=messages_to_prompt,
completion_to_prompt=completion_to_prompt,
verbose=True
)
It show error output.
ImportError Traceback (most recent call last)
Cell In[3], line 1
----> 1 import torch
3 from llama_index.llms import LlamaCPP
4 from llama_index.llms.llama_utils import messages_to_prompt, completion_to_prompt
File ~/anaconda3/envs/LlamaIndexRAGLinux/lib/python3.12/site-packages/torch/__init__.py:235
233 if USE_GLOBAL_DEPS:
234 _load_global_deps()
--> 235 from torch._C import * # noqa: F403
237 # Appease the type checker; ordinarily this binding is inserted by the
238 # torch._C module initialization code in C
239 if TYPE_CHECKING:
ImportError: /home/devteam/anaconda3/envs/LlamaIndexRAGLinux/lib/python3.12/site-packages/torch/lib/../../../../libcusparse.so.12: symbol __nvJitLinkGetLinkedCubin_12_2 version libnvJitLink.so.12 not defined in file libnvJitLink.so.12 with link time reference
Please advise how to solve this error, Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.