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

Function move_to

eval/run_predict_minicpm.py:63–70  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

61 _tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
62
63def move_to(device):
64 global _llm,_tokenizer
65 if _llm is None:
66 raise ValueError("Error, LLM is not initialized.")
67 _llm = _llm.to(device)
68 if _tokenizer is None:
69 raise ValueError("Error, Tokenizer is not initialized.")
70 return f"Moved to {device}"
71
72
73def run_episode(episode, msg,):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected