fix: disable quantization config for fp8 model training
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user