Anthropic AI safety researcher Mrinank Sharma has resigned from his post as he believes that "the world is in peril".