What is the difference between tokenizer.eos_token_id, model.config.eos_token_id and model.generation_config.eos_token_id?

Can someone explain what the difference between tokenizer.eos_token_id, model.config.eos_token_id and model.generation_config.eos_token_id is in models like Llama, GPT2 and so on? The same question applies to bos and pad tokens as well. Why do we need to define 3 different eos tokens?