Learn how to use the Model Zoo conversion scripts to convert to Hugging Face.
convert_checkpoint.py
, activate the Cerebras virtual environment and specify the following flags:Flag | Description |
---|---|
--model gpt2 | Model architecture the checkpoint corresponds to |
--src-fmt cs-1.8 | the source format of the checkpoint corresponding to Cerebras Model Zoo(R1.8) |
--tgt-fmt hf | Target format of the checkpoint corresponding to Hugging Face |
--config custom_config_GPT111M.yaml | yaml file configuration used for training the model |
--output-dir hf_dir_train_from_scratch_GPT111M | Directory containing the output configuration and checkpoint |