modify some style

Former-commit-id: 36bc408b8296cfc6d565b2f968fb1059bc6d1305
This commit is contained in:
BUAADreamer 2024-09-28 01:07:38 +08:00
parent ca86d6361e
commit b2c02df555
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