I think that’s really a PHP question more than a PyTorch one, so this forum might not be the ideal venue…
That said, you might consider implementing a flask or similar server 56 for your PyTorch model and connect to that from PHP.
Best regards
Thomas