Module llmsearch.utils.model_downloader

Model downloader - https://github.com/oobabooga/text-generation-webui/blob/main/download-model.py

Functions

def download_model_from_hf(model_id, save_dir, branch='main', threads=4, max_retries=5)

Download model from HF

>>> download_model_from_hf(model_id, save_dir=temp_model_dir, branch="main")

Classes

class ModelDownloader (max_retries=5)

Methods

def check_model_files(self, model, branch, links, sha256, output_folder)
def download_model_files(self, model, branch, links, sha256, output_folder, progress_bar=None, start_from_scratch=False, threads=4, specific_file=None, is_llamacpp=False)
def get_output_folder(self, model, branch, is_lora, is_llamacpp=False, base_folder=None)
def get_single_file(self, url, output_folder, start_from_scratch=False)
def sanitize_model_and_branch_names(self, model, branch)
def start_download_threads(self, file_list, output_folder, start_from_scratch=False, threads=4)