fix: minor
Browse files- src/__pycache__/__init__.cpython-310.pyc +0 -0
- src/__pycache__/constants.cpython-310.pyc +0 -0
- src/__pycache__/conversation.cpython-310.pyc +0 -0
- src/__pycache__/utils.cpython-310.pyc +0 -0
- src/conversation.py +2 -2
- src/model/__pycache__/__init__.cpython-310.pyc +0 -0
- src/model/__pycache__/compression.cpython-310.pyc +0 -0
- src/model/__pycache__/llama_condense_monkey_patch.cpython-310.pyc +0 -0
- src/model/__pycache__/model_adapter.cpython-310.pyc +0 -0
- src/model/__pycache__/model_chatglm.cpython-310.pyc +0 -0
- src/model/__pycache__/model_cllm.cpython-310.pyc +0 -0
- src/model/__pycache__/model_codet5p.cpython-310.pyc +0 -0
- src/model/__pycache__/model_exllama.cpython-310.pyc +0 -0
- src/model/__pycache__/model_falcon.cpython-310.pyc +0 -0
- src/model/__pycache__/model_registry.cpython-310.pyc +0 -0
- src/model/__pycache__/model_xfastertransformer.cpython-310.pyc +0 -0
- src/model/__pycache__/model_yuan2.cpython-310.pyc +0 -0
- src/model/__pycache__/monkey_patch_non_inplace.cpython-310.pyc +0 -0
- src/modules/__pycache__/__init__.cpython-310.pyc +0 -0
- src/modules/__pycache__/awq.cpython-310.pyc +0 -0
- src/modules/__pycache__/exllama.cpython-310.pyc +0 -0
- src/modules/__pycache__/gptq.cpython-310.pyc +0 -0
- src/modules/__pycache__/xfastertransformer.cpython-310.pyc +0 -0
- src/serve/__pycache__/__init__.cpython-310.pyc +0 -0
- src/serve/__pycache__/api_provider.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_web_server.cpython-310.pyc +0 -0
- src/serve/__pycache__/remote_logger.cpython-310.pyc +0 -0
- src/serve/gradio_web_server.py +1 -1
src/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/src/__pycache__/__init__.cpython-310.pyc and b/src/__pycache__/__init__.cpython-310.pyc differ
|
|
src/__pycache__/constants.cpython-310.pyc
CHANGED
Binary files a/src/__pycache__/constants.cpython-310.pyc and b/src/__pycache__/constants.cpython-310.pyc differ
|
|
src/__pycache__/conversation.cpython-310.pyc
CHANGED
Binary files a/src/__pycache__/conversation.cpython-310.pyc and b/src/__pycache__/conversation.cpython-310.pyc differ
|
|
src/__pycache__/utils.cpython-310.pyc
CHANGED
Binary files a/src/__pycache__/utils.cpython-310.pyc and b/src/__pycache__/utils.cpython-310.pyc differ
|
|
src/conversation.py
CHANGED
@@ -165,10 +165,10 @@ class Conversation:
|
|
165 |
ret += ""
|
166 |
for i, (role, message) in enumerate(self.messages):
|
167 |
if message:
|
168 |
-
logger.info("msg={}", message)
|
169 |
if type(message) is tuple:
|
170 |
message, images = message
|
171 |
-
message = "<image>" * len(images) + message
|
172 |
ret += f"<|start_header_id|>{role}<|end_header_id|>\n\n"
|
173 |
ret += f"{message.strip()}<|eot_id|>"
|
174 |
else:
|
|
|
165 |
ret += ""
|
166 |
for i, (role, message) in enumerate(self.messages):
|
167 |
if message:
|
168 |
+
logger.info("msg = {}", message)
|
169 |
if type(message) is tuple:
|
170 |
message, images = message
|
171 |
+
message = "<image>" * len(images) + "\n" + message
|
172 |
ret += f"<|start_header_id|>{role}<|end_header_id|>\n\n"
|
173 |
ret += f"{message.strip()}<|eot_id|>"
|
174 |
else:
|
src/model/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/__init__.cpython-310.pyc and b/src/model/__pycache__/__init__.cpython-310.pyc differ
|
|
src/model/__pycache__/compression.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/compression.cpython-310.pyc and b/src/model/__pycache__/compression.cpython-310.pyc differ
|
|
src/model/__pycache__/llama_condense_monkey_patch.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/llama_condense_monkey_patch.cpython-310.pyc and b/src/model/__pycache__/llama_condense_monkey_patch.cpython-310.pyc differ
|
|
src/model/__pycache__/model_adapter.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_adapter.cpython-310.pyc and b/src/model/__pycache__/model_adapter.cpython-310.pyc differ
|
|
src/model/__pycache__/model_chatglm.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_chatglm.cpython-310.pyc and b/src/model/__pycache__/model_chatglm.cpython-310.pyc differ
|
|
src/model/__pycache__/model_cllm.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_cllm.cpython-310.pyc and b/src/model/__pycache__/model_cllm.cpython-310.pyc differ
|
|
src/model/__pycache__/model_codet5p.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_codet5p.cpython-310.pyc and b/src/model/__pycache__/model_codet5p.cpython-310.pyc differ
|
|
src/model/__pycache__/model_exllama.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_exllama.cpython-310.pyc and b/src/model/__pycache__/model_exllama.cpython-310.pyc differ
|
|
src/model/__pycache__/model_falcon.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_falcon.cpython-310.pyc and b/src/model/__pycache__/model_falcon.cpython-310.pyc differ
|
|
src/model/__pycache__/model_registry.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_registry.cpython-310.pyc and b/src/model/__pycache__/model_registry.cpython-310.pyc differ
|
|
src/model/__pycache__/model_xfastertransformer.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_xfastertransformer.cpython-310.pyc and b/src/model/__pycache__/model_xfastertransformer.cpython-310.pyc differ
|
|
src/model/__pycache__/model_yuan2.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/model_yuan2.cpython-310.pyc and b/src/model/__pycache__/model_yuan2.cpython-310.pyc differ
|
|
src/model/__pycache__/monkey_patch_non_inplace.cpython-310.pyc
CHANGED
Binary files a/src/model/__pycache__/monkey_patch_non_inplace.cpython-310.pyc and b/src/model/__pycache__/monkey_patch_non_inplace.cpython-310.pyc differ
|
|
src/modules/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/src/modules/__pycache__/__init__.cpython-310.pyc and b/src/modules/__pycache__/__init__.cpython-310.pyc differ
|
|
src/modules/__pycache__/awq.cpython-310.pyc
CHANGED
Binary files a/src/modules/__pycache__/awq.cpython-310.pyc and b/src/modules/__pycache__/awq.cpython-310.pyc differ
|
|
src/modules/__pycache__/exllama.cpython-310.pyc
CHANGED
Binary files a/src/modules/__pycache__/exllama.cpython-310.pyc and b/src/modules/__pycache__/exllama.cpython-310.pyc differ
|
|
src/modules/__pycache__/gptq.cpython-310.pyc
CHANGED
Binary files a/src/modules/__pycache__/gptq.cpython-310.pyc and b/src/modules/__pycache__/gptq.cpython-310.pyc differ
|
|
src/modules/__pycache__/xfastertransformer.cpython-310.pyc
CHANGED
Binary files a/src/modules/__pycache__/xfastertransformer.cpython-310.pyc and b/src/modules/__pycache__/xfastertransformer.cpython-310.pyc differ
|
|
src/serve/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/__init__.cpython-310.pyc and b/src/serve/__pycache__/__init__.cpython-310.pyc differ
|
|
src/serve/__pycache__/api_provider.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/api_provider.cpython-310.pyc and b/src/serve/__pycache__/api_provider.cpython-310.pyc differ
|
|
src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc and b/src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc differ
|
|
src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc and b/src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc differ
|
|
src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc and b/src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc differ
|
|
src/serve/__pycache__/gradio_web_server.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/gradio_web_server.cpython-310.pyc and b/src/serve/__pycache__/gradio_web_server.cpython-310.pyc differ
|
|
src/serve/__pycache__/remote_logger.cpython-310.pyc
CHANGED
Binary files a/src/serve/__pycache__/remote_logger.cpython-310.pyc and b/src/serve/__pycache__/remote_logger.cpython-310.pyc differ
|
|
src/serve/gradio_web_server.py
CHANGED
@@ -440,7 +440,7 @@ def bot_response(
|
|
440 |
api_endpoint_info[model_name] if model_name in api_endpoint_info else None
|
441 |
)
|
442 |
images = conv.get_images()
|
443 |
-
logger.info(f"model_name: {model_name}; model_api_dict: {model_api_dict}; msg: {conv.messages}")
|
444 |
if model_api_dict is None:
|
445 |
if model_name == "llava-original":
|
446 |
from src.model.model_llava import inference_by_prompt_and_images
|
|
|
440 |
api_endpoint_info[model_name] if model_name in api_endpoint_info else None
|
441 |
)
|
442 |
images = conv.get_images()
|
443 |
+
logger.info(f"model_name: {model_name}; model_api_dict: {model_api_dict}; msg: {len(conv.messages)}")
|
444 |
if model_api_dict is None:
|
445 |
if model_name == "llava-original":
|
446 |
from src.model.model_llava import inference_by_prompt_and_images
|