I've trained a version of DistilBertForMaskedLM and am trying to convert it to CoreML. The only way I adapted the script, so far, was to remove the custom_conversion_functions={"Softmax": _convert_softmax} option in the convert() function, since I just want the predictions out, but it exits with a Segmentation Fault. The last few lines of the trace appear to just indicate the completion of the onnx export:
I'm guessing that maybe the final layers of DistilBertForMaskedLM need custom functions (vocab_transform, vocab_layer_norm, and vocab_projector)?
Any help/tips greatly appreciated.
UPDATE: Looking into DistilBertForMaskedLM, I decided to try just exporting the underlying model using model = model.distilbert, but I get the same Segmentation Fault.
UPDATE 2: Oh, gulp... Wait, I'm running this on my Ubuntu machine (where I do the training). Probably the issue... (Confirmed.)
I've trained a version of DistilBertForMaskedLM and am trying to convert it to CoreML. The only way I adapted the script, so far, was to remove the
custom_conversion_functions={"Softmax": _convert_softmax}
option in theconvert()
function, since I just want the predictions out, but it exits with a Segmentation Fault. The last few lines of the trace appear to just indicate the completion of the onnx export:I'm guessing that maybe the final layers of DistilBertForMaskedLM need custom functions (
vocab_transform
,vocab_layer_norm
, andvocab_projector
)?Any help/tips greatly appreciated.
UPDATE: Looking into DistilBertForMaskedLM, I decided to try just exporting the underlying model using
model = model.distilbert
, but I get the same Segmentation Fault.UPDATE 2: Oh, gulp... Wait, I'm running this on my Ubuntu machine (where I do the training). Probably the issue... (Confirmed.)