Update huggingface.py add import torch statement

Added import torch statement
This commit is contained in:
Archit-Kohli authored and GitHub committed 2023-10-05 14:27:15 +05:30
1 parent 5b4e517d9d
commit 7ce1dc9069
1 file changed
+1
+1
View File
@@ -7,6 +7,7 @@ class HuggingFaceLLM(BaseLLM):
from langchain.llms import HuggingFacePipeline
if q:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, BitsAndBytesConfig
tokenizer = AutoTokenizer.from_pretrained(llm_name)
bnb_config = BitsAndBytesConfig(