Skip to content

LLM HF Issue #8

@medhsv

Description

@medhsv

AttributeError Traceback (most recent call last)
in <cell line: 102>()
100
101 # Create a HF LLM using the llama index wrapper
--> 102 llm = HuggingFaceLLM(context_window=2048,
103 max_new_tokens=256,
104 system_prompt=system_prompt,

/usr/local/lib/python3.10/dist-packages/llama_index/llms/huggingface/base.py in init(self, context_window, max_new_tokens, query_wrapper_prompt, tokenizer_name, model_name, model, tokenizer, device_map, stopping_ids, tokenizer_kwargs, tokenizer_outputs_to_remove, model_kwargs, generate_kwargs, is_chat_model, callback_manager, system_prompt, messages_to_prompt, completion_to_prompt, pydantic_program_mode, output_parser)
241
242 # check context_window
--> 243 config_dict = self._model.config.to_dict()
244 model_context_window = int(
245 config_dict.get("max_position_embeddings", context_window)

AttributeError: 'str' object has no attribute 'config'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions