Export to HF
Convert Mammoth checkpoint to HuggingFace format
usage: mammoth_export_hf [-h] --checkpoint-dir CHECKPOINT_DIR --output-dir
OUTPUT_DIR [--task TASK] [--step STEP]
[--modular | --standalone | --single-artifact]
Named Arguments
- --checkpoint-dir
Directory containing Mammoth shard files
- --output-dir
Output directory. With –standalone on a multi-task checkpoint, one subdirectory per task is created (e.g. eng-spa/, eng-fra/).
- --task
With –standalone: convert only this src-tgt pair (e.g. ‘eng-spa’). Default: convert every task found in the checkpoint.
- --step
Load a specific checkpoint step (e.g. –step 500). Default: best checkpoint, or last step if no best exists.
- --modular
Default. Export each Mammoth component (embeddings, layer stacks, wrappers) once; models are assembled per task at load time by MammothHub.
Default:
False- --standalone
Export each task as a separate, standalone HF model.
Default:
False- --single-artifact
Bundle all tasks into a single HF directory with per-task shards.
Default:
False