Commit 660bce2d authored by Your Name's avatar Your Name

Fix VulkanBackend missing abstract methods

Added:
- get_model_name()
- format_messages()
- cleanup()

These were required by the ModelBackend abstract base class.
parent a6907dd6
......@@ -732,3 +732,17 @@ class VulkanBackend(ModelBackend):
"n_ctx": self.n_ctx,
"n_gpu_layers": self.n_gpu_layers,
}
def get_model_name(self) -> str:
"""Return the loaded model name."""
return self.model_name or "unknown"
def format_messages(self, messages) -> str:
"""Format messages into a prompt string using chat template."""
if isinstance(messages, list):
return self._apply_chat_template(messages, add_generation_prompt=True)
return str(messages)
def cleanup(self) -> None:
"""Cleanup resources."""
self.unload_model()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment