Commit b8e81009 authored by Your Name's avatar Your Name

Show model capabilities when model is loaded

Print model capabilities (text, image-to-text, image, etc.)
after successful model loading in both NvidiaBackend and VulkanBackend
parent 64a9c845
...@@ -1078,6 +1078,10 @@ class NvidiaBackend(ModelBackend): ...@@ -1078,6 +1078,10 @@ class NvidiaBackend(ModelBackend):
print(f"\nModel loaded successfully") print(f"\nModel loaded successfully")
print(f"Model device: {next(self.model.parameters()).device}") print(f"Model device: {next(self.model.parameters()).device}")
# Show model capabilities
caps = detect_model_capabilities(model_name)
print(f"Model capabilities: {caps}")
def _get_gpu_memory_map_with_limit(self, vram_fraction: float) -> Dict: def _get_gpu_memory_map_with_limit(self, vram_fraction: float) -> Dict:
"""Get max_memory dict with specified VRAM fraction limit.""" """Get max_memory dict with specified VRAM fraction limit."""
...@@ -1610,6 +1614,10 @@ class VulkanBackend(ModelBackend): ...@@ -1610,6 +1614,10 @@ class VulkanBackend(ModelBackend):
backend_name = "CUDA" if self.force_cuda else "Vulkan" backend_name = "CUDA" if self.force_cuda else "Vulkan"
print(f"\nModel loaded successfully with {backend_name}!") print(f"\nModel loaded successfully with {backend_name}!")
# Show model capabilities
caps = detect_model_capabilities(model_name)
print(f"Model capabilities: {caps}")
# Detect the chat template after model load # Detect the chat template after model load
self._finalize_chat_template_detection() self._finalize_chat_template_detection()
print(f"DEBUG: Chat template: {self.chat_template}") print(f"DEBUG: Chat template: {self.chat_template}")
......
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