GPT-2 and GPT-3 are the same algorithm based on the same open source library. GPT-4 most likely is as well. You can literally fork the repo and if you have enough VRAM, cuda cores, and time, you will get GPT-4. High Schoolers could do it. Amateurs are already replicating LLaMA, which is more complex than GPT and not even a month old. (it's just smaller = fewer GPUs required)