In addition, since T5 predicts all output tokens in one step (rather than one at at time), configure max_new_tokens on the LLM Metadata to be zero, otherwise llama-index will "leave room" in the input for the LLM to predict tokens (which is only needed for decoder models)
it does there are some display issue and one cell does not work, unfortunately i am hitting same issue with raw_nodes_2021 = node_parser.get_nodes_from_documents(documents, service_context=service_context) pickle.dump(raw_nodes_2021, open("2021_nodes.pkl", "wb"))
ValueError: No API key found for OpenAI. Please set either the OPENAI_API_KEY environment variable or openai.api_key prior to initialization. API keys can be found or created at https://platform.openai.com/account/api-keys
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/llama_index/embeddings/utils.py in resolve_embed_model(embed_model) 48 validate_openai_api_key(embed_model.api_key) 49 except ValueError as e: ---> 50 raise ValueError( 51 "\n**\n" 52 "Could not load OpenAI embedding model. "
ValueError: ** Could not load OpenAI embedding model. If you intended to use OpenAI, please check your OPENAI_API_KEY. Original error: No API key found for OpenAI. Please set either the OPENAI_API_KEY environment variable or openai.api_key prior to initialization. API keys can be found or created at https://platform.openai.com/account/api-keys
ValueError: The current device_map had weights offloaded to the disk. Please provide an offload_folder for them. Alternatively, make sure you have safetensors installed if the model you are using offers the weights in this format.