mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-10-24 06:28:07 +08:00
T5: Change default dtype to bfloat16 (#147)
* T5: Change default to bfloat16 * Add myself to contributors * t5: Change convert.py default to float32
This commit is contained in:
4
t5/t5.py
4
t5/t5.py
@@ -337,7 +337,7 @@ class Tokenizer:
|
||||
self._tokenizer = T5Tokenizer.from_pretrained(
|
||||
args.model,
|
||||
legacy=False,
|
||||
model_max_length=config.n_positions,
|
||||
model_max_length=getattr(config, 'n_positions', 512)
|
||||
)
|
||||
|
||||
@property
|
||||
@@ -430,7 +430,7 @@ if __name__ == "__main__":
|
||||
help="The model data type.",
|
||||
type=str,
|
||||
choices=["float16", "bfloat16", "float32"],
|
||||
default="float32",
|
||||
default="bfloat16",
|
||||
)
|
||||
|
||||
parser.add_argument("--seed", type=int, default=0, help="The PRNG seed")
|
||||
|
||||
Reference in New Issue
Block a user