The attack happened at a student hostel away from the Federal Polytechnic Mubi campus, the source said.
A lecturer told the BBC that more than 40 students had been killed but there has been no official comment.
The reported killing comes days after a major operation against the Boko Haram militant group in the town.
The lecturer, who did not want his name to be used, told the BBC’s Hausa service that the students were asked to say their names after lining up.
He says it is not clear why some were killed and others spared – some of those killed were Muslims.
“Everybody is scared and staying indoors now,” he said.
He added that students were now leaving the town – they have draped tree branches over their cars, which is a traditional sign of neutrality in Nigeria.