LB7 (01-04.5) 300hp/520lbft - 5 speed
They used the LLY mid year 2004
8th digit is 1 = LB7
8th digit is 2 = LLY
LLY (04.5-05) 305hp/605lbft - 5 speed
Only engine offered in 2005
8th digit is 2
LBZ (06-07.5) 360hp/650lbft - 6 speed
They did make a 06 LLY, however it is LBZ hardware, with different software to tune back the power.
8th digit is a 2 = LLY
8th digit is a D = LBZ
LMM (07.5-10) 365hp/660lbft - 6 speed
8th digit is a 6
LML (11-13) 397hp/765lbft - 6 speed
8th digit is a 8
You can tell if the truck has the 6 speed auto tranny but looking at the gear selector, it will have the manual mode "tap shift" buttons.
As for tuning if your planning on upgrades (exhaust, EGR delete, tuner/EFI LIVE) I would go with an LBZ engine or older. With the 2007.5+ trucks there are more emissions equipment to deal with & if you live in a OBD II emisson testing state, altering the emissions will cause your truck to fail inspection.