Imran1 commited on
Commit
12cb7cb
·
verified ·
1 Parent(s): edaf8b6

Update code/inference.py

Browse files
Files changed (1) hide show
  1. code/inference.py +1 -1
code/inference.py CHANGED
@@ -13,7 +13,7 @@ def format_chat(messages: List[Dict[str, str]], tokenizer) -> str:
13
  return tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
14
 
15
  # Model loading function for SageMaker with tensor parallelism
16
- def model_fn(model_dir):
17
  """
18
  Load the model and tokenizer from the model directory for inference.
19
  This version supports tensor parallelism across 4 GPUs.
 
13
  return tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
14
 
15
  # Model loading function for SageMaker with tensor parallelism
16
+ def model_fn(model_dir,context = None):
17
  """
18
  Load the model and tokenizer from the model directory for inference.
19
  This version supports tensor parallelism across 4 GPUs.