50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
"""
|
|
Unified core module for Unsloth backend
|
|
"""
|
|
|
|
# Inference
|
|
from .inference import InferenceBackend, get_inference_backend
|
|
|
|
# Training
|
|
from .training import TrainingBackend, get_training_backend, TrainingProgress
|
|
|
|
# Configuration (from utils)
|
|
from utils.models import is_vision_model, ModelConfig, scan_trained_loras, load_model_defaults, get_base_model_from_lora
|
|
|
|
# Utilities (from utils)
|
|
from utils.paths import normalize_path, is_local_path, is_model_cached
|
|
from utils.utils import without_hf_auth, format_error_message
|
|
from utils.hardware import get_device, is_apple_silicon, clear_gpu_cache, get_gpu_memory_info, log_gpu_memory, DeviceType
|
|
from utils.datasets import format_and_template_dataset
|
|
|
|
__all__ = [
|
|
# Inference
|
|
'InferenceBackend',
|
|
'get_inference_backend',
|
|
|
|
# Training
|
|
'get_training_backend',
|
|
'TrainingBackend',
|
|
'TrainingProgress',
|
|
|
|
# Config
|
|
'ModelConfig',
|
|
'is_vision_model',
|
|
'scan_trained_loras',
|
|
'load_model_defaults',
|
|
'get_base_model_from_lora',
|
|
|
|
# Utils
|
|
'format_and_template_dataset',
|
|
'normalize_path',
|
|
'is_local_path',
|
|
'is_model_cached',
|
|
'without_hf_auth',
|
|
'format_error_message',
|
|
'get_gpu_memory_info',
|
|
'log_gpu_memory',
|
|
'get_device',
|
|
'is_apple_silicon',
|
|
'clear_gpu_cache',
|
|
'DeviceType',
|
|
]
|