Consistent and efficient long document understanding