Tesla shares rise 8% despite loss, as company ramps up production