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

Function append_str_prefix

quantization/clip_utils.py:129–137  ·  view source on GitHub ↗
(x, prefix)

Source from the content-addressed store, hash-verified

127 return layers
128
129def append_str_prefix(x, prefix):
130 if isinstance(x, str):
131 return prefix + x
132 elif isinstance(x, tuple):
133 return tuple([append_str_prefix(y, prefix) for y in x])
134 elif isinstance(x, list):
135 return [append_str_prefix(y, prefix) for y in x]
136 else:
137 return x
138
139def move_embed(model, device):
140 if isinstance(model, LlamaForCausalLM):

Callers 2

run_awqFunction · 0.85
run_clipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected