Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-lv11 committed May 31, 2024
1 parent cf3f17f commit df023d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/community/langchain_community/llms/ipex_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def from_model_id(
tokenizer_id: Optional[str] = None,
load_in_4bit: bool = True,
load_in_low_bit: Optional[str] = None,
device_map: Literal['cpu','xpu'] = 'cpu',
device_map: Literal["cpu", "xpu"] = "cpu",
**kwargs: Any,
) -> LLM:
"""
Expand Down Expand Up @@ -88,7 +88,7 @@ def from_model_id_low_bit(
model_kwargs: Optional[dict] = None,
*,
tokenizer_id: Optional[str] = None,
device_map: Literal['cpu','xpu'] = 'cpu',
device_map: Literal["cpu", "xpu"] = "cpu",
**kwargs: Any,
) -> LLM:
"""
Expand Down Expand Up @@ -125,7 +125,7 @@ def _load_model(
load_in_4bit: bool = False,
load_in_low_bit: Optional[str] = None,
low_bit_model: bool = False,
device_map: Literal['cpu','xpu'] = "cpu",
device_map: Literal["cpu", "xpu"] = "cpu",
model_kwargs: Optional[dict] = None,
kwargs: Optional[dict] = None,
) -> Any:
Expand Down Expand Up @@ -202,7 +202,7 @@ def _load_model(
f"'cpu' or 'xpu', but you have: {device_map}."
)
model.to(device_map)

return cls(
model_id=model_id,
model=model,
Expand Down

0 comments on commit df023d0

Please sign in to comment.