Hello,
I have spent some time now trying to quantize gpt2-large
and am having trouble. I’m following the example provided here. The process fails when running quantizer.export
The specific error is:
FileNotFoundError: [Errno 2] No such file or directory: '.../transformer.wte.weight'
The error is self-explanatory. Judging by this discussion and the use_external_data_format
flag (given the model is >2GiB), I am meant to be storing the gpt2 weights in transformer.wte.weight,
etc., but I cannot, for the life of me, figure out how to export these files with ORTModelForCausalLM.save_pretrained
.
Should I be pickling model.transformer.wte.weight
, model.transformer.wpe.weight,
etc. manually? I’ve tried loading the model with AutoModel and dumping the required files but no dice; mainly because I can’t dump model weights like transformer.h.0.ln_1.weight
.
Any help would be much appreciated.