The Magic Initiate feat gives access to two cantrips from a class. It says
Choose a class: bard, cleric, druid, sorcerer, warlock, or wizard. You learn two cantrips of your choice from that class's spell list.
It also says
Your spellcasting ability for these spells depends on the class you chose: Charisma for bard, sorcerer, or warlock: Wisdom for cleric or druid; or Intelligence for Wizard.
I assume that spell attacks worked the same way - i.e. so if I chose Sorcerer and had a +2 charisma modifier and a +3 Proficiency Bonus, then if I Fire Bolt someone then the spell attack bonus would be +5 versus AC.
However, cantrips scale up with your level. Fire Bolt says
This spell's damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).
So if I'm a Level 5 Rogue (not Arcane Trickster), then does a Fire Bolt I cast deal 2d10 damage on a hit?