(model_name)
| 54 | _tokenizer = None |
| 55 | |
| 56 | def _init_llm(model_name): |
| 57 | global _llm,_tokenizer |
| 58 | if _llm is None: |
| 59 | _llm = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True,torch_dtype=torch.bfloat16) |
| 60 | if _tokenizer is None: |
| 61 | _tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) |
| 62 | |
| 63 | def move_to(device): |
| 64 | global _llm,_tokenizer |
nothing calls this directly
no outgoing calls
no test coverage detected