()
| 44 | |
| 45 | gpu_id = 4 |
| 46 | def init_model_my(): |
| 47 | logging.basicConfig(level=logging.DEBUG, |
| 48 | format='%(asctime)s %(levelname)s %(message)s') |
| 49 | config_path = "conf/config_llm_huawei_base-version.yaml" |
| 50 | checkpoint_path = "***" |
| 51 | args = GxlNode({ |
| 52 | "checkpoint": checkpoint_path, |
| 53 | }) |
| 54 | configs = utils_file.load_dict_from_yaml(config_path) |
| 55 | model, configs = init_model(args, configs) |
| 56 | model = model.cuda(gpu_id) |
| 57 | tokenizer = init_tokenizer(configs) |
| 58 | print(model) |
| 59 | return model, tokenizer |
| 60 | |
| 61 | model, tokenizer = init_model_my() |
| 62 |
no test coverage detected