abetlen / abetlen/llama-cpp-python

i am trying to include prompt in llm but getting validation error how can i include because i am using pandas dataframe agent it is looping until timelimit

Open
#697 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
10.6k
Forks
1.4k
PR merge metrics
PR metrics pending

Description

llm = LlamaCpp(
model_path=model_path,
max_tokens=1024,
n_gpu_layers=n_gpu_layers,
n_batch=n_batch,
callback_manager=callback_manager,
verbose=True,
n_ctx=4096, # Context window
prompt=pro,
temperature = 0.4,
)
/usr/local/lib/python3.10/dist-packages/langchain/utils/utils.py:155: UserWarning: WARNING! prompt is not default parameter.
prompt was transferred to model_kwargs.
Please confirm that prompt is what you intended.
warnings.warn(
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
----> 1 llm = LlamaCpp(
2 model_path=model_path,
3 max_tokens=1024,
4 n_gpu_layers=n_gpu_layers,
5 n_batch=n_batch,

1 frames
[/usr/local/lib/python3.10/dist-packages/langchain/load/serializable.py](https://localhost:8080/#) in __init__(self, **kwargs)
73
74 def __init__(self, **kwargs: Any) -> None:
---> 75 super().__init__(**kwargs)
76 self._lc_kwargs = kwargs
77

/usr/local/lib/python3.10/dist-packages/pydantic/main.cpython-310-x86_64-linux-gnu.so in pydantic.main.BaseModel.__init__()

ValidationError: 1 validation error for LlamaCpp
__root__
Could not load Llama model from path: /root/.cache/huggingface/hub/models--TheBloke--Llama-2-13B-chat-GGML/snapshots/a17885f653039bd07ed0f8ff4ecc373abf5425fd/llama-2-13b-chat.ggmlv3.q5_1.bin. Received error Llama.__init__() got an unexpected keyword argument 'prompt' (type=value_error)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.