mirror of
https://github.com/RYDE-WORK/lnp_ml.git
synced 2026-07-22 05:49:55 +08:00
Compare commits
No commits in common. "182f7853d714e1e14edcbaebc2c700d07b1fdf81" and "33fe637364b9ff8fd0b26553c1fa9c6e8acd8460" have entirely different histories.
182f7853d7
...
33fe637364
@ -25,7 +25,7 @@ DEFAULT_INPUT_DIMS = {
|
||||
"mpnn": 600, # D-MPNN embedding
|
||||
"morgan": 1024, # Morgan fingerprint
|
||||
"maccs": 167, # MACCS keys
|
||||
"desc": 217, # RDKit descriptors
|
||||
"desc": 210, # RDKit descriptors
|
||||
# Channel B: 配方/实验条件
|
||||
"comp": 5, # 配方比例
|
||||
"phys": 12, # 物理参数 one-hot
|
||||
|
||||
@ -55,13 +55,6 @@ def load_model(
|
||||
fusion_strategy=config["fusion_strategy"],
|
||||
head_hidden_dim=config["head_hidden_dim"],
|
||||
dropout=config["dropout"],
|
||||
use_llm=config.get("use_llm", False),
|
||||
llm_model_path=config.get("llm_model_path", "models/molt5-base"),
|
||||
llm_freeze=config.get("llm_freeze", True),
|
||||
llm_use_lora=config.get("llm_use_lora", False),
|
||||
llm_lora_r=config.get("llm_lora_r", 8),
|
||||
llm_lora_alpha=config.get("llm_lora_alpha", 16),
|
||||
llm_lora_dropout=config.get("llm_lora_dropout", 0.05),
|
||||
mpnn_ensemble_paths=ensemble_paths,
|
||||
mpnn_device=mpnn_device,
|
||||
)
|
||||
@ -73,16 +66,9 @@ def load_model(
|
||||
fusion_strategy=config["fusion_strategy"],
|
||||
head_hidden_dim=config["head_hidden_dim"],
|
||||
dropout=config["dropout"],
|
||||
use_llm=config.get("use_llm", False),
|
||||
llm_model_path=config.get("llm_model_path", "models/molt5-base"),
|
||||
llm_freeze=config.get("llm_freeze", True),
|
||||
llm_use_lora=config.get("llm_use_lora", False),
|
||||
llm_lora_r=config.get("llm_lora_r", 8),
|
||||
llm_lora_alpha=config.get("llm_lora_alpha", 16),
|
||||
llm_lora_dropout=config.get("llm_lora_dropout", 0.05),
|
||||
)
|
||||
|
||||
model.load_state_dict(checkpoint["model_state_dict"], strict=False)
|
||||
model.load_state_dict(checkpoint["model_state_dict"])
|
||||
model.to(device)
|
||||
model.eval()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user