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

Error running ./example/rag.py - calling TrtLlmAPI #106

Open
SMEAC opened this issue Dec 4, 2024 · 1 comment
Open

Error running ./example/rag.py - calling TrtLlmAPI #106

SMEAC opened this issue Dec 4, 2024 · 1 comment

Comments

@SMEAC
Copy link

SMEAC commented Dec 4, 2024

Running the example rag.py the following error occurs:

2024-12-04 16:52:35,904 - [ChatRTX] - ERROR - chatrtx_rag.py:126 - Failed to init Llama-index TRTLLM model object: Error 'TrtLlmAPI' object has no attribute 'pydantic_private'
[12/04/2024-16:52:35] Failed to init Llama-index TRTLLM model object: Error 'TrtLlmAPI' object has no attribute 'pydantic_private'
2024-12-04 16:52:35,981 - [ChatRTX] - ERROR - rag.py:82 - Failed to load the model: llama2_13b_AWQ_INT4_chat
[12/04/2024-16:52:35] Failed to load the model: llama2_13b_AWQ_INT4_chat

Pydantic Version installed is 2.9.2

Error appears in submodule trtllm_api.py on assignment to self._model:

    self._model = TrtLlm(
        model_path=model_path,
        tokenizer_dir=tokenizer_dir,
        temperature=temperature,
        max_new_tokens=max_new_tokens,
        context_window=context_window,
        vocab_file=vocab_file,  # Previously was set as None mistakenly.
        use_py_session=use_py_session,
        add_special_tokens=add_special_tokens,
        trtLlm_debug_mode=trtLlm_debug_mode
    )

The function itself in file tutllm.py is running correctly, and can be followed without error.

@anujj
Copy link
Collaborator

anujj commented Mar 25, 2025

Did the trt-llm wheel installed successfully ?

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

2 participants