Custom activation function


I’m new to huggingface (not new to deep learning).
In short: Is it possible to use a custom activation function with existing models?
For example, I noticed that for GPT2 you can specify activation function with a string parameter.
But I want to use my own activation function. Is there a clean way for doing that?

Thanks in advance.