MCPcopy
hub / github.com/InternLM/lmdeploy / export

Method export

lmdeploy/turbomind/model_loader.py:50–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 )
49
50 def export(self):
51 ckpt = create_checkpoint(
52 self.model_path,
53 mappings=getattr(self.model, '_loader_mappings', []))
54 try:
55 self.model.model(Prefix(ckpt))
56 finally:
57 ckpt.close()
58 torch.cuda.empty_cache()
59
60 def export_iter(self):
61 ckpt = create_checkpoint(

Callers 1

__init__Method · 0.45

Calls 4

create_checkpointFunction · 0.85
PrefixClass · 0.85
modelMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected