I would suggest to separate training machine and API machine, just sync trained data. In this way, a GPU used to train model is not resource limited.
The architecture is like
AI machine-----API machine-------Relay Gateway-------Relay.
The relay transfer events and spam label to AI machine for learning.
The AI machine transfer trained model/data to API machine for spam score.
The relay gateway send events to API for prediction, and get response of pubkey should be denied from API machine.
The relay gateway examine pubkey like if it is paid pubkey.