MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / _collate

Method _collate

test/general/lm_eval/models/gpt3.py:120–125  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

118 res = []
119
120 def _collate(x):
121 # this doesn't efficiently handle last-token differences yet, but those are kinda annoying because
122 # it's not guaranteed that the 100 or so logprobs we get to see actually contain all the continuations
123 # we care about and so we need some kind of backup for when it isn't
124 toks = x[1] + x[2]
125 return -len(toks), tuple(toks)
126
127 re_ord = utils.Reorderer(requests, _collate)
128

Callers

nothing calls this directly

Calls 1

tok_encodeMethod · 0.95

Tested by

no test coverage detected