diff --git a/data/README.md b/data/README.md index 4cc92b43..e43e0eed 100644 --- a/data/README.md +++ b/data/README.md @@ -173,7 +173,7 @@ An additional column `audios` is required. Please refer to the [sharegpt](#share Compared to the alpaca format, the sharegpt format allows the datasets have **more roles**, such as human, gpt, observation and function. They are presented in a list of objects in the `conversations` column. -Note that the human and observation should appear in odd positions, while gpt and function should appear in even positions. +Note that the human and observation should appear in odd positions, while gpt and function should appear in even positions. The gpt and function will be learned by the model. ```json [ diff --git a/data/README_zh.md b/data/README_zh.md index 225993b3..56c1f424 100644 --- a/data/README_zh.md +++ b/data/README_zh.md @@ -172,7 +172,7 @@ KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#s 相比 alpaca 格式的数据集,sharegpt 格式支持**更多的角色种类**,例如 human、gpt、observation、function 等等。它们构成一个对象列表呈现在 `conversations` 列中。 -注意其中 human 和 observation 必须出现在奇数位置,gpt 和 function 必须出现在偶数位置。 +注意其中 human 和 observation 必须出现在奇数位置,gpt 和 function 必须出现在偶数位置。默认所有的 gpt 和 function 会被用于学习。 ```json [ diff --git a/src/llamafactory/webui/components/footer.py b/src/llamafactory/webui/components/footer.py index f1b73abb..6ee9bbce 100644 --- a/src/llamafactory/webui/components/footer.py +++ b/src/llamafactory/webui/components/footer.py @@ -28,14 +28,17 @@ if TYPE_CHECKING: def get_device_memory() -> "gr.Slider": free, total = get_current_memory() - used = round((total - free) / (1024**3), 2) - total = round(total / (1024**3), 2) - return gr.Slider(minimum=0, maximum=total, value=used, step=0.01) + if total != -1: + used = round((total - free) / (1024**3), 2) + total = round(total / (1024**3), 2) + return gr.Slider(minimum=0, maximum=total, value=used, step=0.01, visible=True) + else: + return gr.Slider(visible=False) def create_footer() -> dict[str, "Component"]: with gr.Row(): - device_memory = gr.Slider(interactive=False) + device_memory = gr.Slider(visible=False, interactive=False) timer = gr.Timer(value=5) timer.tick(get_device_memory, outputs=[device_memory], queue=False)