本章节适用于底座大语言模型已经在MindIE LLM模型仓中适配,需要新增适配多模态理解模型所依赖的多模态Encoder模型(如视图理解中的Vit模型)。
我们适配多模态Encoder模型时,需要实现如下四个主要的类,其余依赖方法可自行设计。
入口端适配的类为:
{llm_path}/examples/models/{model}/run_pa.py({model}Runner)
模型端适配的类为:
{llm_path}/atb_llm/models/{model}/router_{model}.py({model}Router)
{llm_path}/atb_llm/models/{model}/config_{model}.py ({model}Config)
{llm_path}/atb_llm/models/{model}/flash_causal_{model}.py ({model}Flash{model}ForCausalLM)