File size: 566 Bytes
324ecd2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """Compile the bundled ROM into a standalone, stock Transformers checkpoint."""
import argparse
from pathlib import Path
from beamboot.causal_lm import CausalMachine
from beamboot.os import firmware
def main():
parser = argparse.ArgumentParser()
parser.add_argument('output', type=Path, help='output directory for config and safetensors')
args = parser.parse_args()
model = CausalMachine(firmware()[0])
model.save_pretrained(args.output)
print(f'Saved constructed Beam Boot checkpoint to {args.output}')
if __name__ == '__main__': main()
|