mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 23:06:50 +00:00
fixed exllamav2 and hugging face bindings
This commit is contained in:
parent
712b176bc3
commit
8b7edf241c
@ -130,6 +130,8 @@ class LLMBinding:
|
|||||||
break
|
break
|
||||||
if not mp:
|
if not mp:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if model_path.name in ["ggml","gguf"]:
|
||||||
# model_path/str(model_name).split("/")[-1]
|
# model_path/str(model_name).split("/")[-1]
|
||||||
if mp.is_dir():
|
if mp.is_dir():
|
||||||
for f in mp.iterdir():
|
for f in mp.iterdir():
|
||||||
@ -148,7 +150,8 @@ class LLMBinding:
|
|||||||
root_path = model_root
|
root_path = model_root
|
||||||
self.config.save_config()
|
self.config.save_config()
|
||||||
return model_path
|
return model_path
|
||||||
|
else:
|
||||||
|
return mp
|
||||||
|
|
||||||
def download_model(self, url, model_name, callback = None):
|
def download_model(self, url, model_name, callback = None):
|
||||||
folder_path = self.searchModelFolder(model_name)
|
folder_path = self.searchModelFolder(model_name)
|
||||||
@ -634,16 +637,7 @@ class LLMBinding:
|
|||||||
if self.config.model_name is None:
|
if self.config.model_name is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if self.config.model_name.endswith(".reference"):
|
|
||||||
ASCIIColors.yellow("Loading a reference model:")
|
|
||||||
ref_path = self.searchModelPath(self.config.model_name)
|
|
||||||
if ref_path.exists():
|
|
||||||
with open(str(ref_path), 'r') as f:
|
|
||||||
model_path = Path(f.read())
|
|
||||||
ASCIIColors.yellow(model_path)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
else:
|
|
||||||
model_path = self.searchModelPath(self.config.model_name)
|
model_path = self.searchModelPath(self.config.model_name)
|
||||||
|
|
||||||
return model_path
|
return model_path
|
||||||
|
Loading…
Reference in New Issue
Block a user