MCPcopy
hub / github.com/fauxpilot/fauxpilot / replace

Function replace

converter/codegen_gptj_convert.py:51–52  ·  view source on GitHub ↗
(model, weights, model_name)

Source from the content-addressed store, hash-verified

49
50
51def replace(model, weights, model_name):
52 model.state_dict()[model_name].copy_(weights.detach())
53
54
55def replace_by_name(dest_model, src_model, old_name, new_name):

Callers 2

replace_by_nameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected