Daniel Marques commited on
Commit
08f602b
1 Parent(s): 6968cd1

fix: add types

Browse files
Files changed (1) hide show
  1. load_models.py +1 -5
load_models.py CHANGED
@@ -211,9 +211,6 @@ def load_model(device_type, model_id, model_basename=None, LOGGING=logging, stre
211
 
212
  # Create a pipeline for text generation
213
 
214
-
215
- streamer = TextStreamer(tokenizer, skip_prompt=True)
216
-
217
  pipe = pipeline(
218
  "text-generation",
219
  model=model,
@@ -224,11 +221,10 @@ def load_model(device_type, model_id, model_basename=None, LOGGING=logging, stre
224
  top_k=40,
225
  repetition_penalty=1.0,
226
  generation_config=generation_config,
227
- streamer=streamer,
228
  # callbacks=callbacks
229
  )
230
 
231
  local_llm = HuggingFacePipeline(pipeline=pipe)
232
  logging.info("Local LLM Loaded")
233
 
234
- return [local_llm, streamer]
 
211
 
212
  # Create a pipeline for text generation
213
 
 
 
 
214
  pipe = pipeline(
215
  "text-generation",
216
  model=model,
 
221
  top_k=40,
222
  repetition_penalty=1.0,
223
  generation_config=generation_config,
 
224
  # callbacks=callbacks
225
  )
226
 
227
  local_llm = HuggingFacePipeline(pipeline=pipe)
228
  logging.info("Local LLM Loaded")
229
 
230
+ return local_llm