From 7ce1dc9069bf359ef8b1ad2d8d74e1529b898e6d Mon Sep 17 00:00:00 2001 From: Archit-Kohli <118905854+Archit-Kohli@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:27:15 +0530 Subject: [PATCH] Update huggingface.py add import torch statement Added import torch statement --- application/llm/huggingface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/application/llm/huggingface.py b/application/llm/huggingface.py index 987bfa55..ef3b1fbc 100644 --- a/application/llm/huggingface.py +++ b/application/llm/huggingface.py @@ -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(