From 1c1d6bea43b5d3b892b1cc444506baf9359e2474 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 21 Dec 2024 20:59:25 +0800 Subject: [PATCH] docs: use swanlab Former-commit-id: 744ef8c2688efad82028e22683e6c9d874af6823 --- README.md | 21 ++++++++++++++++++++- README_zh.md | 22 +++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9229006..515ba5ff 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Choose your path: - [Download from ModelScope Hub](#download-from-modelscope-hub) - [Download from Modelers Hub](#download-from-modelers-hub) - [Use W&B Logger](#use-wb-logger) + - [Use SwanLab Logger](#use-swanlab-logger) - [Projects using LLaMA Factory](#projects-using-llama-factory) - [License](#license) - [Citation](#citation) @@ -66,7 +67,7 @@ Choose your path: - **Scalable resources**: 16-bit full-tuning, freeze-tuning, LoRA and 2/3/4/5/6/8-bit QLoRA via AQLM/AWQ/GPTQ/LLM.int8/HQQ/EETQ. - **Advanced algorithms**: [GaLore](https://github.com/jiaweizzhao/GaLore), [BAdam](https://github.com/Ledzy/BAdam), [Adam-mini](https://github.com/zyushun/Adam-mini), DoRA, LongLoRA, LLaMA Pro, Mixture-of-Depths, LoRA+, LoftQ, PiSSA and Agent tuning. - **Practical tricks**: [FlashAttention-2](https://github.com/Dao-AILab/flash-attention), [Unsloth](https://github.com/unslothai/unsloth), [Liger Kernel](https://github.com/linkedin/Liger-Kernel), RoPE scaling, NEFTune and rsLoRA. -- **Experiment monitors**: LlamaBoard, TensorBoard, Wandb, MLflow, etc. +- **Experiment monitors**: LlamaBoard, TensorBoard, Wandb, MLflow, SwanLab, etc. - **Faster inference**: OpenAI-style API, Gradio UI and CLI with vLLM worker. ## Benchmark @@ -86,6 +87,8 @@ Compared to ChatGLM's [P-Tuning](https://github.com/THUDM/ChatGLM2-6B/tree/main/ ## Changelog +[24/12/21] We supported **[SwanLab](https://github.com/SwanHubX/SwanLab)** experiment tracking and visualization. See [this section](#use-swanlab-logger) for details. + [24/11/27] We supported fine-tuning the **[Skywork-o1](https://huggingface.co/Skywork/Skywork-o1-Open-Llama-3.1-8B)** model and the **[OpenO1](https://huggingface.co/datasets/O1-OPEN/OpenO1-SFT)** dataset. [24/10/09] We supported downloading pre-trained models and datasets from the **[Modelers Hub](https://modelers.cn/models)**. See [this tutorial](#download-from-modelers-hub) for usage. @@ -633,6 +636,22 @@ run_name: test_run # optional Set `WANDB_API_KEY` to [your key](https://wandb.ai/authorize) when launching training tasks to log in with your W&B account. +### Use SwanLab Logger + +To use [SwanLab](https://github.com/SwanHubX/SwanLab) for logging experimental results, you need to add the following arguments to yaml files. + +```yaml +use_swanlab: true +swanlab_project: test_project # optional +swanlab_experiment_name: test_experiment # optional +``` + +When launching training tasks, you can log in to SwanLab in three ways: + +1. Add `swanlab_api_key=` to the yaml file, and set it to your [API key](https://swanlab.cn/settings). +2. Set the environment variable `SWANLAB_API_KEY` to your [API key](https://swanlab.cn/settings). +3. Use the `swanlab login` command to complete the login. + ## Projects using LLaMA Factory If you have a project that should be incorporated, please contact via email or create a pull request. diff --git a/README_zh.md b/README_zh.md index 4d7ed129..dcfb489c 100644 --- a/README_zh.md +++ b/README_zh.md @@ -55,6 +55,7 @@ https://github.com/user-attachments/assets/e6ce34b0-52d5-4f3e-a830-592106c4c272 - [从魔搭社区下载](#从魔搭社区下载) - [从魔乐社区下载](#从魔乐社区下载) - [使用 W&B 面板](#使用-wb-面板) + - [使用 SwanLab 面板](#使用-swanlab-面板) - [使用了 LLaMA Factory 的项目](#使用了-llama-factory-的项目) - [协议](#协议) - [引用](#引用) @@ -67,7 +68,7 @@ https://github.com/user-attachments/assets/e6ce34b0-52d5-4f3e-a830-592106c4c272 - **多种精度**:16 比特全参数微调、冻结微调、LoRA 微调和基于 AQLM/AWQ/GPTQ/LLM.int8/HQQ/EETQ 的 2/3/4/5/6/8 比特 QLoRA 微调。 - **先进算法**:[GaLore](https://github.com/jiaweizzhao/GaLore)、[BAdam](https://github.com/Ledzy/BAdam)、[Adam-mini](https://github.com/zyushun/Adam-mini)、DoRA、LongLoRA、LLaMA Pro、Mixture-of-Depths、LoRA+、LoftQ、PiSSA 和 Agent 微调。 - **实用技巧**:[FlashAttention-2](https://github.com/Dao-AILab/flash-attention)、[Unsloth](https://github.com/unslothai/unsloth)、[Liger Kernel](https://github.com/linkedin/Liger-Kernel)、RoPE scaling、NEFTune 和 rsLoRA。 -- **实验监控**:LlamaBoard、TensorBoard、Wandb、MLflow 等等。 +- **实验监控**:LlamaBoard、TensorBoard、Wandb、MLflow、SwanLab 等等。 - **极速推理**:基于 vLLM 的 OpenAI 风格 API、浏览器界面和命令行接口。 ## 性能指标 @@ -87,6 +88,8 @@ https://github.com/user-attachments/assets/e6ce34b0-52d5-4f3e-a830-592106c4c272 ## 更新日志 +[24/12/21] 我们支持了 **[SwanLab](https://github.com/SwanHubX/SwanLab)** 跟踪与可视化实验。详细用法请参考 [此部分](#使用-wb-面板)。 + [24/11/27] 我们支持了 **[Skywork-o1](https://huggingface.co/Skywork/Skywork-o1-Open-Llama-3.1-8B)** 模型的微调和 **[OpenO1](https://huggingface.co/datasets/O1-OPEN/OpenO1-SFT)** 数据集。 [24/10/09] 我们支持了从 **[魔乐社区](https://modelers.cn/models)** 下载预训练模型和数据集。详细用法请参照 [此教程](#从魔乐社区下载)。 @@ -634,6 +637,23 @@ run_name: test_run # 可选 在启动训练任务时,将 `WANDB_API_KEY` 设置为[密钥](https://wandb.ai/authorize)来登录 W&B 账户。 +### 使用 SwanLab 面板 + +若要使用 [SwanLab](https://github.com/SwanHubX/SwanLab) 记录实验数据,请在 yaml 文件中添加下面的参数。 + +```yaml +use_swanlab: true +swanlab_project: test_run # 可选 +swanlab_experiment_name: test_experiment # 可选 +``` + +在启动训练任务时,登录SwanLab账户有以下三种方式: + +方式一:在 yaml 文件中添加 `swanlab_api_key=` ,并设置为你的 [API 密钥](https://swanlab.cn/settings)。 +方式二:将环境变量 `SWANLAB_API_KEY` 设置为你的 [API 密钥](https://swanlab.cn/settings)。 +方式三:启动前使用 `swanlab login` 命令完成登录。 + + ## 使用了 LLaMA Factory 的项目 如果您有项目希望添加至下述列表,请通过邮件联系或者创建一个 PR。