mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
Update huggingface.py add import torch statement
Added import torch statement
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user