Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/modelscope/modelscope
/ merge
Function
merge
modelscope/preprocessors/ofa/utils/collate.py:16–19 ·
view source on GitHub ↗
(key)
Source
from the content-addressed store, hash-verified
14
return
{}
15
16
def
merge(key):
17
return
collate_tokens([s[key]
for
s in samples],
18
pad_idx,
19
eos_idx=eos_idx)
20
21
batch = {
22
'nsentences'
: len(samples),
Callers
1
collate_fn
Function · 0.85
Calls
1
collate_tokens
Function · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…