Skip to content

Commit

Permalink
added model_kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanbo Liu committed Sep 27, 2023
1 parent d41f24e commit e1a77d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions runtimes/huggingface/mlserver_huggingface/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def load_pipeline_from_settings(
hf_pipeline = pipeline(
hf_settings.task_name,
model=model,
model_kwargs=hf_settings.model_kwargs,
tokenizer=tokenizer,
device=hf_settings.device,
batch_size=batch_size,
Expand Down
5 changes: 4 additions & 1 deletion runtimes/huggingface/mlserver_huggingface/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ class Config:
"""
Name of the model that should be loaded in the pipeline.
"""

model_kwargs: Optional[dict] = None
"""
model kwargs that should be loaded in the pipeline.
"""
pretrained_tokenizer: Optional[str] = None
"""
Name of the tokenizer that should be loaded in the pipeline.
Expand Down

0 comments on commit e1a77d3

Please sign in to comment.