darshan8950 commited on
Commit
3710d07
·
verified ·
1 Parent(s): 02a05c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def main():
25
 
26
  model = "daryl149/llama-2-7b-chat-hf"
27
  tokenizer = AutoTokenizer.from_pretrained(model)
28
- pipeline = transformers.pipeline("text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", do_sample=True, top_k=1, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
29
 
30
  llm = HuggingFacePipeline(pipeline=pipeline, model_kwargs={'temperature': 0})
31
  embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2')
 
25
 
26
  model = "daryl149/llama-2-7b-chat-hf"
27
  tokenizer = AutoTokenizer.from_pretrained(model)
28
+ pipeline = transformers.pipeline("text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, device_map="auto", do_sample=True, top_k=1, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id,offload_folder="offload")
29
 
30
  llm = HuggingFacePipeline(pipeline=pipeline, model_kwargs={'temperature': 0})
31
  embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2')