AWS Trainium & Inferentia 文件

Inferentia Exporter

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

Inferentia Exporter

您可以使用 🤗 Optimum 將 PyTorch 模型匯出到 Neuron,以便在 AWS Inferentia 1Inferentia 2 上執行推理。

匯出函式

每一代 Inferentia 加速器都有一個匯出函式,INF1 上使用 export_neuron,INF2 上使用 export_neuronx。但您將能夠直接使用匯出函式 export,它會根據環境選擇正確的匯出函式。

此外,您可以透過 validate_model_outputs 檢查匯出的模型是否有效,該函式會將已編譯模型在 Neuron 裝置上的輸出與 PyTorch 模型在 CPU 上的輸出進行比較。

© . This site is unofficial and not affiliated with Hugging Face, Inc.