Add ExLlama+LoRA support (#2756)
This commit is contained in:
parent
a1cac88c19
commit
eb30f4441f
3 changed files with 119 additions and 73 deletions
13
modules/relative_imports.py
Normal file
13
modules/relative_imports.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class RelativeImport:
|
||||
def __init__(self, path):
|
||||
self.import_path = Path(path)
|
||||
|
||||
def __enter__(self):
|
||||
sys.path.insert(0, str(self.import_path))
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
sys.path.remove(str(self.import_path))
|
Loading…
Add table
Add a link
Reference in a new issue