diff --git a/training/scripts/train.py b/training/scripts/train.py index 5850373..7420404 100755 --- a/training/scripts/train.py +++ b/training/scripts/train.py @@ -32,13 +32,14 @@ def train(config_path): print(f"Loading model: {config['base_model']}") - # Load model - let the model's own quantization config handle it - # (Ornith uses CompressedTensors, not BitsAndBytes) - # Load on CPU first, then DeepSpeed will distribute + # Load model in bf16 (fp8 not supported for training) + # Disable quantization config to train full precision model = AutoModelForCausalLM.from_pretrained( config["base_model"], - dtype=torch.bfloat16, - device_map="cpu", # Load on CPU, DeepSpeed distributes + torch_dtype=torch.bfloat16, + device_map="cpu", + quantization_config=None, # Override any fp8 quantization + trust_remote_code=True, ) # Add LoRA