Remove GGML support
This commit is contained in:
parent
cc7b7ba153
commit
ed86878f02
15 changed files with 24 additions and 123 deletions
|
@ -2,7 +2,6 @@ import os
|
|||
import re
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
from modules import shared
|
||||
from modules.logging_colors import logger
|
||||
|
@ -125,15 +124,3 @@ def get_datasets(path: str, ext: str):
|
|||
|
||||
def get_available_chat_styles():
|
||||
return sorted(set(('-'.join(k.stem.split('-')[1:]) for k in Path('css').glob('chat_style*.css'))), key=natural_keys)
|
||||
|
||||
|
||||
def is_gguf(path: Union[str, Path]) -> bool:
|
||||
'''
|
||||
Determines if a llama.cpp model is in GGUF format
|
||||
Copied from ctransformers utils.py
|
||||
'''
|
||||
path = str(Path(path).resolve())
|
||||
with open(path, "rb") as f:
|
||||
magic = f.read(4)
|
||||
|
||||
return magic == "GGUF".encode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue