Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/maxtext/checkpoint_conversion/to_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@
"the instruction-tuned one).",
)

flags.DEFINE_integer(
"parallel_threads",
4,
"Number of threads used for parallel saving of weights. Lower this value to reduce peak host RAM usage.",
)
flags.register_validator(
"parallel_threads",
lambda value: value > 0,
message="--parallel_threads must be a positive integer.",
)

FLAGS = flags.FLAGS
Comment thread
chiajunglien marked this conversation as resolved.


Expand Down Expand Up @@ -453,14 +442,7 @@ def _transform_and_save_weights(
raise ValueError("Error: No weights were transformed. Check mappings and parameter paths.")

max_logging.log("\nSaving HuggingFace model...")
save_model_files(
transformed_hf_weights,
hf_config_obj,
tokenizer,
processor,
output_directory,
parallel_threads=FLAGS.parallel_threads,
)
save_model_files(transformed_hf_weights, hf_config_obj, tokenizer, processor, output_directory)
max_logging.log(f"✅ MaxText model successfully saved in HuggingFace format at {output_directory}")

max_logging.log(f"Elapse for transform and save: {(time.time() - start) / 60:.2f} min")
Expand Down
Loading