PyBridge 1.3.0 not loading on Apple Silicon
Closed this issue · 2 comments
NiklasGustafsson commented
I'm seeing this:
% dotnet run
Loading Phi2 from huggingface model weight folder
Unhandled exception. System.BadImageFormatException: Could not load file or assembly 'TorchSharp.PyBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.
File name: 'TorchSharp.PyBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'
at PhiForCasualLM.FromPretrained(String modelFolder, String configName, String checkPointName, ScalarType defaultDType, String device)
at Program.<Main>$(String[] args) in Torchsharp-phi/Program.cs:line 28
%
shaltielshmid commented
Great catch! The package wasn't targeting the arm64
platform and therefore wasn't being recognized.
Should be fixed with 00d739e, uploaded to NuGet as version 1.3.1
NiklasGustafsson commented
Fix verified.