Update synthetic.py
This commit is contained in:
parent
36ba3c7c69
commit
6a65ee478c
1 changed files with 7 additions and 0 deletions
|
|
@ -81,6 +81,13 @@ class SyntheticDataKit:
|
|||
print(engine_args)
|
||||
if "dtype" in engine_args:
|
||||
dtype_val = engine_args["dtype"]
|
||||
dtype_mapping = {
|
||||
torch.float16 : "float16",
|
||||
torch.bfloat16 : "bfloat16",
|
||||
torch.float32 : "float32",
|
||||
}
|
||||
if dtype_val in dtype_mapping:
|
||||
dtype_val = dtype_mapping[dtype_val]
|
||||
# Convert torch.bfloat16, torch.float16, etc. to valid CLI string
|
||||
if hasattr(dtype_val, "name"):
|
||||
engine_args["dtype"] = dtype_val.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue