Learn how to convert Hugging Face models to the Cerebras Model Zoo format, enabling seamless deployment and optimization on Cerebras’s advanced hardware.
BertForPretraining
class as an example. You’ll download the checkpoint and config files, convert the checkpoint, verify the output, and then use the newly converted model.
BertForPreTraining
:
bert_checkpoint
directory:
<modelzoo path>
with the actual path to the Model Zoo directory on your system.
bert_checkpoint
directory for the output files:
pytorch_model_to_cs-2.0.mdl
: The converted model checkpoint.
config_to_cs-2.0.yaml
: The converted configuration file.
--model bert
with the appropriate model flag.