KvrParaskevi
commited on
Update chatbot.py
Browse files- chatbot.py +1 -14
chatbot.py
CHANGED
@@ -51,20 +51,7 @@ def load_pipeline():
|
|
51 |
max_tokens = 252,top_k = 30, early_stopping=True,
|
52 |
temperature = 0.1,repetition_penalty = 1.03)
|
53 |
|
54 |
-
llm = HuggingFacePipeline
|
55 |
-
model_id =my_model_id,
|
56 |
-
task="text-generation",
|
57 |
-
#model_kwargs={"trust_remote_code": True},
|
58 |
-
pipeline_kwargs={
|
59 |
-
"model": model,
|
60 |
-
"tokenizer": tokenizer,
|
61 |
-
"device_map": "auto",
|
62 |
-
"max_new_tokens": 512,
|
63 |
-
"temperature": 0.3,
|
64 |
-
"top_p": 0.85,
|
65 |
-
"repetition_penalty": 1.03,
|
66 |
-
},
|
67 |
-
)
|
68 |
return llm
|
69 |
|
70 |
# def generate_from_pipeline(text, pipe):
|
|
|
51 |
max_tokens = 252,top_k = 30, early_stopping=True,
|
52 |
temperature = 0.1,repetition_penalty = 1.03)
|
53 |
|
54 |
+
llm = HuggingFacePipeline(pipeline = pipe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
return llm
|
56 |
|
57 |
# def generate_from_pipeline(text, pipe):
|