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']}")
|
print(f"Loading model: {config['base_model']}")
|
||||||
|
|
||||||
# Load model - let the model's own quantization config handle it
|
# Load model in bf16 (fp8 not supported for training)
|
||||||
# (Ornith uses CompressedTensors, not BitsAndBytes)
|
# Disable quantization config to train full precision
|
||||||
# Load on CPU first, then DeepSpeed will distribute
|
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
config["base_model"],
|
config["base_model"],
|
||||||
dtype=torch.bfloat16,
|
torch_dtype=torch.bfloat16,
|
||||||
device_map="cpu", # Load on CPU, DeepSpeed distributes
|
device_map="cpu",
|
||||||
|
quantization_config=None, # Override any fp8 quantization
|
||||||
|
trust_remote_code=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add LoRA
|
# Add LoRA
|
||||||
|
|||||||
Reference in New Issue
Block a user