Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal instruction (core dumped) #33

Open
mitesh741 opened this issue Dec 7, 2023 · 0 comments
Open

Illegal instruction (core dumped) #33

mitesh741 opened this issue Dec 7, 2023 · 0 comments

Comments

@mitesh741
Copy link

mitesh741 commented Dec 7, 2023

I installed this: python -m pip install llama-cpp-python --prefer-binary --extra-index-url=https://jllllll.github.io/llama-cpp-python-cuBLAS-wheels/basic/cu121
Also tried this:https://jllllll.github.io/llama-cpp-python-cuBLAS-wheels/AVX512/cu121

Here is my code:

from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.chains import LLMChain
from langchain.llms import LlamaCpp
from langchain.prompts import PromptTemplate

from langchain.agents.agent_types import AgentType
from langchain_experimental.agents.agent_toolkits import create_csv_agent

template = """Question: {question}

Answer: Let's work this out in a step by step way to be sure we have the right answer."""
prompt = PromptTemplate(template=template, input_variables=["question"])

callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])


n_gpu_layers = 10  # Change this value based on your model and your GPU VRAM pool.
n_batch = 210  # Should be between 1 and n_ctx, consider the amount of VRAM in your GPU.

llm = LlamaCpp(
    model_path="/home/rtx-4070/Downloads/openorca-platypus2-13b.Q4_K_M.gguf",
    n_gpu_layers=n_gpu_layers,
    n_batch=n_batch,
    callback_manager=callback_manager,
    verbose=True,  # Verbose is required to pass to the callback manager
)
print("dfg")

llm_chain = LLMChain(prompt=prompt, llm=llm)
question = "What NFL team won the Super Bowl in the year Justin Bieber was born?"
llm_chain.run(question)

I get this error:
Illegal instruction (core dumped)

CUDA Version: 12.1
Ubuntu: 20
GPU: RTX 4070
CPU : AMD Ryzen 7 5700X 8-Core
Langchain Version: 0.0.347
Langchain Experimental: 0.0.44

Created fresh new conda environment and installed everything in sequence: langchain, experimental, llama-cppy-python.

If remove this package and install normal llama-cpp-python models loads and responds but on cpu with BLAS=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant