huggingface / optimum-neuron

Easy, fast and very cheap training and inference on AWS Trainium and Inferentia chips.
Apache License 2.0
176 stars 53 forks source link

optimum-cli does not support exporting to Neuron by default in HF DL AMI v20240318 #532

Open mlopezr opened 3 months ago

mlopezr commented 3 months ago

System Info

The Hugging Face Deep Learning AMI v20240318 ships with optimum-1.17.1 and optimum-neuron-0.0.20.dev0

Who can help?

No response

Information

Tasks

Reproduction (minimal, reproducible, runnable)

  1. Launch an inf2.24xlarge instance with Hugging Face Deep Learning AMI v20240318 in us-east-1 (AMI ID ami-0d608117d5f482a2f).
  2. Run optimum-cli export neuron --help:
    $ optimum-cli export neuron --help
    usage: optimum-cli export [-h] {onnx,tflite} ...
    optimum-cli export: error: invalid choice: 'neuron' (choose from 'onnx', 'tflite')
  3. To solve it, run pip uninstall optimum optimum-neuron (which uninstalled optimum-1.17.1 and optimum-neuron-0.0.20.dev0) and then pip install optimum[neuronx] (which installs libneuronxla-0.5.669 optimum-1.18.0 optimum-neuron-0.0.18 torch-neuronx-1.13.1.1.13.0 transformers-neuronx-0.9.474)

Expected behavior

I would expect optimum-cli export neuron --help to work out of the box in the latest HF DLAMI.