MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / move_to

Function move_to

eval/run_predict_odyssey.py:64–71  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

62
63
64def move_to(device):
65 global _llm,_tokenizer
66 if _llm is None:
67 raise ValueError("Error, LLM is not initialized.")
68 _llm = _llm.to(device)
69 if _tokenizer is None:
70 raise ValueError("Error, Tokenizer is not initialized.")
71 return f"Moved to {device}"
72
73# ======= Preprocessing: Merge Model
74def merge_weight():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected