Add ExLlama+LoRA support (#2756)

This commit is contained in:
oobabooga 2023-06-19 12:31:24 -03:00 committed by GitHub
parent a1cac88c19
commit eb30f4441f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 119 additions and 73 deletions

View 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))