Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
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')
|