I am creating an index of documents with llama_index and langchain. For the embedding I want to use https://huggingface.co/bert-base-multilingual-cased. I had no problem creating the embedding using the following code:
from langchain.embeddings.huggingface import HuggingFaceEmbeddings
from llama_index import LangchainEmbedding, ServiceContext
embed_model = LangchainEmbedding(
HuggingFaceEmbeddings(model_name="bert-base-multilingual-cased")
)
service_context = ServiceContext.from_defaults(embed_model=embed_model)
my problem is that I don't understand how to use my HF access token when requesting the model. I want to use the access token because 1) it is suggested by the HF documentation and 2) I will probably use the HF Pro Plan in order to have an higher api rate limit.