fix: preserve NVFP4 quantization, don't force bf16
This commit is contained in:
@@ -32,14 +32,11 @@ def train(config_path):
|
|||||||
|
|
||||||
print(f"Loading model: {config['base_model']}")
|
print(f"Loading model: {config['base_model']}")
|
||||||
|
|
||||||
# Load model in bf16 (fp8 not supported for training)
|
# Load model - preserve NVFP4 quantization
|
||||||
# Disable quantization config to train full precision
|
|
||||||
# Use device_map="auto" to distribute across GPUs from the start
|
# Use device_map="auto" to distribute across GPUs from the start
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
config["base_model"],
|
config["base_model"],
|
||||||
torch_dtype=torch.bfloat16,
|
|
||||||
device_map="auto", # Distribute across GPUs
|
device_map="auto", # Distribute across GPUs
|
||||||
quantization_config=None, # Override any fp8 quantization
|
|
||||||
trust_remote_code=True,
|
trust_remote_code=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user