We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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'
The text was updated successfully, but these errors were encountered:
this is where the issue is:
llm = HuggingFaceLLM(context_window=2048, max_new_tokens=256, system_prompt=system_prompt, query_wrapper_prompt=query_wrapper_prompt, model="meta-llama/Llama-2-7b-chat-hf", tokenizer=tokenizer)
Sorry, something went wrong.
No branches or pull requests
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'
The text was updated successfully, but these errors were encountered: