Transformers Compatibility
Transformers export compatibility
This document describes the compatibility rules for the CLI command:
frankenstein-transformer transformers-export --model <checkpoint.pt> --yaml <train.yaml> --output <output_dir>
Integrated --transformers-export flag
The same --transformers-export flag is available in other CLI commands.
train --transformers-exportPerforms a compatibility pre-check using the resolved training YAML.
If compatible, exports to
checkpoints/transformers-export/after successful training.
deploy --transformers-export --yaml <train.yaml>Performs compatibility pre-check before deploy.
On success, exports to
<deploy-output>/transformers-export/.
quantize --transformers-export --yaml <train.yaml>Performs compatibility pre-check before quantization.
On success, exports to
<quantize-output>/transformers-export/.
Unsupported with this flag (returns error and stops): infer, sbert-train, sbert-infer.
Export output layout
When compatible, the command creates:
config.json(Transformers config withauto_map)pytorch_model.bin(weights)configuration_frankenstein.py(customPretrainedConfig)modeling_frankenstein.py(customPreTrainedModelwrappers)model/(Frankenstein architecture source copied fromsrc/model/)__init__.pycompatibility_report.jsonexport_info.json
Compatibility matrix
High-level training/task compatibility
Input setting |
Compatible |
Notes |
|---|---|---|
|
✅ |
Exported as |
|
✅ |
Exported as |
|
❌ |
Not exported by this command (SBERT wrapper is not an AutoModel LM head). |
|
❌ |
Command does not export base-model fine-tune configs for this custom architecture wrapper. |
layer_pattern compatibility (from src/schema.yaml enum)
All schema-declared layer types are recognized by the exporter.
Special case:
fasa_attn,sparge_attn: exported for inference, but they are eval-only layers for training.
If a checkpoint/YAML includes layer types outside the schema enum, the command marks the export as incompatible and writes details to compatibility_report.json.