Untitled
unknown
python
a year ago
447 B
8
Indexable
from llama_index.llms.huggingface import HuggingFaceLLM
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
llm = HuggingFaceLLM(
model_name=MODEL_NAME,
tokenizer_name=MODEL_NAME,
context_window=CONTEXT_WINDOW,
generate_kwargs={"temperature": TEMPERATURE},
device_map="auto",
)
embedding = HuggingFaceEmbedding(
model_name=EMBEDDING_NAME,
device="cuda:2",
trust_remote_code=True,
)Editor is loading...
Leave a Comment