KangLiao commited on
Commit
3e77ea4
·
1 Parent(s): 03c345f
configs/models/qwen2_5_1_5b_radio_sd3_dynamic_puffin.py CHANGED
@@ -6,7 +6,7 @@ from src.models.radiov3.hf_model import RADIOModel
6
  from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler
7
  from transformers import AutoModelForCausalLM, AutoTokenizer
8
 
9
- llm_name_or_path = 'configs/qwen2.5'
10
  sd3_model_name_or_path = "configs/sd3"
11
  radiov3_model_name_or_path = "configs/radiov3"
12
 
@@ -69,17 +69,14 @@ model = dict(type=Qwen2p5RadioStableDiffusion3HFDynamic,
69
  freeze_visual_encoder=True,
70
  freeze_llm=True,
71
  llm=dict(
72
- type=AutoModelForCausalLM.from_config,
73
  pretrained_model_name_or_path=llm_name_or_path,
74
  torch_dtype=torch.bfloat16,
75
- #local_files_only=True,
76
- #attn_implementation='flash_attention_2',
77
  ),
78
  tokenizer=dict(
79
- type=AutoTokenizer.from_config,
80
- pretrained_model_name_or_path=llm_name_or_path,
81
- #local_files_only=True,
82
- ),
83
  prompt_template=prompt_template,
84
  pretrained_pth=None,
85
  use_activation_checkpointing=False,
 
6
  from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler
7
  from transformers import AutoModelForCausalLM, AutoTokenizer
8
 
9
+ llm_name_or_path = 'Qwen/Qwen2.5-1.5B-Instruct'
10
  sd3_model_name_or_path = "configs/sd3"
11
  radiov3_model_name_or_path = "configs/radiov3"
12
 
 
69
  freeze_visual_encoder=True,
70
  freeze_llm=True,
71
  llm=dict(
72
+ type=AutoModelForCausalLM.from_pretrained,
73
  pretrained_model_name_or_path=llm_name_or_path,
74
  torch_dtype=torch.bfloat16,
75
+ attn_implementation='flash_attention_2',
 
76
  ),
77
  tokenizer=dict(
78
+ type=AutoTokenizer.from_pretrained,
79
+ pretrained_model_name_or_path=llm_name_or_path),
 
 
80
  prompt_template=prompt_template,
81
  pretrained_pth=None,
82
  use_activation_checkpointing=False,