mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
add Yi-VL-34B model
Former-commit-id: 8b3d8a7e3bd8dff27cc72edba1b8a042f6d1929c
This commit is contained in:
parent
4d7f0fbb7a
commit
2ac972d6e7
@ -166,7 +166,7 @@ Compared to ChatGLM's [P-Tuning](https://github.com/THUDM/ChatGLM2-6B/tree/main/
|
|||||||
| [StarCoder2](https://huggingface.co/bigcode) | 3B/7B/15B | q_proj,v_proj | - |
|
| [StarCoder2](https://huggingface.co/bigcode) | 3B/7B/15B | q_proj,v_proj | - |
|
||||||
| [XVERSE](https://huggingface.co/xverse) | 7B/13B/65B | q_proj,v_proj | xverse |
|
| [XVERSE](https://huggingface.co/xverse) | 7B/13B/65B | q_proj,v_proj | xverse |
|
||||||
| [Yi (1/1.5)](https://huggingface.co/01-ai) | 6B/9B/34B | q_proj,v_proj | yi |
|
| [Yi (1/1.5)](https://huggingface.co/01-ai) | 6B/9B/34B | q_proj,v_proj | yi |
|
||||||
| [Yi-VL](https://huggingface.co/01-ai) | 6B | q_proj,v_proj | yi_vl |
|
| [Yi-VL](https://huggingface.co/01-ai) | 6B/34B | q_proj,v_proj | yi_vl |
|
||||||
| [Yuan](https://huggingface.co/IEITYuan) | 2B/51B/102B | q_proj,v_proj | yuan |
|
| [Yuan](https://huggingface.co/IEITYuan) | 2B/51B/102B | q_proj,v_proj | yuan |
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
@ -166,7 +166,7 @@ https://github.com/hiyouga/LLaMA-Factory/assets/16256802/ec36a9dd-37f4-4f72-81bd
|
|||||||
| [StarCoder2](https://huggingface.co/bigcode) | 3B/7B/15B | q_proj,v_proj | - |
|
| [StarCoder2](https://huggingface.co/bigcode) | 3B/7B/15B | q_proj,v_proj | - |
|
||||||
| [XVERSE](https://huggingface.co/xverse) | 7B/13B/65B | q_proj,v_proj | xverse |
|
| [XVERSE](https://huggingface.co/xverse) | 7B/13B/65B | q_proj,v_proj | xverse |
|
||||||
| [Yi (1/1.5)](https://huggingface.co/01-ai) | 6B/9B/34B | q_proj,v_proj | yi |
|
| [Yi (1/1.5)](https://huggingface.co/01-ai) | 6B/9B/34B | q_proj,v_proj | yi |
|
||||||
| [Yi-VL](https://huggingface.co/01-ai) | 6B | q_proj,v_proj | yi_vl |
|
| [Yi-VL](https://huggingface.co/01-ai) | 6B/34B | q_proj,v_proj | yi_vl |
|
||||||
| [Yuan](https://huggingface.co/IEITYuan) | 2B/51B/102B | q_proj,v_proj | yuan |
|
| [Yuan](https://huggingface.co/IEITYuan) | 2B/51B/102B | q_proj,v_proj | yuan |
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
@ -1215,6 +1215,9 @@ register_model_group(
|
|||||||
"YiVL-6B-Chat": {
|
"YiVL-6B-Chat": {
|
||||||
DownloadSource.DEFAULT: "BUAADreamer/Yi-VL-6B-hf",
|
DownloadSource.DEFAULT: "BUAADreamer/Yi-VL-6B-hf",
|
||||||
},
|
},
|
||||||
|
"YiVL-34B-Chat": {
|
||||||
|
DownloadSource.DEFAULT: "BUAADreamer/Yi-VL-34B-hf",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
template="yi_vl",
|
template="yi_vl",
|
||||||
vision=True,
|
vision=True,
|
||||||
|
@ -78,8 +78,15 @@ def load_tokenizer(model_args: "ModelArguments") -> "TokenizerModule":
|
|||||||
patch_tokenizer(tokenizer)
|
patch_tokenizer(tokenizer)
|
||||||
|
|
||||||
if model_args.visual_inputs:
|
if model_args.visual_inputs:
|
||||||
processor = AutoProcessor.from_pretrained(model_args.model_name_or_path, **init_kwargs)
|
try:
|
||||||
setattr(processor, "tokenizer", tokenizer)
|
processor = AutoProcessor.from_pretrained(model_args.model_name_or_path, **init_kwargs)
|
||||||
|
setattr(processor, "tokenizer", tokenizer)
|
||||||
|
except Exception:
|
||||||
|
raise ValueError(
|
||||||
|
"This multimodal LLM is not supported.\n"
|
||||||
|
"Download LLaVA-1.5 models from: https://huggingface.co/llava-hf\n"
|
||||||
|
"Download Yi-VL models from: https://huggingface.co/BUAADreamer"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
processor = None
|
processor = None
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class LlavaMultiModalProjectorForYiVLForVLLM(LlavaMultiModalProjectorForYiVL):
|
|||||||
self.linear_2 = torch.nn.LayerNorm(text_hidden_size, bias=True)
|
self.linear_2 = torch.nn.LayerNorm(text_hidden_size, bias=True)
|
||||||
self.linear_3 = torch.nn.Linear(text_hidden_size, text_hidden_size, bias=True)
|
self.linear_3 = torch.nn.Linear(text_hidden_size, text_hidden_size, bias=True)
|
||||||
self.linear_4 = torch.nn.LayerNorm(text_hidden_size, bias=True)
|
self.linear_4 = torch.nn.LayerNorm(text_hidden_size, bias=True)
|
||||||
self.act = torch.nn.GELU()
|
self.act = ACT2FN[projector_hidden_act]
|
||||||
|
|
||||||
|
|
||||||
def autocast_projector_dtype(
|
def autocast_projector_dtype(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user