diff --git a/xinference/model/llm/llama_cpp/core.py b/xinference/model/llm/llama_cpp/core.py index 7f01688461..6d90a9cec4 100644 --- a/xinference/model/llm/llama_cpp/core.py +++ b/xinference/model/llm/llama_cpp/core.py @@ -159,7 +159,11 @@ def load(self): try: params = CommonParams() - params.model = model_path + # Compatible with xllamacpp changes + try: + params.model = model_path + except Exception: + params.model.path = model_path if self.model_family.chat_template: params.chat_template = self.model_family.chat_template # This is the default value, could be overwritten by _llamacpp_model_config