Languages model optimization