ccm commited on
Commit
075069c
β€’
1 Parent(s): b6289a5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -42,12 +42,12 @@ data.reset_index(inplace=True)
42
  model = sentence_transformers.SentenceTransformer(EMBEDDING_MODEL_NAME)
43
 
44
  # Create an LLM pipeline that we can send queries to
45
- tokenizer = transformers.AutoTokenizer.from_pretrained(LLM_MODEL_NAME)
46
  streamer = transformers.TextIteratorStreamer(
47
- tokenizer, skip_prompt=True, skip_special_tokens=True
48
  )
49
  chatmodel = transformers.AutoModelForCausalLM.from_pretrained(
50
- LLM_MODEL_NAME, torch_dtype="auto", device_map="auto"
51
  )
52
 
53
  # Create a FAISS index for fast similarity search
 
42
  model = sentence_transformers.SentenceTransformer(EMBEDDING_MODEL_NAME)
43
 
44
  # Create an LLM pipeline that we can send queries to
45
+ tokenizer = transformers.AutoTokenizer.from_pretrained(LLM_MODEL_NAME, torch_dtype=torch.float16)
46
  streamer = transformers.TextIteratorStreamer(
47
+ tokenizer, skip_prompt=True, skip_special_tokens=True, torch_dtype=torch.float16
48
  )
49
  chatmodel = transformers.AutoModelForCausalLM.from_pretrained(
50
+ LLM_MODEL_NAME, device_map="auto", torch_dtype=torch.float16
51
  )
52
 
53
  # Create a FAISS index for fast similarity search