If you're concerned, you should switch the license of your code, not really where you host it. As long as your license allows LLM/AI models to train on your code, why would you be mad that it does?
Training on your code and using your code are very different things. As a human, if your code is open, I can read it, learn how it works and reuse my knowledge to create proprietary source code without infringing on your license.
Attribution doesn’t apply on training. We’d all be screwed otherwise, it would mean you’d have to attribute everything you learned while reading open source codes to every codebase you read every time you write code.
As I said: it would mean you’d have to attribute everything you learned while reading open source codes to every codebase you read every time you write code.