Upload train_lora.py with huggingface_hub
Browse files- train_lora.py +2 -2
train_lora.py
CHANGED
|
@@ -95,7 +95,7 @@ def main():
|
|
| 95 |
"attn_implementation": "flash_attention_2",
|
| 96 |
}
|
| 97 |
|
| 98 |
-
if USE_4BIT:
|
| 99 |
print(" Using 4-bit quantization (QLoRA)")
|
| 100 |
bnb_config = BitsAndBytesConfig(
|
| 101 |
load_in_4bit=True,
|
|
@@ -113,7 +113,7 @@ def main():
|
|
| 113 |
|
| 114 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, **model_kwargs)
|
| 115 |
|
| 116 |
-
if USE_4BIT:
|
| 117 |
model = prepare_model_for_kbit_training(model)
|
| 118 |
|
| 119 |
# ---- LoRA config ----
|
|
|
|
| 95 |
"attn_implementation": "flash_attention_2",
|
| 96 |
}
|
| 97 |
|
| 98 |
+
if USE_4BIT and "deepseek" not in MODEL_NAME.lower():
|
| 99 |
print(" Using 4-bit quantization (QLoRA)")
|
| 100 |
bnb_config = BitsAndBytesConfig(
|
| 101 |
load_in_4bit=True,
|
|
|
|
| 113 |
|
| 114 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, **model_kwargs)
|
| 115 |
|
| 116 |
+
if USE_4BIT and "deepseek" not in MODEL_NAME.lower():
|
| 117 |
model = prepare_model_for_kbit_training(model)
|
| 118 |
|
| 119 |
# ---- LoRA config ----
|