modify some style

Former-commit-id: 1b21793543f4a03252e81a86e06ec91fd2a51fa5
This commit is contained in:
BUAADreamer 2024-09-28 01:07:38 +08:00
parent 3501257780
commit 7ab42cb582
2 changed files with 0 additions and 3 deletions

View File

@ -294,14 +294,12 @@ class LlavaNextPlugin(BasePlugin):
if processor.vision_feature_select_strategy == "default":
image_seqlen -= 1
num_image_tokens += 1
print(image_seqlen)
content = content.replace(self.image_token, "{{image}}" * image_seqlen, 1)
message['content'] = content.replace("{{image}}", self.image_token)
if len(images) != num_image_tokens:
raise ValueError("The number of images does not match the number of {} tokens".format(IMAGE_PLACEHOLDER))
print(messages)
return messages
@override

View File

@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import copy
import os
from typing import TYPE_CHECKING, Any, Dict, List, Sequence, Tuple