Back out D34696255 "[pyper] to + lengths_to_offsets" (#74906)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74906
Original commit changeset: a0dc4a8ff8f2
Original Phabricator Diff: D34696255 (https://github.com/pytorch/pytorch/commit/f2ca4341c9008472022227b43d943af3e5e46e81)
Test Plan: New models published can't be served on nnpi
Reviewed By: mikeiovine
Differential Revision: D35214444
fbshipit-source-id: 5691ded93d76074bbe5fe78bb12519389360a69e
(cherry picked from commit 8357a13fd8ffe55bf3577fb13b9b39436e0b67f7)