"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "3e07196f896946f084ce65db852869981c533a98"
Unverified Commit aa64f086 authored by Marc Sun's avatar Marc Sun Committed by GitHub
Browse files

Fix llava next tie_word_embeddings config (#30640)



* fix llava next embedding

* add docstring

* Update src/transformers/models/llava_next/configuration_llava_next.py
Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>

---------
Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
parent 9c772ac8
...@@ -55,6 +55,8 @@ class LlavaNextConfig(PretrainedConfig): ...@@ -55,6 +55,8 @@ class LlavaNextConfig(PretrainedConfig):
image_grid_pinpoints (`List`, *optional*, defaults to `[[336, 672], [672, 336], [672, 672], [1008, 336], [336, 1008]]`): image_grid_pinpoints (`List`, *optional*, defaults to `[[336, 672], [672, 336], [672, 672], [1008, 336], [336, 1008]]`):
A list of possible resolutions to use for processing high resolution images. Each item in the list should be a tuple or list A list of possible resolutions to use for processing high resolution images. Each item in the list should be a tuple or list
of the form `(height, width)`. of the form `(height, width)`.
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
Whether the model's input and output word embeddings should be tied.
Example: Example:
...@@ -90,6 +92,7 @@ class LlavaNextConfig(PretrainedConfig): ...@@ -90,6 +92,7 @@ class LlavaNextConfig(PretrainedConfig):
vision_feature_select_strategy="default", vision_feature_select_strategy="default",
vision_feature_layer=-2, vision_feature_layer=-2,
image_grid_pinpoints=None, image_grid_pinpoints=None,
tie_word_embeddings=False,
**kwargs, **kwargs,
): ):
self.ignore_index = ignore_index self.ignore_index = ignore_index
...@@ -138,4 +141,4 @@ class LlavaNextConfig(PretrainedConfig): ...@@ -138,4 +141,4 @@ class LlavaNextConfig(PretrainedConfig):
self.text_config = text_config self.text_config = text_config
super().__init__(**kwargs) super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment