lm-finetuner: Merger: Dequantize before merging lora adapter; More lora options;

This commit is contained in:
extio-de
2024-12-01 13:03:45 +01:00
parent aa958eeb81
commit ff2385bf50
5 changed files with 21 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ from transformers import (
class ModelLoader:
def load(self, path: str, forceCpu: bool, q4OnGpu: bool, context: Context):
q4 = q4OnGpu and context.accel and not forceCpu
q4 = context.qLora and q4OnGpu and context.accel and not forceCpu
bbConfig = BitsAndBytesConfig(
load_in_4bit=True,
@@ -28,4 +28,6 @@ class ModelLoader:
if not forceCpu:
baseModel = baseModel.to(context.device)
print(baseModel)
return baseModel