diff --git a/.gitattributes b/.gitattributes
index a6344aac8c09253b3b630fb776ae94478aa0275b..a38aef2373317497f3b225f882295ff108de3fbf 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,51 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_117_IMG_8176.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_127_1E703639-9169-4EB4-8A5D-3B1E226F639B.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_14_IMG_20220721_150241.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_153_IMG_20240411_102841.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_155_IMG_20240403_094547.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_158_IMG_20240416_141427.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_159_IMG_20240416_140243.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_187_mmexport1713446177339.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_19_IMG_0395.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_217_IMG_3854.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_22_IMG_20240404_135935.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_236_IMG_4742.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_34_IMG_0400.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_40_IMG_20170613_190017.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_61_mmexport1550554859117.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_64_IMG_20240409_181047.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_68_IMG_0971.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_70_IMG_0581.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_72_IMG_0618.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_80_IMG_6323.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_87_IMG_5316.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14456664_88_wx_camera_1712730236546.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_108_IMG_6205.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_109_IMG_5997.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_112_IMG_3570.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_117_IMG_1362.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_122_53D0E884-E012-4FFA-8BD7-8F5666A53123.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_144_IMG_8800.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_14_IMG_3852.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_162_IMG_0356.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_168_D4D36C59-2D68-4354-B05C-B3065F6581AA.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_174_IMG_8019.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_183_IMG_20240502_122921.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_209_IMG_3105.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_211_IMG_9139.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_237_IMG_5909.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_257_79874AA6-4F23-4AD6-96E2-7F64039A81C0.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_261_0E3192C7-1B0D-4C4D-9788-5E7A5E6E92BA.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_262_75B3AEDF-C705-400B-AE86-3FA7A92B624C.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_265_1C4A3265-A18E-46C2-A264-4384B85A49C0.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_44_930F3702-FC28-498F-A5A7-9E01AA5AEA15.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_55_IMG_8533.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_65_IMG_20240424_121225.jpg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_75_IMG_8637.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_79_IMG_2612.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_80_IMG_2613.jpeg filter=lfs diff=lfs merge=lfs -text
+demo/food/14521898_82_IMG_9847.jpeg filter=lfs diff=lfs merge=lfs -text
+outputs/uploaded/4.jpg filter=lfs diff=lfs merge=lfs -text
diff --git a/demo.py b/demo.py
new file mode 100644
index 0000000000000000000000000000000000000000..59dfd203e99164286d0d6b0362776dc86353547f
--- /dev/null
+++ b/demo.py
@@ -0,0 +1,119 @@
+import os
+import random
+import numpy as np
+import torch
+import torch.backends.cudnn as cudnn
+import gradio as gr
+
+from utils import load_json, init_logger
+from demo import ConversationalAgent, CustomTheme
+
+FOOD_EXAMPLES = "demo/food_for_demo.json"
+# MODEL_PATH = "/root/share/new_models/OpenGVLab/InternVL2-2B"
+MODEL_PATH = "/root/xtuner/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/lr35_ep10"
+OUTPUT_PATH = "./outputs"
+
+def setup_seeds():
+ seed = 42
+
+ random.seed(seed)
+ np.random.seed(seed)
+ torch.manual_seed(seed)
+
+ cudnn.benchmark = False
+ cudnn.deterministic = True
+
+
+def main():
+ setup_seeds()
+ # logging
+ init_logger(OUTPUT_PATH)
+ # food examples
+ food_examples = load_json(FOOD_EXAMPLES)
+
+ agent = ConversationalAgent(model_path=MODEL_PATH,
+ outputs_dir=OUTPUT_PATH)
+
+ theme = CustomTheme()
+
+ titles = [
+ """
书生大模型实战营""" ## Kalam:wght@700
+ """「进阶岛」InternVL 多模态模型部署微调实践"""
+ ]
+
+ language = """Language: 中文 and English"""
+ with gr.Blocks(theme) as demo_chatbot:
+ for title in titles:
+ gr.Markdown(title)
+ # gr.Markdown(article)
+ gr.Markdown(language)
+
+ with gr.Row():
+ with gr.Column(scale=3):
+ start_btn = gr.Button("Start Chat", variant="primary", interactive=True)
+ clear_btn = gr.Button("Clear Context", interactive=False)
+ image = gr.Image(type="pil", interactive=False)
+ upload_btn = gr.Button("🖼️ Upload Image", interactive=False)
+
+ with gr.Accordion("Generation Settings"):
+ top_p = gr.Slider(minimum=0, maximum=1, step=0.1,
+ value=0.8,
+ interactive=True,
+ label='top-p value',
+ visible=True)
+
+ temperature = gr.Slider(minimum=0, maximum=1.5, step=0.1,
+ value=0.8,
+ interactive=True,
+ label='temperature',
+ visible=True)
+
+ with gr.Column(scale=7):
+ chat_state = gr.State()
+ chatbot = gr.Chatbot(label='InternVL2', height=800, avatar_images=((os.path.join(os.path.dirname(__file__), 'demo/user.png')), (os.path.join(os.path.dirname(__file__), "demo/bot.png"))))
+ text_input = gr.Textbox(label='User', placeholder="Please click the button to start chat!", interactive=False)
+ gr.Markdown("### 输入示例")
+ def on_text_change(text):
+ return gr.update(interactive=True)
+ text_input.change(fn=on_text_change, inputs=text_input, outputs=text_input)
+ gr.Examples(
+ examples=[["图片中的食物通常属于哪个菜系?"],
+ ["如果让你简单形容一下品尝图片中的食物的滋味,你会描述它"],
+ ["去哪个地方游玩时应该品尝当地的特色美食图片中的食物?"],
+ ["食用图片中的食物时,一般它上菜或摆盘时的特点是?"]],
+ inputs=[text_input]
+ )
+
+ with gr.Row():
+ gr.Markdown("### 食物快捷栏")
+ with gr.Row():
+ example_xinjiang_food = gr.Examples(examples=food_examples["新疆菜"], inputs=image, label="新疆菜")
+ example_sichuan_food = gr.Examples(examples=food_examples["川菜(四川,重庆)"], inputs=image, label="川菜(四川,重庆)")
+ example_xibei_food = gr.Examples(examples=food_examples["西北菜 (陕西,甘肃等地)"], inputs=image, label="西北菜 (陕西,甘肃等地)")
+ with gr.Row():
+ example_guizhou_food = gr.Examples(examples=food_examples["黔菜 (贵州)"], inputs=image, label="黔菜 (贵州)")
+ example_jiangsu_food = gr.Examples(examples=food_examples["苏菜(江苏)"], inputs=image, label="苏菜(江苏)")
+ example_guangdong_food = gr.Examples(examples=food_examples["粤菜(广东等地)"], inputs=image, label="粤菜(广东等地)")
+ with gr.Row():
+ example_hunan_food = gr.Examples(examples=food_examples["湘菜(湖南)"], inputs=image, label="湘菜(湖南)")
+ example_fujian_food = gr.Examples(examples=food_examples["闽菜(福建)"], inputs=image, label="闽菜(福建)")
+ example_zhejiang_food = gr.Examples(examples=food_examples["浙菜(浙江)"], inputs=image, label="浙菜(浙江)")
+ with gr.Row():
+ example_dongbei_food = gr.Examples(examples=food_examples["东北菜 (黑龙江等地)"], inputs=image, label="东北菜 (黑龙江等地)")
+
+
+ start_btn.click(agent.start_chat, [chat_state], [text_input, start_btn, clear_btn, image, upload_btn, chat_state])
+ clear_btn.click(agent.restart_chat, [chat_state], [chatbot, text_input, start_btn, clear_btn, image, upload_btn, chat_state], queue=False)
+ upload_btn.click(agent.upload_image, [image, chatbot, chat_state], [image, chatbot, chat_state])
+ text_input.submit(
+ agent.respond,
+ inputs=[text_input, image, chatbot, top_p, temperature, chat_state],
+ outputs=[text_input, image, chatbot, chat_state]
+ )
+
+ demo_chatbot.launch(share=True, server_name="127.0.0.1", server_port=1096, allowed_paths=['./'])
+ demo_chatbot.queue()
+
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file
diff --git a/demo/__init__.py b/demo/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..743e4ac650cd862cafd3e1fa880896933afdb26b
--- /dev/null
+++ b/demo/__init__.py
@@ -0,0 +1,8 @@
+from demo.agent import ConversationalAgent
+from demo.theme import CustomTheme
+
+
+__all__ = [
+ "ConversationalAgent",
+ "CustomTheme",
+]
\ No newline at end of file
diff --git a/demo/__pycache__/__init__.cpython-310.pyc b/demo/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2f8eef6c1a68f39e8fb198f180be09cd50ce677e
Binary files /dev/null and b/demo/__pycache__/__init__.cpython-310.pyc differ
diff --git a/demo/__pycache__/agent.cpython-310.pyc b/demo/__pycache__/agent.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6c47cbc55031806083a05da9af5ce39008ce5846
Binary files /dev/null and b/demo/__pycache__/agent.cpython-310.pyc differ
diff --git a/demo/__pycache__/theme.cpython-310.pyc b/demo/__pycache__/theme.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fcebc0afe2ead27d10fac23e05308d97abc4cdda
Binary files /dev/null and b/demo/__pycache__/theme.cpython-310.pyc differ
diff --git a/demo/agent.py b/demo/agent.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b98b7e9dcbd6e0d2d67cb830031a85ea75c4f89
--- /dev/null
+++ b/demo/agent.py
@@ -0,0 +1,105 @@
+import os
+import logging
+from datetime import datetime
+
+import gradio as gr
+from PIL import Image
+
+from lmdeploy import pipeline, TurbomindEngineConfig, GenerationConfig, ChatTemplateConfig
+from lmdeploy.vl import load_image
+
+class ConversationalAgent:
+ def __init__(self,
+ model_path,
+ outputs_dir) -> None:
+ self.pipe = pipeline(model_path,
+ chat_template_config=ChatTemplateConfig(model_name='internvl2-internlm2'),
+ backend_config=TurbomindEngineConfig(session_len=8192))
+ self.uploaded_images_storage = os.path.join(outputs_dir, "uploaded")
+ self.uploaded_images_storage = os.path.abspath(self.uploaded_images_storage)
+ os.makedirs(self.uploaded_images_storage, exist_ok=True)
+ self.sess = None
+
+ def start_chat(self, chat_state):
+ self.sess = None
+ self.context = ""
+ self.current_image_id = -1
+ self.image_list = []
+ self.pixel_values_list = []
+ self.seen_image_idx = []
+ logging.info("=" * 30 + "Start Chat" + "=" * 30)
+
+ return (
+ #gr.update(interactive=False), # [image] Image
+ gr.update(interactive=True, placeholder='input the text.'), # [input_text] Textbox
+ gr.update(interactive=False), # [start_btn] Button
+ gr.update(interactive=True), # [clear_btn] Button
+ gr.update(interactive=True), # [image] Image
+ gr.update(interactive=True), # [upload_btn] Button
+ chat_state # [chat_state] State
+ )
+
+ def restart_chat(self, chat_state):
+ self.sess = None
+ self.context = ""
+ self.current_image_id = -1
+ self.image_list = []
+ self.pixel_values_list = []
+ self.seen_image_idx = []
+
+ logging.info("=" * 30 + "End Chat" + "=" * 30)
+
+ return (
+ None, # [chatbot] Chatbot
+ #gr.update(value=None, interactive=True), # [image] Image
+ gr.update(interactive=False, placeholder="Please click the button to start chat!"), # [input_text] Textbox
+ gr.update(interactive=True), # [start] Button
+ gr.update(interactive=False), # [clear] Button
+ gr.update(value=None, interactive=False), # [image] Image
+ gr.update(interactive=False), # [upload_btn] Button
+ chat_state # [chat_state] State
+ )
+
+ def upload_image(self, image: Image.Image, chat_history: gr.Chatbot, chat_state: gr.State):
+ logging.info(f"type(image): {type(image)}")
+
+ self.image_list.append(image)
+ save_image_path = os.path.join(self.uploaded_images_storage, "{}.jpg".format(len(os.listdir(self.uploaded_images_storage))))
+ image.save(save_image_path)
+ logging.info(f"image save path: {save_image_path}")
+ chat_history.append((gr.HTML(f'
'), "Received."))
+
+ return None, chat_history, chat_state
+
+ def respond(
+ self,
+ message,
+ image,
+ chat_history: gr.Chatbot,
+ top_p,
+ temperature,
+ chat_state,
+ ):
+ current_time = datetime.now().strftime("%b%d-%H:%M:%S")
+ logging.info(f"Time: {current_time}")
+ logging.info(f"User: {message}")
+ gen_config = GenerationConfig(top_p=top_p, temperature=temperature)
+ chat_input = message
+ if image is not None:
+ save_image_path = os.path.join(self.uploaded_images_storage, "{}.jpg".format(len(os.listdir(self.uploaded_images_storage))))
+ image.save(save_image_path)
+ logging.info(f"image save path: {save_image_path}")
+ chat_input = (message, image)
+ if self.sess is None:
+ self.sess = self.pipe.chat(chat_input, gen_config=gen_config)
+ else:
+ self.sess = self.pipe.chat(chat_input, session=self.sess, gen_config=gen_config)
+ response = self.sess.response.text
+ if image is not None:
+ chat_history.append((gr.HTML(f'{message}\n\n
'), response))
+ else:
+ chat_history.append((message, response))
+
+ logging.info(f"generated text = \n{response}")
+
+ return "", None, chat_history, chat_state
diff --git a/demo/bot.png b/demo/bot.png
new file mode 100644
index 0000000000000000000000000000000000000000..0047bf66e24ff259b7ea02081316c3d881854856
Binary files /dev/null and b/demo/bot.png differ
diff --git a/demo/food/14456664_117_IMG_8176.jpeg b/demo/food/14456664_117_IMG_8176.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..de292c40ad1fe11f1418e5bd2ef861c691f844c6
--- /dev/null
+++ b/demo/food/14456664_117_IMG_8176.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f844ef4ef78a325596a63ab702dafa0a67781348de8c12b58b9a9b655953ade1
+size 2635383
diff --git a/demo/food/14456664_126_86838F28-912B-42A4-80C1-BD060B649081.jpeg b/demo/food/14456664_126_86838F28-912B-42A4-80C1-BD060B649081.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..5e3594e979b48a58b7cae098dac2e71dbc242384
Binary files /dev/null and b/demo/food/14456664_126_86838F28-912B-42A4-80C1-BD060B649081.jpeg differ
diff --git a/demo/food/14456664_127_1E703639-9169-4EB4-8A5D-3B1E226F639B.jpeg b/demo/food/14456664_127_1E703639-9169-4EB4-8A5D-3B1E226F639B.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..ffff39046fbd98dbaa9f09b0088b55986ab3a925
--- /dev/null
+++ b/demo/food/14456664_127_1E703639-9169-4EB4-8A5D-3B1E226F639B.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ad9fa9010a5731ac6c0870bf2a572c406f0954b7d3bf3b5ca1f63c78863e7762
+size 1895518
diff --git a/demo/food/14456664_129_IMG_20220605_181308.jpg b/demo/food/14456664_129_IMG_20220605_181308.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0c8f8ba7ac60e4a2b49da4dd4a101bf2053fd4ec
Binary files /dev/null and b/demo/food/14456664_129_IMG_20220605_181308.jpg differ
diff --git a/demo/food/14456664_130_IMG_20220605_180820.jpg b/demo/food/14456664_130_IMG_20220605_180820.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6a6a8915147f9f29c3d6fcd73d1dd0f2b45a274b
Binary files /dev/null and b/demo/food/14456664_130_IMG_20220605_180820.jpg differ
diff --git a/demo/food/14456664_133_IMG_20220709_153436.jpg b/demo/food/14456664_133_IMG_20220709_153436.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..320b6e6df4bacef7c823a7e79ff5aaafd59ce17d
Binary files /dev/null and b/demo/food/14456664_133_IMG_20220709_153436.jpg differ
diff --git a/demo/food/14456664_134_IMG_20220709_153652.jpg b/demo/food/14456664_134_IMG_20220709_153652.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f072514649b4220848caa470ad86dcd326ef3236
Binary files /dev/null and b/demo/food/14456664_134_IMG_20220709_153652.jpg differ
diff --git a/demo/food/14456664_136_IMG_20220709_233905.jpg b/demo/food/14456664_136_IMG_20220709_233905.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a618cc6a12b745e5c6292762d37abdeb8c21080b
Binary files /dev/null and b/demo/food/14456664_136_IMG_20220709_233905.jpg differ
diff --git a/demo/food/14456664_137_IMG_20220717_143941.jpg b/demo/food/14456664_137_IMG_20220717_143941.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..827fa7df378da7cc39a54922e8aacfce4f7659ad
Binary files /dev/null and b/demo/food/14456664_137_IMG_20220717_143941.jpg differ
diff --git a/demo/food/14456664_139_IMG_0917-EDIT.jpg b/demo/food/14456664_139_IMG_0917-EDIT.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c9a3e89817881c16bafba80a90d10b5ec870e7c1
Binary files /dev/null and b/demo/food/14456664_139_IMG_0917-EDIT.jpg differ
diff --git a/demo/food/14456664_141_IMG_1724.jpg b/demo/food/14456664_141_IMG_1724.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..03ec919973e3a183dfbd5657c2d54fb67adcf253
Binary files /dev/null and b/demo/food/14456664_141_IMG_1724.jpg differ
diff --git a/demo/food/14456664_147_IMG_20190225_184723.jpg b/demo/food/14456664_147_IMG_20190225_184723.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..77d69185b3b210127c1285c24251a5b39c1cfb86
Binary files /dev/null and b/demo/food/14456664_147_IMG_20190225_184723.jpg differ
diff --git a/demo/food/14456664_149_IMG_20180812_182400.jpg b/demo/food/14456664_149_IMG_20180812_182400.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..59e0f26d05577d05a56648ad3abebcd3779982f8
Binary files /dev/null and b/demo/food/14456664_149_IMG_20180812_182400.jpg differ
diff --git a/demo/food/14456664_14_IMG_20220721_150241.jpg b/demo/food/14456664_14_IMG_20220721_150241.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..130fc96287eae1a527f11020d826fa1be76f626f
--- /dev/null
+++ b/demo/food/14456664_14_IMG_20220721_150241.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:df1c0a0fa513ed03b735318e47c7393a7761bf46a33ab60b9f9d3898355e71e2
+size 3953392
diff --git a/demo/food/14456664_150_IMG_20181218_190852.jpg b/demo/food/14456664_150_IMG_20181218_190852.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ffca3dc5d016449d3062330a270b6806b2633d78
Binary files /dev/null and b/demo/food/14456664_150_IMG_20181218_190852.jpg differ
diff --git a/demo/food/14456664_153_IMG_20240411_102841.jpg b/demo/food/14456664_153_IMG_20240411_102841.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3fa1342aa1af42e7985b60de892e134fd242b6b4
--- /dev/null
+++ b/demo/food/14456664_153_IMG_20240411_102841.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2b151c68460ea7bc0fc85d91535a2bc94ed88dcf4d761046d2a37722c5bfa5f5
+size 1933043
diff --git a/demo/food/14456664_155_IMG_20240403_094547.jpg b/demo/food/14456664_155_IMG_20240403_094547.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fe25a403669ccc6b815a37459f8cc8ddea71e31a
--- /dev/null
+++ b/demo/food/14456664_155_IMG_20240403_094547.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:65b3e7f66dbace96b3f790e17c38abedddfa07bf886e1d5c8159feb30352e5b6
+size 2268286
diff --git a/demo/food/14456664_158_IMG_20240416_141427.jpg b/demo/food/14456664_158_IMG_20240416_141427.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f0862f000294867e3af304f137601f1c68a42ac6
--- /dev/null
+++ b/demo/food/14456664_158_IMG_20240416_141427.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f622069e0add72f4e778af7c223922a66dc1478ed13a1458dd3455ae3fe04495
+size 2899692
diff --git a/demo/food/14456664_159_IMG_20240416_140243.jpg b/demo/food/14456664_159_IMG_20240416_140243.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4d4dc6e831fe54d953ffeb3dc20cba2f0a1369c7
--- /dev/null
+++ b/demo/food/14456664_159_IMG_20240416_140243.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ce5bf8987b1bb99fb874a8ba8043952c2a03d6593d28447d44f09d4814402124
+size 2814714
diff --git a/demo/food/14456664_187_mmexport1713446177339.jpg b/demo/food/14456664_187_mmexport1713446177339.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..49532a08feab5ec18378e51b91592f6a0e73bc2d
--- /dev/null
+++ b/demo/food/14456664_187_mmexport1713446177339.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a8fa2b9fe1ef98e53d61be59061e848e7338b09e5d3f8e01fb376b877698461b
+size 1000537
diff --git a/demo/food/14456664_19_IMG_0395.jpeg b/demo/food/14456664_19_IMG_0395.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..4eb48c3f49895c57980e299fe48960cae56bf4a0
--- /dev/null
+++ b/demo/food/14456664_19_IMG_0395.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d3776a76f3612ab93123499a7fdb8bfabaad2596ee76eca754f4806fd404bc89
+size 3110275
diff --git a/demo/food/14456664_201_mmexport1713452408322.jpg b/demo/food/14456664_201_mmexport1713452408322.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..71fd4b2aa9151337d9f3a1c7b3fef4ef675192e8
Binary files /dev/null and b/demo/food/14456664_201_mmexport1713452408322.jpg differ
diff --git a/demo/food/14456664_217_IMG_3854.jpeg b/demo/food/14456664_217_IMG_3854.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..e8759885afa1ec305d77db047ebdf26d073f7f8c
--- /dev/null
+++ b/demo/food/14456664_217_IMG_3854.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d6ee11d0137ab40d9c1bf743535cbd163e00c6de5fd69022febfd55a4abae610
+size 4983580
diff --git a/demo/food/14456664_22_IMG_20240404_135935.jpg b/demo/food/14456664_22_IMG_20240404_135935.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fdd5d509b54ae4f523ee60e8839112f193d1e881
--- /dev/null
+++ b/demo/food/14456664_22_IMG_20240404_135935.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f4f79f735255036164c0dac6d5cff946ef36a765eeed815992e437a1f48aa12b
+size 3185124
diff --git a/demo/food/14456664_236_IMG_4742.jpeg b/demo/food/14456664_236_IMG_4742.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..91d26386b593e2e1db315740982f373f2bc7f115
--- /dev/null
+++ b/demo/food/14456664_236_IMG_4742.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a25050eff6c82d7dac7cbd2fb7e37eec886867b512e6ea0390c40cf7ca961338
+size 2396007
diff --git a/demo/food/14456664_238_d370e16ff482d13a0718c6fb4cd7ffbb.jpeg b/demo/food/14456664_238_d370e16ff482d13a0718c6fb4cd7ffbb.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..478203da9ad6f307945aaa9f4c7056901dea80f5
Binary files /dev/null and b/demo/food/14456664_238_d370e16ff482d13a0718c6fb4cd7ffbb.jpeg differ
diff --git a/demo/food/14456664_239_mmexport1713518196678.jpg b/demo/food/14456664_239_mmexport1713518196678.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..59b37f5f7c29081df92c0e5073c4da9422c02ee4
Binary files /dev/null and b/demo/food/14456664_239_mmexport1713518196678.jpg differ
diff --git a/demo/food/14456664_26_IMG_3472.jpeg b/demo/food/14456664_26_IMG_3472.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..c4ea4015f4f601c0de23f3b7fa409d306d3dbd50
Binary files /dev/null and b/demo/food/14456664_26_IMG_3472.jpeg differ
diff --git a/demo/food/14456664_34_IMG_0400.jpeg b/demo/food/14456664_34_IMG_0400.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..66a85ec7ba5d783d10bc272be2b173fe09f8a01b
--- /dev/null
+++ b/demo/food/14456664_34_IMG_0400.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7fd191af0a76621edeb10abe04cc952bb03c761b2abc733e5fe5474639d7b0e2
+size 1810607
diff --git a/demo/food/14456664_36_20240410160819.jpg b/demo/food/14456664_36_20240410160819.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e4814505fe0444c3d07bcd1ca40724d88e6dff2c
Binary files /dev/null and b/demo/food/14456664_36_20240410160819.jpg differ
diff --git a/demo/food/14456664_40_IMG_20170613_190017.jpg b/demo/food/14456664_40_IMG_20170613_190017.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..31f7238c996ac3605db56700f76688fc93f7bef4
--- /dev/null
+++ b/demo/food/14456664_40_IMG_20170613_190017.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d813465ccf81c04c65d7dbab663b2948ac4298e31bda62d0bd0df5dcb90e539d
+size 3052416
diff --git a/demo/food/14456664_41_IMG_20190216_124017.jpeg b/demo/food/14456664_41_IMG_20190216_124017.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..f61dbf0ec3ffeb64e0ef1bc33763574c085889a3
Binary files /dev/null and b/demo/food/14456664_41_IMG_20190216_124017.jpeg differ
diff --git a/demo/food/14456664_50_mmexport1712821641752.jpg b/demo/food/14456664_50_mmexport1712821641752.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ee1db803e7af7d6248f247ae1c5918db71f34ec5
Binary files /dev/null and b/demo/food/14456664_50_mmexport1712821641752.jpg differ
diff --git a/demo/food/14456664_61_mmexport1550554859117.jpg b/demo/food/14456664_61_mmexport1550554859117.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4a2011c9bc4cc61dcadb87a67eea54877730fe7f
--- /dev/null
+++ b/demo/food/14456664_61_mmexport1550554859117.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d95fbbf0cce24c3a8779a87216e4ece91af058b443129696405e7384705b9037
+size 2249334
diff --git a/demo/food/14456664_64_IMG_20240409_181047.jpg b/demo/food/14456664_64_IMG_20240409_181047.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..90be8705e480b374c0a3d50cc8656e7ab37cd25d
--- /dev/null
+++ b/demo/food/14456664_64_IMG_20240409_181047.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:070c656fa584ccf2331c37fa4e780381bab3b0d808aea54cba406fd66b7735bb
+size 2675554
diff --git a/demo/food/14456664_68_IMG_0971.jpeg b/demo/food/14456664_68_IMG_0971.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..e8e2d2dd8272a24cf577148fc82c3a847db9da50
--- /dev/null
+++ b/demo/food/14456664_68_IMG_0971.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1ae462fcb5b73a7c228ee775b08fe84827a383e9f663e2c31c1ef4c086a67c03
+size 2790379
diff --git a/demo/food/14456664_70_IMG_0581.jpeg b/demo/food/14456664_70_IMG_0581.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..a128a639b94a209d2f8fd1a1c3d9de518b3fb84d
--- /dev/null
+++ b/demo/food/14456664_70_IMG_0581.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:05a32a6d8ce58c42a4ba4e852fabc9b326b1b66937ade06ed0251ea6408f4571
+size 1805093
diff --git a/demo/food/14456664_72_IMG_0618.jpeg b/demo/food/14456664_72_IMG_0618.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..4b85d120ff5ef180ad83d46280e7041f85c4234a
--- /dev/null
+++ b/demo/food/14456664_72_IMG_0618.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:57b49b974c7b966ac2042e4efa506c5b55a9e6038ba7f1bb76434a97b5e06fe7
+size 2483224
diff --git a/demo/food/14456664_80_IMG_6323.jpeg b/demo/food/14456664_80_IMG_6323.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..cf7c31d713b41743d83d941c4ff26b4247821177
--- /dev/null
+++ b/demo/food/14456664_80_IMG_6323.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7a71fe70bfd223397ab7f0af42159ac501d787d99bbbbf61165b2f11e6f6ba0a
+size 3666529
diff --git a/demo/food/14456664_82_MVIMG_20240413_161454.jpeg b/demo/food/14456664_82_MVIMG_20240413_161454.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..168dfa1334a8728ca08567613e9e9a9fc5a83c95
Binary files /dev/null and b/demo/food/14456664_82_MVIMG_20240413_161454.jpeg differ
diff --git a/demo/food/14456664_87_IMG_5316.jpeg b/demo/food/14456664_87_IMG_5316.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..5524a01ce37ab92d2945066105e71c5aa8895ad3
--- /dev/null
+++ b/demo/food/14456664_87_IMG_5316.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:beadadd5d26749545b59159f8914f4a6ca9602f9a37c18f9ae6d578c62717eec
+size 3141260
diff --git a/demo/food/14456664_88_wx_camera_1712730236546.jpg b/demo/food/14456664_88_wx_camera_1712730236546.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..aae1d469192ac7282236bf42a3b71591bae53771
--- /dev/null
+++ b/demo/food/14456664_88_wx_camera_1712730236546.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cdc6b744e764770bff3cf73f7fb9bbe1424f88e59b4e22bb238c8765aec90483
+size 1288147
diff --git a/demo/food/14521898_108_IMG_6205.jpeg b/demo/food/14521898_108_IMG_6205.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..1bf41fee7a750499919128ef899e474d14686f38
--- /dev/null
+++ b/demo/food/14521898_108_IMG_6205.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:575cc946cb96af9bf5bece1fcda3eaf6a17dab7ba28f127d0573b068cfd4d9c0
+size 2624459
diff --git a/demo/food/14521898_109_IMG_5997.jpeg b/demo/food/14521898_109_IMG_5997.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..b6dbdbc0cf4a10ee5bb59140e3f72d142682b5f8
--- /dev/null
+++ b/demo/food/14521898_109_IMG_5997.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ba100e072a5fc01aa755087c2f3a5edc6e7e622fc7f6d3ba5b40f92b7e1476f3
+size 3535453
diff --git a/demo/food/14521898_112_IMG_3570.jpeg b/demo/food/14521898_112_IMG_3570.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..f5aa50978211e3c00399b2aaf0d1f32c7d9fddcb
--- /dev/null
+++ b/demo/food/14521898_112_IMG_3570.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ac8006a805982d44946da2574bdf9fff99fa1d592aa5e6eb86dfd9fd1b68f1a5
+size 2764359
diff --git a/demo/food/14521898_113_IMG_1724.jpeg b/demo/food/14521898_113_IMG_1724.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..98f9b594e2aa59ec8825b4dd6bdd382fb281f813
Binary files /dev/null and b/demo/food/14521898_113_IMG_1724.jpeg differ
diff --git a/demo/food/14521898_117_IMG_1362.jpeg b/demo/food/14521898_117_IMG_1362.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..98b9674a0f769bd7dadeb5fe4690823f2e846fea
--- /dev/null
+++ b/demo/food/14521898_117_IMG_1362.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c382431d796f1c21f35ead732e20f54398ad4f7ce218bc2137fbe1450684b9d4
+size 2310789
diff --git a/demo/food/14521898_122_53D0E884-E012-4FFA-8BD7-8F5666A53123.jpeg b/demo/food/14521898_122_53D0E884-E012-4FFA-8BD7-8F5666A53123.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..0db0c40a5f643b0c021e7df4d150be8147aff857
--- /dev/null
+++ b/demo/food/14521898_122_53D0E884-E012-4FFA-8BD7-8F5666A53123.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d75a4e7cc4276874b3cf31ad6322e56f58b7cb0a0264eb44440d8e241848052
+size 1506122
diff --git a/demo/food/14521898_12_fb48488412a1846c104b28600f4f1ded.jpeg b/demo/food/14521898_12_fb48488412a1846c104b28600f4f1ded.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..bed372e6f803ffa9ab70fd9cec77b9b6428fa223
Binary files /dev/null and b/demo/food/14521898_12_fb48488412a1846c104b28600f4f1ded.jpeg differ
diff --git a/demo/food/14521898_144_IMG_8800.jpeg b/demo/food/14521898_144_IMG_8800.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..0afca15d01662415a2fe62565684f6547aed8f98
--- /dev/null
+++ b/demo/food/14521898_144_IMG_8800.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:75c9bc5a693419c74183996df82f3185f161becf4190a2c5beb0e4181707f104
+size 1919833
diff --git a/demo/food/14521898_14_IMG_3852.jpeg b/demo/food/14521898_14_IMG_3852.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..e30fa7c33761df4546eb1077f727f0ba019fed87
--- /dev/null
+++ b/demo/food/14521898_14_IMG_3852.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9fb9d439c333f46cf5c7c3867ff771adce427ca8abd0625287a9edc409cd62aa
+size 4538255
diff --git a/demo/food/14521898_162_IMG_0356.jpeg b/demo/food/14521898_162_IMG_0356.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..ea2f5fd218ee3b4fd9504969463d511c6c11e0ca
--- /dev/null
+++ b/demo/food/14521898_162_IMG_0356.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8cba6d96455c96da2f10d03f52f23e404262aaa61d136de2d425e687b9e01b91
+size 3334867
diff --git a/demo/food/14521898_168_D4D36C59-2D68-4354-B05C-B3065F6581AA.jpeg b/demo/food/14521898_168_D4D36C59-2D68-4354-B05C-B3065F6581AA.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..f7150719f2e414c025c0cb2a7be8225608fa063e
--- /dev/null
+++ b/demo/food/14521898_168_D4D36C59-2D68-4354-B05C-B3065F6581AA.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f09fa6ade4b0b77977236a3baf113ef1d5c2d294cf1a43a236fa55ed7f891814
+size 3275533
diff --git a/demo/food/14521898_174_IMG_8019.jpeg b/demo/food/14521898_174_IMG_8019.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..c51d857be8b7c72b60ffee8be64dd90e9476e0ce
--- /dev/null
+++ b/demo/food/14521898_174_IMG_8019.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d2c1d1a65a4e75ee47f34dfd8660d98a6ab323af9ddd5b9fe0778a391165923b
+size 3196281
diff --git a/demo/food/14521898_183_IMG_20240502_122921.jpg b/demo/food/14521898_183_IMG_20240502_122921.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4c941b911e1900b4c243102f758b508d7eb102cc
--- /dev/null
+++ b/demo/food/14521898_183_IMG_20240502_122921.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4fde07270ec4b4d1efa77e2810151d3e26adc7c3724c517261566c746e914ac3
+size 3151183
diff --git a/demo/food/14521898_193_IMG_2435.jpeg b/demo/food/14521898_193_IMG_2435.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..22bebc3e7e980b12cafdcba34819138771d46391
Binary files /dev/null and b/demo/food/14521898_193_IMG_2435.jpeg differ
diff --git a/demo/food/14521898_209_IMG_3105.jpeg b/demo/food/14521898_209_IMG_3105.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..72ec67bf234abbcd0539d61aa13ef0f51be84140
--- /dev/null
+++ b/demo/food/14521898_209_IMG_3105.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3ce4a99b2b895aa5a062785498f84cde41008a64c5ad6ac2933c6134e9ef112f
+size 2159154
diff --git a/demo/food/14521898_211_IMG_9139.jpeg b/demo/food/14521898_211_IMG_9139.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..7194b53d26c2345ec1c003dcebe57e575f0996e3
--- /dev/null
+++ b/demo/food/14521898_211_IMG_9139.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0a2cbfaba62677f81d6d04c5d1e429986a7efcfc68d9603de1ec7c5e76022061
+size 3228111
diff --git a/demo/food/14521898_237_IMG_5909.jpeg b/demo/food/14521898_237_IMG_5909.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..fe7f9ac4621ac8f9c9995ea91ca1a6077d52392b
--- /dev/null
+++ b/demo/food/14521898_237_IMG_5909.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:63a8ec84b640965f6f69b6e83dd2f8d57f34d2777b9f26d335b7afe4bd4fa1fc
+size 2150570
diff --git a/demo/food/14521898_248_D8768DE2-559E-4850-A95E-07D5539F06C1.jpeg b/demo/food/14521898_248_D8768DE2-559E-4850-A95E-07D5539F06C1.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..e712a0d971b5125b4e2d3882d0c30cafbec5104e
Binary files /dev/null and b/demo/food/14521898_248_D8768DE2-559E-4850-A95E-07D5539F06C1.jpeg differ
diff --git a/demo/food/14521898_249_0755477B-B9D5-4786-8D86-BFD4AC9478FD.jpeg b/demo/food/14521898_249_0755477B-B9D5-4786-8D86-BFD4AC9478FD.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..e0134eeb3a3d4afafd2931cc08d4ff7cc2abcddd
Binary files /dev/null and b/demo/food/14521898_249_0755477B-B9D5-4786-8D86-BFD4AC9478FD.jpeg differ
diff --git a/demo/food/14521898_257_79874AA6-4F23-4AD6-96E2-7F64039A81C0.jpeg b/demo/food/14521898_257_79874AA6-4F23-4AD6-96E2-7F64039A81C0.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..497fd3cf5fe1d6ab5d014f6fb4bac9a0ed8e4343
--- /dev/null
+++ b/demo/food/14521898_257_79874AA6-4F23-4AD6-96E2-7F64039A81C0.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:01d68d9cfd915c5c4d8c366794b1cd63b9097c0a326eb90ea841c97bec6172a3
+size 2787609
diff --git a/demo/food/14521898_261_0E3192C7-1B0D-4C4D-9788-5E7A5E6E92BA.jpeg b/demo/food/14521898_261_0E3192C7-1B0D-4C4D-9788-5E7A5E6E92BA.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..2735f1bf18cc19073dd4fa1f267f1392f023ceda
--- /dev/null
+++ b/demo/food/14521898_261_0E3192C7-1B0D-4C4D-9788-5E7A5E6E92BA.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:893a879bcd7b569c272020a729c17af77389f80ff4193c259d83e32c422f76c6
+size 3240469
diff --git a/demo/food/14521898_262_75B3AEDF-C705-400B-AE86-3FA7A92B624C.jpeg b/demo/food/14521898_262_75B3AEDF-C705-400B-AE86-3FA7A92B624C.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..a4fc6ff0b10ac581376e83b14af04e3629efa943
--- /dev/null
+++ b/demo/food/14521898_262_75B3AEDF-C705-400B-AE86-3FA7A92B624C.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fe339cb0972c21f4e0bf79623f69ad7bdfdc732f0af955e52d5fb38202404be3
+size 3425619
diff --git a/demo/food/14521898_265_1C4A3265-A18E-46C2-A264-4384B85A49C0.jpeg b/demo/food/14521898_265_1C4A3265-A18E-46C2-A264-4384B85A49C0.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..a644bc048d69116d32c552751ddebe588a63e978
--- /dev/null
+++ b/demo/food/14521898_265_1C4A3265-A18E-46C2-A264-4384B85A49C0.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:214bba49fb123d1d20897ee9e5391b89f633af14e3b5ee84146c1f6644ac1eec
+size 3539520
diff --git a/demo/food/14521898_35_u_23162001_2841880362fm_170s_80187E975C411EC042A.png b/demo/food/14521898_35_u_23162001_2841880362fm_170s_80187E975C411EC042A.png
new file mode 100644
index 0000000000000000000000000000000000000000..a9bd456d7a605366644e9617bc4837ede224c674
Binary files /dev/null and b/demo/food/14521898_35_u_23162001_2841880362fm_170s_80187E975C411EC042A.png differ
diff --git a/demo/food/14521898_44_930F3702-FC28-498F-A5A7-9E01AA5AEA15.jpeg b/demo/food/14521898_44_930F3702-FC28-498F-A5A7-9E01AA5AEA15.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..474561d61c2c035567155801c1d7e125f21b3aa7
--- /dev/null
+++ b/demo/food/14521898_44_930F3702-FC28-498F-A5A7-9E01AA5AEA15.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:93100efa33f3122c6c419ab1fc89d1da2019f556f91a7285bd0fd0e5752b8fc5
+size 3438029
diff --git a/demo/food/14521898_55_IMG_8533.jpeg b/demo/food/14521898_55_IMG_8533.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..01ac1bd4eefaa026cf0f2cd3b0e2dc164f0b1b69
--- /dev/null
+++ b/demo/food/14521898_55_IMG_8533.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a56308a61e73be157a4d5a4c6ebb8b8a2621bf0340a648b626d5a86765fa511
+size 3021757
diff --git a/demo/food/14521898_65_IMG_20240424_121225.jpg b/demo/food/14521898_65_IMG_20240424_121225.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fea5ceee31c4f933caff3916adfaf9e2c79cbd22
--- /dev/null
+++ b/demo/food/14521898_65_IMG_20240424_121225.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1eaf0a61fc3dc0af6f73885322d220ee483ff9b9f21c3b190f25188ed741a11a
+size 3669645
diff --git a/demo/food/14521898_75_IMG_8637.jpeg b/demo/food/14521898_75_IMG_8637.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..124aec8e25a80d2524da3a4fe3530dffcf58fae3
--- /dev/null
+++ b/demo/food/14521898_75_IMG_8637.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1c3231243f499daaa33d7978223e1cf1aedd04d6fa4427703cd4b7cbc1568459
+size 3191491
diff --git a/demo/food/14521898_79_IMG_2612.jpeg b/demo/food/14521898_79_IMG_2612.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..0798b01b044c6b9bfc23c68c339d42ae6ffedc40
--- /dev/null
+++ b/demo/food/14521898_79_IMG_2612.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bcd4f8782b814f29648572c60079966f9c71bd9524238d1ca5335536f3ec58d1
+size 2298822
diff --git a/demo/food/14521898_80_IMG_2613.jpeg b/demo/food/14521898_80_IMG_2613.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..84eb662889cd1807fb258c60ebdab67417110998
--- /dev/null
+++ b/demo/food/14521898_80_IMG_2613.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ea8eae0059f847b151cd9fbef328910a8391b5f27b78c8dd362fd915129a6c08
+size 2794108
diff --git a/demo/food/14521898_82_IMG_9847.jpeg b/demo/food/14521898_82_IMG_9847.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..1a12a2bd9b84990e2f1d60d183b3996bbbd2fdb5
--- /dev/null
+++ b/demo/food/14521898_82_IMG_9847.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:86cd59efee342be115a7347982362d7aa6d4180dc80c5a3e10cd70ce026b2fc0
+size 3177517
diff --git a/demo/food/14521898_93_Image_1713865938858.jpg b/demo/food/14521898_93_Image_1713865938858.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c7d4d27943c73621cbe172f01ceb3b9a13607a48
Binary files /dev/null and b/demo/food/14521898_93_Image_1713865938858.jpg differ
diff --git a/demo/food/14521898_97_Image_1713865926721.jpg b/demo/food/14521898_97_Image_1713865926721.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6f9bce54ebd9e049b36cd37a4818e4ccf3c34cf0
Binary files /dev/null and b/demo/food/14521898_97_Image_1713865926721.jpg differ
diff --git a/demo/food_for_demo.json b/demo/food_for_demo.json
new file mode 100644
index 0000000000000000000000000000000000000000..fbe0700703bf12c505d61f070dea629c1b823087
--- /dev/null
+++ b/demo/food_for_demo.json
@@ -0,0 +1,97 @@
+{
+ "新疆菜": [
+ "demo/food/14521898_75_IMG_8637.jpeg",
+ "demo/food/14456664_139_IMG_0917-EDIT.jpg",
+ "demo/food/14456664_80_IMG_6323.jpeg",
+ "demo/food/14456664_217_IMG_3854.jpeg",
+ "demo/food/14521898_14_IMG_3852.jpeg",
+ "demo/food/14456664_136_IMG_20220709_233905.jpg",
+ "demo/food/14456664_137_IMG_20220717_143941.jpg",
+ "demo/food/14456664_141_IMG_1724.jpg",
+ "demo/food/14456664_134_IMG_20220709_153652.jpg",
+ "demo/food/14456664_133_IMG_20220709_153436.jpg"
+ ],
+ "川菜(四川,重庆)": [
+ "demo/food/14521898_113_IMG_1724.jpeg",
+ "demo/food/14521898_193_IMG_2435.jpeg",
+ "demo/food/14521898_44_930F3702-FC28-498F-A5A7-9E01AA5AEA15.jpeg",
+ "demo/food/14521898_80_IMG_2613.jpeg",
+ "demo/food/14456664_68_IMG_0971.jpeg",
+ "demo/food/14521898_174_IMG_8019.jpeg",
+ "demo/food/14456664_88_wx_camera_1712730236546.jpg",
+ "demo/food/14456664_36_20240410160819.jpg",
+ "demo/food/14456664_238_d370e16ff482d13a0718c6fb4cd7ffbb.jpeg",
+ "demo/food/14521898_183_IMG_20240502_122921.jpg",
+ "demo/food/14456664_40_IMG_20170613_190017.jpg",
+ "demo/food/14456664_150_IMG_20181218_190852.jpg",
+ "demo/food/14456664_72_IMG_0618.jpeg",
+ "demo/food/14521898_82_IMG_9847.jpeg"
+ ],
+ "西北菜 (陕西,甘肃等地)": [
+ "demo/food/14456664_82_MVIMG_20240413_161454.jpeg",
+ "demo/food/14521898_261_0E3192C7-1B0D-4C4D-9788-5E7A5E6E92BA.jpeg",
+ "demo/food/14456664_50_mmexport1712821641752.jpg",
+ "demo/food/14456664_126_86838F28-912B-42A4-80C1-BD060B649081.jpeg",
+ "demo/food/14521898_262_75B3AEDF-C705-400B-AE86-3FA7A92B624C.jpeg",
+ "demo/food/14456664_22_IMG_20240404_135935.jpg",
+ "demo/food/14521898_265_1C4A3265-A18E-46C2-A264-4384B85A49C0.jpeg",
+ "demo/food/14456664_127_1E703639-9169-4EB4-8A5D-3B1E226F639B.jpeg"
+ ],
+ "黔菜 (贵州)": [
+ "demo/food/14521898_35_u_23162001_2841880362fm_170s_80187E975C411EC042A.png",
+ "demo/food/14456664_61_mmexport1550554859117.jpg",
+ "demo/food/14456664_201_mmexport1713452408322.jpg",
+ "demo/food/14521898_211_IMG_9139.jpeg",
+ "demo/food/14456664_187_mmexport1713446177339.jpg",
+ "demo/food/14521898_97_Image_1713865926721.jpg",
+ "demo/food/14456664_41_IMG_20190216_124017.jpeg",
+ "demo/food/14521898_93_Image_1713865938858.jpg"
+ ],
+ "苏菜(江苏)": [
+ "demo/food/14456664_64_IMG_20240409_181047.jpg",
+ "demo/food/14456664_149_IMG_20180812_182400.jpg",
+ "demo/food/14521898_65_IMG_20240424_121225.jpg",
+ "demo/food/14456664_236_IMG_4742.jpeg",
+ "demo/food/14521898_55_IMG_8533.jpeg",
+ "demo/food/14521898_109_IMG_5997.jpeg",
+ "demo/food/14521898_79_IMG_2612.jpeg",
+ "demo/food/14456664_34_IMG_0400.jpeg",
+ "demo/food/14521898_248_D8768DE2-559E-4850-A95E-07D5539F06C1.jpeg"
+ ],
+ "粤菜(广东等地)": [
+ "demo/food/14521898_257_79874AA6-4F23-4AD6-96E2-7F64039A81C0.jpeg",
+ "demo/food/14521898_144_IMG_8800.jpeg",
+ "demo/food/14456664_155_IMG_20240403_094547.jpg",
+ "demo/food/14456664_87_IMG_5316.jpeg",
+ "demo/food/14521898_249_0755477B-B9D5-4786-8D86-BFD4AC9478FD.jpeg",
+ "demo/food/14521898_112_IMG_3570.jpeg",
+ "demo/food/14456664_153_IMG_20240411_102841.jpg",
+ "demo/food/14456664_70_IMG_0581.jpeg",
+ "demo/food/14521898_162_IMG_0356.jpeg",
+ "demo/food/14521898_117_IMG_1362.jpeg"
+ ],
+ "湘菜(湖南)": [
+ "demo/food/14521898_12_fb48488412a1846c104b28600f4f1ded.jpeg",
+ "demo/food/14456664_147_IMG_20190225_184723.jpg",
+ "demo/food/14521898_209_IMG_3105.jpeg"
+ ],
+ "闽菜(福建)": [
+ "demo/food/14521898_108_IMG_6205.jpeg",
+ "demo/food/14456664_129_IMG_20220605_181308.jpg",
+ "demo/food/14521898_168_D4D36C59-2D68-4354-B05C-B3065F6581AA.jpeg"
+ ],
+ "浙菜(浙江)": [
+ "demo/food/14456664_159_IMG_20240416_140243.jpg",
+ "demo/food/14456664_239_mmexport1713518196678.jpg",
+ "demo/food/14456664_130_IMG_20220605_180820.jpg",
+ "demo/food/14456664_117_IMG_8176.jpeg",
+ "demo/food/14456664_19_IMG_0395.jpeg",
+ "demo/food/14456664_158_IMG_20240416_141427.jpg",
+ "demo/food/14521898_122_53D0E884-E012-4FFA-8BD7-8F5666A53123.jpeg"
+ ],
+ "东北菜 (黑龙江等地)": [
+ "demo/food/14456664_26_IMG_3472.jpeg",
+ "demo/food/14521898_237_IMG_5909.jpeg",
+ "demo/food/14456664_14_IMG_20220721_150241.jpg"
+ ]
+}
\ No newline at end of file
diff --git a/demo/theme.py b/demo/theme.py
new file mode 100644
index 0000000000000000000000000000000000000000..3530a4b7e9427541e4613d83b16db0bef0414ca3
--- /dev/null
+++ b/demo/theme.py
@@ -0,0 +1,53 @@
+from gradio.themes.base import Base
+from gradio.themes.utils import colors, fonts, sizes
+from typing import Union, Iterable
+
+
+class CustomTheme(Base):
+ def __init__(
+ self,
+ primary_hue: Union[colors.Color, str] = colors.emerald,
+ secondary_hue: Union[colors.Color, str] = colors.blue,
+ neutral_hue: Union[colors.Color, str] = colors.slate,
+ spacing_size: Union[sizes.Size, str] = sizes.spacing_md,
+ radius_size: Union[sizes.Size, str] = sizes.radius_md,
+ text_size: Union[sizes.Size, str] = sizes.text_lg,
+ font: Union[fonts.Font, str, Iterable[Union[fonts.Font, str]]] = (
+ fonts.GoogleFont("Alice"),
+ "ui-sans-serif",
+ "sans-serif",
+ ),
+ font_mono: Union[fonts.Font, str, Iterable[Union[fonts.Font, str]]] = (
+ fonts.GoogleFont("Merriweather"),
+ "ui-monospace",
+ "monospace",
+ ),
+ ):
+ super().__init__(
+ primary_hue=primary_hue,
+ secondary_hue=secondary_hue,
+ neutral_hue=neutral_hue,
+ spacing_size=spacing_size,
+ radius_size=radius_size,
+ text_size=text_size,
+ font=font,
+ font_mono=font_mono,
+ )
+ super().set(
+ body_background_fill="#ECF2F7",
+ body_background_fill_dark="#191919",
+ button_primary_background_fill="linear-gradient(90deg, *primary_300, *secondary_400)",
+ button_primary_background_fill_hover="*primary_700",
+ button_primary_text_color="white",
+ button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *secondary_800)",
+ slider_color="#4EACEF",
+ slider_color_dark="#4EACEF",
+ block_title_text_weight="600",
+ block_title_text_size="*text_md",
+ block_label_text_weight="600",
+ block_label_text_size="*text_md",
+ block_border_width="1px",
+ block_shadow="#FFFFFF00",
+ button_shadow="*shadow_drop_lg",
+ button_large_padding="*spacing_lg calc(2 * *spacing_lg)",
+ )
\ No newline at end of file
diff --git a/demo/user.png b/demo/user.png
new file mode 100644
index 0000000000000000000000000000000000000000..5dfdd89145ba278a582e454d011b524c2696e0ab
Binary files /dev/null and b/demo/user.png differ
diff --git a/outputs/logs/Dec24_14-16-43.txt b/outputs/logs/Dec24_14-16-43.txt
new file mode 100644
index 0000000000000000000000000000000000000000..32dd7081712206238ab228ce37970d6293c16d7b
--- /dev/null
+++ b/outputs/logs/Dec24_14-16-43.txt
@@ -0,0 +1,59 @@
+2024-12-24 14:16:44,738 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:16:44,738 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:16:44,738 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:16:44,738 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:23,159 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:23,161 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:23,161 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:23,161 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:23,191 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:23,191 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:23,191 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:23,191 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:24,253 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:24,254 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:24,254 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:24,254 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:42,809 modeling_internvl_chat.py[line:54] INFO || num_image_token: 256
+2024-12-24 14:17:42,812 modeling_internvl_chat.py[line:55] INFO || ps_version: v2
+2024-12-24 14:17:49,038 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:49,038 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:49,038 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:49,038 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:49,666 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:49,666 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:49,666 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:49,666 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,677 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,677 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,677 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,677 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,705 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,705 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,705 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,705 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,732 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,732 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,732 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,732 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,755 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,755 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,755 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,756 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,780 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,780 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,780 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,780 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:52,806 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:52,806 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:52,806 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:52,806 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:58,867 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:17:58,867 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:17:58,867 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:17:58,867 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:17:59,754 _client.py[line:1025] INFO || HTTP Request: GET https://checkip.amazonaws.com/ "HTTP/1.1 200 "
+2024-12-24 14:18:01,647 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
+2024-12-24 14:18:04,490 _client.py[line:1025] INFO || HTTP Request: GET http://127.0.0.1:1096/startup-events "HTTP/1.1 200 OK"
+2024-12-24 14:18:04,754 _client.py[line:1025] INFO || HTTP Request: HEAD http://127.0.0.1:1096/ "HTTP/1.1 200 OK"
+2024-12-24 14:18:06,277 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/v2/tunnel-request "HTTP/1.1 200 OK"
diff --git a/outputs/logs/Dec24_14-48-37.txt b/outputs/logs/Dec24_14-48-37.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2a25cd9a54f8f8f0b12b8f6968d67c768b290802
--- /dev/null
+++ b/outputs/logs/Dec24_14-48-37.txt
@@ -0,0 +1,73 @@
+2024-12-24 14:48:37,587 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:48:37,587 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:48:37,587 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:48:37,588 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:02,486 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:02,488 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:02,489 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:02,489 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:02,510 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:02,511 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:02,511 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:02,511 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:03,245 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:03,245 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:03,245 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:03,245 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:11,789 modeling_internvl_chat.py[line:54] INFO || num_image_token: 256
+2024-12-24 14:49:11,789 modeling_internvl_chat.py[line:55] INFO || ps_version: v2
+2024-12-24 14:49:16,358 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:16,362 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:16,362 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:16,362 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:16,753 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:16,753 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:16,753 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:16,753 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,524 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,524 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,524 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,524 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,557 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,557 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,557 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,557 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,618 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,618 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,618 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,618 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,647 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,647 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,647 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,647 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,687 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,687 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,687 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,687 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:17,724 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:17,724 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:17,724 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:17,724 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:20,526 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-24 14:49:20,526 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-24 14:49:20,526 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-24 14:49:20,526 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-24 14:49:21,062 _client.py[line:1025] INFO || HTTP Request: GET https://checkip.amazonaws.com/ "HTTP/1.1 200 "
+2024-12-24 14:49:22,650 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
+2024-12-24 14:49:23,958 _client.py[line:1025] INFO || HTTP Request: GET http://127.0.0.1:1096/startup-events "HTTP/1.1 200 OK"
+2024-12-24 14:49:24,132 _client.py[line:1025] INFO || HTTP Request: HEAD http://127.0.0.1:1096/ "HTTP/1.1 200 OK"
+2024-12-24 14:49:26,524 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/v2/tunnel-request "HTTP/1.1 200 OK"
+2024-12-24 14:51:03,755 agent.py[line:30] INFO || ==============================Start Chat==============================
+2024-12-24 15:17:07,989 agent.py[line:84] INFO || Time: Dec24-15:17:07
+2024-12-24 15:17:07,993 agent.py[line:85] INFO || User: 这是什么东西
+2024-12-24 15:17:08,082 agent.py[line:91] INFO || image save path: /root/InternVL2-Tutorial/outputs/uploaded/0.jpg
+2024-12-24 15:17:22,815 agent.py[line:103] INFO || generated text =
+这是一只机器人。从外观上看,它具有一个圆圆的头,两个大大的眼睛,以及一个显示屏。显示屏上似乎显示了一些文字和数据。机器人的设计风格现代,看起来像是一个智能助手或娱乐机器人。
+2024-12-24 15:22:16,494 agent.py[line:64] INFO || type(image):
+2024-12-24 15:22:16,611 agent.py[line:69] INFO || image save path: /root/InternVL2-Tutorial/outputs/uploaded/1.jpg
+2024-12-24 15:22:28,851 agent.py[line:84] INFO || Time: Dec24-15:22:28
+2024-12-24 15:22:28,851 agent.py[line:85] INFO || User: 这张图表达了什么
+2024-12-24 15:22:29,573 agent.py[line:103] INFO || generated text =
+这张图展示了一只机器人,它具有一个圆圆的头,两个大大的眼睛,以及一个显示屏。显示屏上显示了一些文字和数据。从整体设计来看,这只机器人看起来像是一个智能助手或娱乐机器人。
+
+这张图可能表达了科技与人类之间的互动,以及机器人在现代生活中的应用。它也可能象征着未来科技的进步和机器人技术的发展。
diff --git a/outputs/logs/Dec25_10-59-44.txt b/outputs/logs/Dec25_10-59-44.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e51ba37e5c2120bfde527edb67b13c5849492ab7
--- /dev/null
+++ b/outputs/logs/Dec25_10-59-44.txt
@@ -0,0 +1,73 @@
+2024-12-25 10:59:44,773 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 10:59:44,773 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 10:59:44,773 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 10:59:44,780 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:27,085 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:27,087 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:27,087 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:27,087 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:27,103 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:27,103 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:27,103 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:27,110 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:28,351 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:28,351 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:28,351 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:28,351 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:48,563 modeling_internvl_chat.py[line:54] INFO || num_image_token: 256
+2024-12-25 11:00:48,564 modeling_internvl_chat.py[line:55] INFO || ps_version: v2
+2024-12-25 11:00:54,456 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:54,456 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:54,456 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:54,456 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:54,935 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:54,935 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:54,935 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:54,935 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,076 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,076 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,076 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,076 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,100 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,100 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,100 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,108 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,133 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,133 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,133 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,139 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,156 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,156 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,156 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,165 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,188 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,188 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,188 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,194 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:00:58,223 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:00:58,223 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:00:58,223 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:00:58,227 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:01:02,859 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-25 11:01:02,859 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-25 11:01:02,859 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-25 11:01:02,865 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-25 11:01:03,631 _client.py[line:1025] INFO || HTTP Request: GET https://checkip.amazonaws.com/ "HTTP/1.1 200 "
+2024-12-25 11:01:04,114 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
+2024-12-25 11:01:11,121 _client.py[line:1025] INFO || HTTP Request: GET http://127.0.0.1:1096/startup-events "HTTP/1.1 200 OK"
+2024-12-25 11:01:11,508 _client.py[line:1025] INFO || HTTP Request: HEAD http://127.0.0.1:1096/ "HTTP/1.1 200 OK"
+2024-12-25 11:01:12,399 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/v2/tunnel-request "HTTP/1.1 200 OK"
+2024-12-25 11:04:58,154 agent.py[line:30] INFO || ==============================Start Chat==============================
+2024-12-25 11:05:12,324 agent.py[line:84] INFO || Time: Dec25-11:05:12
+2024-12-25 11:05:12,324 agent.py[line:85] INFO || User: 图片中的食物通常属于哪个菜系?
+2024-12-25 11:05:12,498 agent.py[line:91] INFO || image save path: /root/InternVL2-Tutorial/outputs/uploaded/2.jpg
+2024-12-25 11:05:27,472 agent.py[line:103] INFO || generated text =
+图片中的食物看起来像是饺子,具体来说,是饺子的一种,可能是煎饺或蒸饺。饺子是中国传统的食品,常见于各种菜系中,包括北方菜系、粤菜系和川菜系。
+
+饺子在中国的许多地方都有不同的做法和口味,例如:
+
+1. **北方菜系**:饺子通常是用面皮包裹肉馅或素馅,然后煎或蒸。
+2. **粤菜系**:粤菜饺子通常使用薄皮,馅料丰富,如虾仁、猪肉、牛肉、蔬菜等。
+3. **川菜系**:川菜饺子通常使用面皮,馅料多样,如猪肉、牛肉、鸡肉、蔬菜等,有时还会加入花椒等调料。
+
+根据图片中的饺子外观和馅料,可以推测它可能是粤菜或川菜饺子。
diff --git a/outputs/logs/Dec26_15-43-14.txt b/outputs/logs/Dec26_15-43-14.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cc663f03451a4f52f5583c5edcc3cbde2b62b3c6
--- /dev/null
+++ b/outputs/logs/Dec26_15-43-14.txt
@@ -0,0 +1,70 @@
+2024-12-26 15:43:15,885 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:43:15,885 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:43:15,885 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:43:15,885 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:44:02,921 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:44:02,923 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:44:02,923 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:44:02,923 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:44:02,951 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:44:02,951 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:44:02,951 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:44:02,951 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:44:03,658 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:44:03,658 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:44:03,658 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:44:03,658 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:44:27,055 modeling_internvl_chat.py[line:54] INFO || num_image_token: 256
+2024-12-26 15:44:27,061 modeling_internvl_chat.py[line:55] INFO || ps_version: v2
+2024-12-26 15:46:21,687 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:21,691 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:21,691 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:21,691 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:22,318 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:22,318 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:22,318 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:22,318 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:25,794 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:25,794 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:25,794 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:25,794 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:25,838 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:25,838 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:25,838 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:25,838 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:25,883 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:25,883 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:25,883 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:25,883 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:25,934 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:25,934 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:25,934 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:25,934 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:25,986 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:25,986 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:25,987 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:25,987 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:26,028 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:26,028 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:26,028 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:26,028 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:29,779 configuration_internvl_chat.py[line:68] INFO || vision_select_layer: -1
+2024-12-26 15:46:29,779 configuration_internvl_chat.py[line:69] INFO || ps_version: v2
+2024-12-26 15:46:29,779 configuration_internvl_chat.py[line:70] INFO || min_dynamic_patch: 1
+2024-12-26 15:46:29,779 configuration_internvl_chat.py[line:71] INFO || max_dynamic_patch: 12
+2024-12-26 15:46:30,347 _client.py[line:1025] INFO || HTTP Request: GET https://checkip.amazonaws.com/ "HTTP/1.1 200 "
+2024-12-26 15:46:30,835 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
+2024-12-26 15:46:38,907 _client.py[line:1025] INFO || HTTP Request: GET http://127.0.0.1:1096/startup-events "HTTP/1.1 200 OK"
+2024-12-26 15:46:39,254 _client.py[line:1025] INFO || HTTP Request: HEAD http://127.0.0.1:1096/ "HTTP/1.1 200 OK"
+2024-12-26 15:46:40,102 _client.py[line:1025] INFO || HTTP Request: GET https://api.gradio.app/v2/tunnel-request "HTTP/1.1 200 OK"
+2024-12-26 15:53:18,192 agent.py[line:30] INFO || ==============================Start Chat==============================
+2024-12-26 15:53:23,849 agent.py[line:84] INFO || Time: Dec26-15:53:23
+2024-12-26 15:53:23,849 agent.py[line:85] INFO || User: 图片中的食物通常属于哪个菜系?
+2024-12-26 15:53:23,959 agent.py[line:91] INFO || image save path: /root/InternVL2-Tutorial/outputs/uploaded/3.jpg
+2024-12-26 15:53:39,981 agent.py[line:103] INFO || generated text =
+粤菜,图中的菜是鸡蛋肠粉
+2024-12-26 15:58:07,528 agent.py[line:84] INFO || Time: Dec26-15:58:07
+2024-12-26 15:58:07,533 agent.py[line:85] INFO || User: 这是什么菜
+2024-12-26 15:58:07,672 agent.py[line:91] INFO || image save path: /root/InternVL2-Tutorial/outputs/uploaded/4.jpg
+2024-12-26 15:58:08,544 agent.py[line:103] INFO || generated text =
+东北,图中的菜是锅包肉
diff --git a/outputs/uploaded/0.jpg b/outputs/uploaded/0.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..00a8702321b9ed3175cd0938a4c9680a3b46b265
Binary files /dev/null and b/outputs/uploaded/0.jpg differ
diff --git a/outputs/uploaded/1.jpg b/outputs/uploaded/1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a5f2993942557c7b2f3b56dd7682951bc4e84739
Binary files /dev/null and b/outputs/uploaded/1.jpg differ
diff --git a/outputs/uploaded/2.jpg b/outputs/uploaded/2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c2c90342402d5c292f4073a4fde827dd5d256bab
Binary files /dev/null and b/outputs/uploaded/2.jpg differ
diff --git a/outputs/uploaded/3.jpg b/outputs/uploaded/3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c2c90342402d5c292f4073a4fde827dd5d256bab
Binary files /dev/null and b/outputs/uploaded/3.jpg differ
diff --git a/outputs/uploaded/4.jpg b/outputs/uploaded/4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..712d6ede892e1ebe608ed6c4a1f404255afda2cf
--- /dev/null
+++ b/outputs/uploaded/4.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aa30cea1b5c1172c06ce13f4e2f02fabb1b82f321b0b2927ce812f5629bd06f0
+size 1076332
diff --git a/process_food.py b/process_food.py
new file mode 100644
index 0000000000000000000000000000000000000000..6acd53da37f76a7f9f34765d72b80290d2abbbf0
--- /dev/null
+++ b/process_food.py
@@ -0,0 +1,25 @@
+import json
+input_path = "/root/huggingface/FoodieQA/FoodieQA/sivqa_tidy.json" # sivqa_tidy.json所在位置
+output_path = "/root/huggingface/FoodieQA/FoodieQA/sivqa_llava.json" # 输出文件位置
+
+with open(input_path, 'r', encoding='utf-8') as f:
+ foodqa = json.load(f)
+
+llava_format = []
+for data in foodqa:
+ llava_format.append({
+ "image": data['food_meta']['food_file'],
+ "conversations": [
+ {
+ "from": "human",
+ "value": data['question']+"\n"
+ },
+ {
+ "from": "gpt",
+ "value": data['choices'][int(data['answer'])] + ",图中的菜是"+ data['food_meta']['food_name']
+ }
+ ]
+ })
+
+with open(output_path, 'w', encoding='utf-8') as f:
+ json.dump(llava_format, f, indent=4, ensure_ascii=False)
\ No newline at end of file
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a10f76ebcb39edbab932f1fbdca9fb2ed7ef004
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,7 @@
+# 书生大模型实战营
+## \[进阶岛\] InternVL 多模态模型部署微调实践
+
+* `demo` 网页应用依赖相关文件
+* `demo.py` 运行网页应用的入口
+* `utils.py` 相关工具函数
+* `process_food.py` 处理数据集
\ No newline at end of file
diff --git a/utils.py b/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..be4d578eb65559e4d083d351ae24533def9d05af
--- /dev/null
+++ b/utils.py
@@ -0,0 +1,25 @@
+import os
+import json
+import logging
+from datetime import datetime
+
+
+def load_json(file_name: str):
+ if isinstance(file_name, str) and file_name.endswith("json"):
+ with open(file_name, 'r') as file:
+ data = json.load(file)
+ else:
+ raise ValueError("The file path you passed in is not a json file path.")
+
+ return data
+
+def init_logger(outputs_dir):
+ current_time = datetime.now().strftime("%b%d_%H-%M-%S")
+ os.makedirs(os.path.join(outputs_dir, "logs"), exist_ok=True)
+ log_path = os.path.join(outputs_dir, "logs", "{}.txt".format(current_time))
+ logging.basicConfig(
+ level=logging.INFO,
+ format="%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s || %(message)s",
+ handlers=[logging.StreamHandler(), logging.FileHandler(log_path)],
+ )
+
\ No newline at end of file
diff --git a/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/20241225_111529.log b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/20241225_111529.log
new file mode 100644
index 0000000000000000000000000000000000000000..28acfaf5b11db54ea48dd71bc06cbf3297c200ce
--- /dev/null
+++ b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/20241225_111529.log
@@ -0,0 +1,431 @@
+2024/12/25 11:15:30 - mmengine - INFO -
+------------------------------------------------------------
+System environment:
+ sys.platform: linux
+ Python: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]
+ CUDA available: True
+ MUSA available: False
+ numpy_random_seed: 325847556
+ GPU 0: NVIDIA A100-SXM4-80GB
+ CUDA_HOME: /usr/local/cuda
+ NVCC: Cuda compilation tools, release 12.2, V12.2.140
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
+ PyTorch: 2.4.1+cu121
+ PyTorch compiling details: PyTorch built with:
+ - GCC 9.3
+ - C++ Version: 201703
+ - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
+ - Intel(R) MKL-DNN v3.4.2 (Git Hash 1137e04ec0b5251ca2b4400a4fd3c667ce843d67)
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
+ - LAPACK is enabled (usually provided by MKL)
+ - NNPACK is enabled
+ - CPU capability usage: AVX512
+ - CUDA Runtime 12.1
+ - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
+ - CuDNN 90.1 (built against CUDA 12.4)
+ - Magma 2.6.1
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=9.1.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.4.1, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,
+
+ TorchVision: 0.19.1+cu121
+ OpenCV: 4.10.0
+ MMEngine: 0.10.5
+
+Runtime environment:
+ launcher: none
+ randomness: {'seed': None, 'deterministic': False}
+ cudnn_benchmark: False
+ mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
+ dist_cfg: {'backend': 'nccl'}
+ seed: None
+ deterministic: False
+ Distributed launcher: none
+ Distributed training: False
+ GPU number: 1
+------------------------------------------------------------
+
+2024/12/25 11:15:30 - mmengine - INFO - Config:
+accumulative_counts = 2
+batch_size = 4
+betas = (
+ 0.9,
+ 0.999,
+)
+custom_hooks = [
+ dict(
+ tokenizer=dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained'),
+ type='xtuner.engine.hooks.DatasetInfoHook'),
+]
+data_path = '/root/share/datasets/FoodieQA/sivqa_llava.json'
+data_root = '/root/share/datasets/FoodieQA/'
+dataloader_num_workers = 4
+default_hooks = dict(
+ checkpoint=dict(
+ by_epoch=False,
+ interval=64,
+ max_keep_ckpts=-1,
+ save_optimizer=False,
+ type='mmengine.hooks.CheckpointHook'),
+ logger=dict(
+ interval=10,
+ log_metric_by_epoch=False,
+ type='mmengine.hooks.LoggerHook'),
+ param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
+ sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
+ timer=dict(type='mmengine.hooks.IterTimerHook'))
+env_cfg = dict(
+ cudnn_benchmark=False,
+ dist_cfg=dict(backend='nccl'),
+ mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
+image_folder = '/root/share/datasets/FoodieQA/'
+launcher = 'none'
+llava_dataset = dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset')
+load_from = None
+log_level = 'INFO'
+log_processor = dict(by_epoch=False)
+lr = 3e-05
+max_epochs = 10
+max_length = 8192
+max_norm = 1
+model = dict(
+ freeze_llm=True,
+ freeze_visual_encoder=True,
+ llm_lora=dict(
+ lora_alpha=256,
+ lora_dropout=0.05,
+ r=128,
+ target_modules=None,
+ task_type='CAUSAL_LM',
+ type='peft.LoraConfig'),
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ type='xtuner.model.InternVL_V1_5')
+optim_type = 'torch.optim.AdamW'
+optim_wrapper = dict(
+ optimizer=dict(
+ betas=(
+ 0.9,
+ 0.999,
+ ),
+ lr=3e-05,
+ type='torch.optim.AdamW',
+ weight_decay=0.05),
+ type='DeepSpeedOptimWrapper')
+param_scheduler = [
+ dict(
+ begin=0,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=0.3,
+ start_factor=1e-05,
+ type='mmengine.optim.LinearLR'),
+ dict(
+ begin=0.3,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=10,
+ eta_min=0.0,
+ type='mmengine.optim.CosineAnnealingLR'),
+]
+path = '/root/share/new_models/OpenGVLab/InternVL2-2B'
+prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat'
+randomness = dict(deterministic=False, seed=None)
+resume = False
+runner_type = 'FlexibleRunner'
+save_steps = 64
+save_total_limit = -1
+strategy = dict(
+ config=dict(
+ bf16=dict(enabled=True),
+ fp16=dict(enabled=False, initial_scale_power=16),
+ gradient_accumulation_steps='auto',
+ gradient_clipping='auto',
+ train_micro_batch_size_per_gpu='auto',
+ zero_allow_untested_optimizer=True,
+ zero_force_ds_cpu_optimizer=False,
+ zero_optimization=dict(overlap_comm=True, stage=2)),
+ exclude_frozen_parameters=True,
+ gradient_accumulation_steps=2,
+ gradient_clipping=1,
+ sequence_parallel_size=1,
+ train_micro_batch_size_per_gpu=4,
+ type='xtuner.engine.DeepSpeedStrategy')
+tokenizer = dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained')
+train_cfg = dict(max_epochs=10, type='xtuner.engine.runner.TrainLoop')
+train_dataloader = dict(
+ batch_size=4,
+ collate_fn=dict(type='xtuner.dataset.collate_fns.default_collate_fn'),
+ dataset=dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset'),
+ num_workers=4,
+ sampler=dict(
+ length_property='modality_length',
+ per_device_batch_size=8,
+ type='xtuner.dataset.samplers.LengthGroupedSampler'))
+visualizer = None
+warmup_ratio = 0.03
+weight_decay = 0.05
+work_dir = './work_dirs/internvl_v2_internlm2_2b_lora_finetune_food'
+
+2024/12/25 11:15:31 - mmengine - WARNING - Failed to search registry with scope "mmengine" in the "builder" registry tree. As a workaround, the current "builder" registry in "xtuner" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmengine" is a correct scope, or whether the registry is initialized.
+2024/12/25 11:15:31 - mmengine - INFO - Hooks will be executed in the following order:
+before_run:
+(VERY_HIGH ) RuntimeInfoHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+before_train:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(NORMAL ) DatasetInfoHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_train_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(NORMAL ) DistSamplerSeedHook
+ --------------------
+before_train_iter:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+ --------------------
+after_train_iter:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+after_train_epoch:
+(NORMAL ) IterTimerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_val:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) DatasetInfoHook
+ --------------------
+before_val_epoch:
+(NORMAL ) IterTimerHook
+ --------------------
+before_val_iter:
+(NORMAL ) IterTimerHook
+ --------------------
+after_val_iter:
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_val_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+after_val:
+(VERY_HIGH ) RuntimeInfoHook
+ --------------------
+after_train:
+(VERY_HIGH ) RuntimeInfoHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_test:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) DatasetInfoHook
+ --------------------
+before_test_epoch:
+(NORMAL ) IterTimerHook
+ --------------------
+before_test_iter:
+(NORMAL ) IterTimerHook
+ --------------------
+after_test_iter:
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_test_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_test:
+(VERY_HIGH ) RuntimeInfoHook
+ --------------------
+after_run:
+(BELOW_NORMAL) LoggerHook
+ --------------------
+2024/12/25 11:15:31 - mmengine - INFO - Starting to loading data and calc length
+2024/12/25 11:15:31 - mmengine - INFO - =======Starting to process /root/share/datasets/FoodieQA/sivqa_llava.json =======
+2024/12/25 11:15:31 - mmengine - INFO - =======total 256 samples of /root/share/datasets/FoodieQA/sivqa_llava.json=======
+2024/12/25 11:15:31 - mmengine - INFO - end loading data and calc length
+2024/12/25 11:15:31 - mmengine - INFO - =======total 256 samples=======
+2024/12/25 11:15:32 - mmengine - INFO - LengthGroupedSampler is used.
+2024/12/25 11:15:32 - mmengine - INFO - LengthGroupedSampler construction is complete, and the selected attribute is modality_length
+2024/12/25 11:15:32 - mmengine - WARNING - Dataset InternVL_V1_5_Dataset has no metainfo. ``dataset_meta`` in visualizer will be None.
+2024/12/25 11:15:32 - mmengine - INFO - Start to load InternVL_V1_5 model.
+2024/12/25 11:16:14 - mmengine - INFO - InternVL_V1_5(
+ (data_preprocessor): BaseDataPreprocessor()
+ (model): InternVLChatModel(
+ (vision_model): InternVisionModel(
+ (embeddings): InternVisionEmbeddings(
+ (patch_embedding): Conv2d(3, 1024, kernel_size=(14, 14), stride=(14, 14))
+ )
+ (encoder): InternVisionEncoder(
+ (layers): ModuleList(
+ (0-23): 24 x InternVisionEncoderLayer(
+ (attn): InternAttention(
+ (qkv): Linear(in_features=1024, out_features=3072, bias=True)
+ (attn_drop): Dropout(p=0.0, inplace=False)
+ (proj_drop): Dropout(p=0.0, inplace=False)
+ (proj): Linear(in_features=1024, out_features=1024, bias=True)
+ )
+ (mlp): InternMLP(
+ (act): GELUActivation()
+ (fc1): Linear(in_features=1024, out_features=4096, bias=True)
+ (fc2): Linear(in_features=4096, out_features=1024, bias=True)
+ )
+ (norm1): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
+ (norm2): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
+ (drop_path1): Identity()
+ (drop_path2): Identity()
+ )
+ )
+ )
+ )
+ (language_model): PeftModelForCausalLM(
+ (base_model): LoraModel(
+ (model): InternLM2ForCausalLM(
+ (model): InternLM2Model(
+ (tok_embeddings): Embedding(92553, 2048, padding_idx=2)
+ (layers): ModuleList(
+ (0-23): 24 x InternLM2DecoderLayer(
+ (attention): InternLM2Attention(
+ (wqkv): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=4096, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=4096, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (wo): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=2048, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=2048, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (rotary_emb): InternLM2DynamicNTKScalingRotaryEmbedding()
+ )
+ (feed_forward): InternLM2MLP(
+ (w1): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=8192, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=8192, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (w3): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=8192, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=8192, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (w2): lora.Linear(
+ (base_layer): Linear(in_features=8192, out_features=2048, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=8192, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=2048, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (act_fn): SiLU()
+ )
+ (attention_norm): InternLM2RMSNorm()
+ (ffn_norm): InternLM2RMSNorm()
+ )
+ )
+ (norm): InternLM2RMSNorm()
+ )
+ (output): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=92553, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=92553, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ )
+ )
+ )
+ (mlp1): Sequential(
+ (0): LayerNorm((4096,), eps=1e-05, elementwise_affine=True)
+ (1): Linear(in_features=4096, out_features=2048, bias=True)
+ (2): GELU(approximate='none')
+ (3): Linear(in_features=2048, out_features=2048, bias=True)
+ )
+ )
+)
+2024/12/25 11:16:14 - mmengine - INFO - InternVL_V1_5 construction is complete
diff --git a/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/vis_data/config.py b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/vis_data/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e03a56b0d09f5f7e3fe173adf5b8088953c1cea
--- /dev/null
+++ b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241225_111529/vis_data/config.py
@@ -0,0 +1,139 @@
+accumulative_counts = 2
+batch_size = 4
+betas = (
+ 0.9,
+ 0.999,
+)
+custom_hooks = [
+ dict(
+ tokenizer=dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained'),
+ type='xtuner.engine.hooks.DatasetInfoHook'),
+]
+data_path = '/root/share/datasets/FoodieQA/sivqa_llava.json'
+data_root = '/root/share/datasets/FoodieQA/'
+dataloader_num_workers = 4
+default_hooks = dict(
+ checkpoint=dict(
+ by_epoch=False,
+ interval=64,
+ max_keep_ckpts=-1,
+ save_optimizer=False,
+ type='mmengine.hooks.CheckpointHook'),
+ logger=dict(
+ interval=10,
+ log_metric_by_epoch=False,
+ type='mmengine.hooks.LoggerHook'),
+ param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
+ sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
+ timer=dict(type='mmengine.hooks.IterTimerHook'))
+env_cfg = dict(
+ cudnn_benchmark=False,
+ dist_cfg=dict(backend='nccl'),
+ mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
+image_folder = '/root/share/datasets/FoodieQA/'
+launcher = 'none'
+llava_dataset = dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset')
+load_from = None
+log_level = 'INFO'
+log_processor = dict(by_epoch=False)
+lr = 3e-05
+max_epochs = 10
+max_length = 8192
+max_norm = 1
+model = dict(
+ freeze_llm=True,
+ freeze_visual_encoder=True,
+ llm_lora=dict(
+ lora_alpha=256,
+ lora_dropout=0.05,
+ r=128,
+ target_modules=None,
+ task_type='CAUSAL_LM',
+ type='peft.LoraConfig'),
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ type='xtuner.model.InternVL_V1_5')
+optim_type = 'torch.optim.AdamW'
+optim_wrapper = dict(
+ optimizer=dict(
+ betas=(
+ 0.9,
+ 0.999,
+ ),
+ lr=3e-05,
+ type='torch.optim.AdamW',
+ weight_decay=0.05),
+ type='DeepSpeedOptimWrapper')
+param_scheduler = [
+ dict(
+ begin=0,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=0.3,
+ start_factor=1e-05,
+ type='mmengine.optim.LinearLR'),
+ dict(
+ begin=0.3,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=10,
+ eta_min=0.0,
+ type='mmengine.optim.CosineAnnealingLR'),
+]
+path = '/root/share/new_models/OpenGVLab/InternVL2-2B'
+prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat'
+randomness = dict(deterministic=False, seed=None)
+resume = False
+runner_type = 'FlexibleRunner'
+save_steps = 64
+save_total_limit = -1
+strategy = dict(
+ config=dict(
+ bf16=dict(enabled=True),
+ fp16=dict(enabled=False, initial_scale_power=16),
+ gradient_accumulation_steps='auto',
+ gradient_clipping='auto',
+ train_micro_batch_size_per_gpu='auto',
+ zero_allow_untested_optimizer=True,
+ zero_force_ds_cpu_optimizer=False,
+ zero_optimization=dict(overlap_comm=True, stage=2)),
+ exclude_frozen_parameters=True,
+ gradient_accumulation_steps=2,
+ gradient_clipping=1,
+ sequence_parallel_size=1,
+ train_micro_batch_size_per_gpu=4,
+ type='xtuner.engine.DeepSpeedStrategy')
+tokenizer = dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained')
+train_cfg = dict(max_epochs=10, type='xtuner.engine.runner.TrainLoop')
+train_dataloader = dict(
+ batch_size=4,
+ collate_fn=dict(type='xtuner.dataset.collate_fns.default_collate_fn'),
+ dataset=dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset'),
+ num_workers=4,
+ sampler=dict(
+ length_property='modality_length',
+ per_device_batch_size=8,
+ type='xtuner.dataset.samplers.LengthGroupedSampler'))
+visualizer = None
+warmup_ratio = 0.03
+weight_decay = 0.05
+work_dir = './work_dirs/internvl_v2_internlm2_2b_lora_finetune_food'
diff --git a/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241226_091548/20241226_091548.log b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241226_091548/20241226_091548.log
new file mode 100644
index 0000000000000000000000000000000000000000..858516b8bcb23ad2091d09447923d9d253be5563
--- /dev/null
+++ b/work_dirs/internvl_v2_internlm2_2b_lora_finetune_food/20241226_091548/20241226_091548.log
@@ -0,0 +1,486 @@
+2024/12/26 09:15:49 - mmengine - INFO -
+------------------------------------------------------------
+System environment:
+ sys.platform: linux
+ Python: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]
+ CUDA available: True
+ MUSA available: False
+ numpy_random_seed: 127347971
+ GPU 0: NVIDIA A100-SXM4-80GB
+ CUDA_HOME: /usr/local/cuda
+ NVCC: Cuda compilation tools, release 12.2, V12.2.140
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
+ PyTorch: 2.4.1+cu121
+ PyTorch compiling details: PyTorch built with:
+ - GCC 9.3
+ - C++ Version: 201703
+ - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
+ - Intel(R) MKL-DNN v3.4.2 (Git Hash 1137e04ec0b5251ca2b4400a4fd3c667ce843d67)
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
+ - LAPACK is enabled (usually provided by MKL)
+ - NNPACK is enabled
+ - CPU capability usage: AVX512
+ - CUDA Runtime 12.1
+ - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
+ - CuDNN 90.1 (built against CUDA 12.4)
+ - Magma 2.6.1
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=9.1.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.4.1, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,
+
+ TorchVision: 0.19.1+cu121
+ OpenCV: 4.10.0
+ MMEngine: 0.10.5
+
+Runtime environment:
+ launcher: none
+ randomness: {'seed': None, 'deterministic': False}
+ cudnn_benchmark: False
+ mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
+ dist_cfg: {'backend': 'nccl'}
+ seed: None
+ deterministic: False
+ Distributed launcher: none
+ Distributed training: False
+ GPU number: 1
+------------------------------------------------------------
+
+2024/12/26 09:15:49 - mmengine - INFO - Config:
+accumulative_counts = 2
+batch_size = 4
+betas = (
+ 0.9,
+ 0.999,
+)
+custom_hooks = [
+ dict(
+ tokenizer=dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained'),
+ type='xtuner.engine.hooks.DatasetInfoHook'),
+]
+data_path = '/root/share/datasets/FoodieQA/sivqa_llava.json'
+data_root = '/root/share/datasets/FoodieQA/'
+dataloader_num_workers = 4
+default_hooks = dict(
+ checkpoint=dict(
+ by_epoch=False,
+ interval=64,
+ max_keep_ckpts=-1,
+ save_optimizer=False,
+ type='mmengine.hooks.CheckpointHook'),
+ logger=dict(
+ interval=10,
+ log_metric_by_epoch=False,
+ type='mmengine.hooks.LoggerHook'),
+ param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
+ sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
+ timer=dict(type='mmengine.hooks.IterTimerHook'))
+env_cfg = dict(
+ cudnn_benchmark=False,
+ dist_cfg=dict(backend='nccl'),
+ mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
+image_folder = '/root/share/datasets/FoodieQA/'
+launcher = 'none'
+llava_dataset = dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset')
+load_from = None
+log_level = 'INFO'
+log_processor = dict(by_epoch=False)
+lr = 3e-05
+max_epochs = 10
+max_length = 8192
+max_norm = 1
+model = dict(
+ freeze_llm=True,
+ freeze_visual_encoder=True,
+ llm_lora=dict(
+ lora_alpha=256,
+ lora_dropout=0.05,
+ r=128,
+ target_modules=None,
+ task_type='CAUSAL_LM',
+ type='peft.LoraConfig'),
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ type='xtuner.model.InternVL_V1_5')
+optim_type = 'torch.optim.AdamW'
+optim_wrapper = dict(
+ optimizer=dict(
+ betas=(
+ 0.9,
+ 0.999,
+ ),
+ lr=3e-05,
+ type='torch.optim.AdamW',
+ weight_decay=0.05),
+ type='DeepSpeedOptimWrapper')
+param_scheduler = [
+ dict(
+ begin=0,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=0.3,
+ start_factor=1e-05,
+ type='mmengine.optim.LinearLR'),
+ dict(
+ begin=0.3,
+ by_epoch=True,
+ convert_to_iter_based=True,
+ end=10,
+ eta_min=0.0,
+ type='mmengine.optim.CosineAnnealingLR'),
+]
+path = '/root/share/new_models/OpenGVLab/InternVL2-2B'
+prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat'
+randomness = dict(deterministic=False, seed=None)
+resume = False
+runner_type = 'FlexibleRunner'
+save_steps = 64
+save_total_limit = -1
+strategy = dict(
+ config=dict(
+ bf16=dict(enabled=True),
+ fp16=dict(enabled=False, initial_scale_power=16),
+ gradient_accumulation_steps='auto',
+ gradient_clipping='auto',
+ train_micro_batch_size_per_gpu='auto',
+ zero_allow_untested_optimizer=True,
+ zero_force_ds_cpu_optimizer=False,
+ zero_optimization=dict(overlap_comm=True, stage=2)),
+ exclude_frozen_parameters=True,
+ gradient_accumulation_steps=2,
+ gradient_clipping=1,
+ sequence_parallel_size=1,
+ train_micro_batch_size_per_gpu=4,
+ type='xtuner.engine.DeepSpeedStrategy')
+tokenizer = dict(
+ pretrained_model_name_or_path=
+ '/root/share/new_models/OpenGVLab/InternVL2-2B',
+ trust_remote_code=True,
+ type='transformers.AutoTokenizer.from_pretrained')
+train_cfg = dict(max_epochs=10, type='xtuner.engine.runner.TrainLoop')
+train_dataloader = dict(
+ batch_size=4,
+ collate_fn=dict(type='xtuner.dataset.collate_fns.default_collate_fn'),
+ dataset=dict(
+ data_paths='/root/share/datasets/FoodieQA/sivqa_llava.json',
+ image_folders='/root/share/datasets/FoodieQA/',
+ max_length=8192,
+ model_path='/root/share/new_models/OpenGVLab/InternVL2-2B',
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
+ type='xtuner.dataset.InternVL_V1_5_Dataset'),
+ num_workers=4,
+ sampler=dict(
+ length_property='modality_length',
+ per_device_batch_size=8,
+ type='xtuner.dataset.samplers.LengthGroupedSampler'))
+visualizer = None
+warmup_ratio = 0.03
+weight_decay = 0.05
+work_dir = './work_dirs/internvl_v2_internlm2_2b_lora_finetune_food'
+
+2024/12/26 09:15:49 - mmengine - WARNING - Failed to search registry with scope "mmengine" in the "builder" registry tree. As a workaround, the current "builder" registry in "xtuner" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmengine" is a correct scope, or whether the registry is initialized.
+2024/12/26 09:15:50 - mmengine - INFO - Hooks will be executed in the following order:
+before_run:
+(VERY_HIGH ) RuntimeInfoHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+before_train:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(NORMAL ) DatasetInfoHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_train_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(NORMAL ) DistSamplerSeedHook
+ --------------------
+before_train_iter:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+ --------------------
+after_train_iter:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+after_train_epoch:
+(NORMAL ) IterTimerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_val:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) DatasetInfoHook
+ --------------------
+before_val_epoch:
+(NORMAL ) IterTimerHook
+ --------------------
+before_val_iter:
+(NORMAL ) IterTimerHook
+ --------------------
+after_val_iter:
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_val_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+(LOW ) ParamSchedulerHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+after_val:
+(VERY_HIGH ) RuntimeInfoHook
+ --------------------
+after_train:
+(VERY_HIGH ) RuntimeInfoHook
+(VERY_LOW ) CheckpointHook
+ --------------------
+before_test:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) DatasetInfoHook
+ --------------------
+before_test_epoch:
+(NORMAL ) IterTimerHook
+ --------------------
+before_test_iter:
+(NORMAL ) IterTimerHook
+ --------------------
+after_test_iter:
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_test_epoch:
+(VERY_HIGH ) RuntimeInfoHook
+(NORMAL ) IterTimerHook
+(BELOW_NORMAL) LoggerHook
+ --------------------
+after_test:
+(VERY_HIGH ) RuntimeInfoHook
+ --------------------
+after_run:
+(BELOW_NORMAL) LoggerHook
+ --------------------
+2024/12/26 09:15:50 - mmengine - INFO - Starting to loading data and calc length
+2024/12/26 09:15:50 - mmengine - INFO - =======Starting to process /root/share/datasets/FoodieQA/sivqa_llava.json =======
+2024/12/26 09:15:50 - mmengine - INFO - =======total 256 samples of /root/share/datasets/FoodieQA/sivqa_llava.json=======
+2024/12/26 09:15:50 - mmengine - INFO - end loading data and calc length
+2024/12/26 09:15:50 - mmengine - INFO - =======total 256 samples=======
+2024/12/26 09:15:50 - mmengine - INFO - LengthGroupedSampler is used.
+2024/12/26 09:15:50 - mmengine - INFO - LengthGroupedSampler construction is complete, and the selected attribute is modality_length
+2024/12/26 09:15:50 - mmengine - WARNING - Dataset InternVL_V1_5_Dataset has no metainfo. ``dataset_meta`` in visualizer will be None.
+2024/12/26 09:15:51 - mmengine - INFO - Start to load InternVL_V1_5 model.
+2024/12/26 09:16:14 - mmengine - INFO - InternVL_V1_5(
+ (data_preprocessor): BaseDataPreprocessor()
+ (model): InternVLChatModel(
+ (vision_model): InternVisionModel(
+ (embeddings): InternVisionEmbeddings(
+ (patch_embedding): Conv2d(3, 1024, kernel_size=(14, 14), stride=(14, 14))
+ )
+ (encoder): InternVisionEncoder(
+ (layers): ModuleList(
+ (0-23): 24 x InternVisionEncoderLayer(
+ (attn): InternAttention(
+ (qkv): Linear(in_features=1024, out_features=3072, bias=True)
+ (attn_drop): Dropout(p=0.0, inplace=False)
+ (proj_drop): Dropout(p=0.0, inplace=False)
+ (proj): Linear(in_features=1024, out_features=1024, bias=True)
+ )
+ (mlp): InternMLP(
+ (act): GELUActivation()
+ (fc1): Linear(in_features=1024, out_features=4096, bias=True)
+ (fc2): Linear(in_features=4096, out_features=1024, bias=True)
+ )
+ (norm1): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
+ (norm2): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
+ (drop_path1): Identity()
+ (drop_path2): Identity()
+ )
+ )
+ )
+ )
+ (language_model): PeftModelForCausalLM(
+ (base_model): LoraModel(
+ (model): InternLM2ForCausalLM(
+ (model): InternLM2Model(
+ (tok_embeddings): Embedding(92553, 2048, padding_idx=2)
+ (layers): ModuleList(
+ (0-23): 24 x InternLM2DecoderLayer(
+ (attention): InternLM2Attention(
+ (wqkv): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=4096, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=4096, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (wo): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=2048, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=2048, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (rotary_emb): InternLM2DynamicNTKScalingRotaryEmbedding()
+ )
+ (feed_forward): InternLM2MLP(
+ (w1): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=8192, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=8192, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (w3): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=8192, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=8192, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (w2): lora.Linear(
+ (base_layer): Linear(in_features=8192, out_features=2048, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=8192, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=2048, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ (act_fn): SiLU()
+ )
+ (attention_norm): InternLM2RMSNorm()
+ (ffn_norm): InternLM2RMSNorm()
+ )
+ )
+ (norm): InternLM2RMSNorm()
+ )
+ (output): lora.Linear(
+ (base_layer): Linear(in_features=2048, out_features=92553, bias=False)
+ (lora_dropout): ModuleDict(
+ (default): Dropout(p=0.05, inplace=False)
+ )
+ (lora_A): ModuleDict(
+ (default): Linear(in_features=2048, out_features=128, bias=False)
+ )
+ (lora_B): ModuleDict(
+ (default): Linear(in_features=128, out_features=92553, bias=False)
+ )
+ (lora_embedding_A): ParameterDict()
+ (lora_embedding_B): ParameterDict()
+ (lora_magnitude_vector): ModuleDict()
+ )
+ )
+ )
+ )
+ (mlp1): Sequential(
+ (0): LayerNorm((4096,), eps=1e-05, elementwise_affine=True)
+ (1): Linear(in_features=4096, out_features=2048, bias=True)
+ (2): GELU(approximate='none')
+ (3): Linear(in_features=2048, out_features=2048, bias=True)
+ )
+ )
+)
+2024/12/26 09:16:14 - mmengine - INFO - InternVL_V1_5 construction is complete
+2024/12/26 09:16:21 - mmengine - INFO - Num train samples 256
+2024/12/26 09:16:21 - mmengine - INFO - train example:
+2024/12/26 09:16:22 - mmengine - INFO - <|im_start|> system
+You are an AI assistant whose name is InternLM (书生·浦语).<|im_end|><|im_start|>user
+