convert-pth-to-ggml.py 527 B

12345678910111213
  1. # Compatibility stub
  2. import argparse
  3. import convert
  4. parser = argparse.ArgumentParser(
  5. description="""[DEPRECATED - use `convert.py` instead]
  6. Convert a LLaMA model checkpoint to a ggml compatible file""")
  7. parser.add_argument('dir_model', help='directory containing the model checkpoint')
  8. parser.add_argument('ftype', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1)
  9. args = parser.parse_args()
  10. convert.main(['--outtype', 'f16' if args.ftype == 1 else 'f32', '--', args.dir_model])