fix: use Ornith-1.0-35B bf16 base model (PEFT compatible)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# LoRA Training Configuration for Llama-2-7b
|
||||
# Dataset: cyron_summary_lora_dataset (20k examples)
|
||||
|
||||
base_model: /data/models/Ornith-1.0-35B-NVFP4
|
||||
base_model: /data/models/Ornith-1.0-35B
|
||||
model_type: LlamaForCausalLM
|
||||
tokenizer_type: LlamaTokenizer
|
||||
|
||||
|
||||
@@ -32,17 +32,15 @@ def train(config_path):
|
||||
|
||||
print(f"Loading model: {config['base_model']}")
|
||||
|
||||
# Load model and convert to bf16 (remove NVFP4 quantization)
|
||||
# Load bf16 model
|
||||
print(f"Loading model: {config['base_model']}")
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="cpu", # Load to CPU first
|
||||
trust_remote_code=True,
|
||||
# Override any quantization config (NVFP4 -> bf16)
|
||||
_fast_init=False,
|
||||
)
|
||||
print("Model loaded and converted to bf16.")
|
||||
print("Model loaded.")
|
||||
|
||||
# Add LoRA
|
||||
lora_config = LoraConfig(
|
||||
|
||||
Reference in New Issue
Block a user