MCPcopy
hub / github.com/XPixelGroup/DiffBIR / insert_separator

Function insert_separator

llava/mm_utils.py:188–189  ·  view source on GitHub ↗
(X, sep)

Source from the content-addressed store, hash-verified

186 prompt_chunks = [tokenizer(chunk).input_ids for chunk in prompt.split('<image>')]
187
188 def insert_separator(X, sep):
189 return [ele for sublist in zip(X, [sep]*len(X)) for ele in sublist][:-1]
190
191 input_ids = []
192 offset = 0

Callers 1

tokenizer_image_tokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected