The military says it has driven most of the Taliban from the valley , but sporadic fighting persists .