From 42dc77793f55a72da1f876a67c15b3b03e5faa95 Mon Sep 17 00:00:00 2001 From: gaoyang07 Date: Fri, 19 Jan 2024 19:29:22 +0800 Subject: [PATCH] update README in tools --- tools/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/README.md b/tools/README.md index f9b69eb..37bf7af 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,9 +1,14 @@ # InternLM2 tools -## Convert to LLaMA +## 1. Convert to LLaMA -`convert2llama.py` can convert InternLM2 to LLaMA: +We offer the `convert2llama.py`, designed to seamlessly transform InternLM2 (HF format) into LLaMA (HF format). Here, HF refers to the format used by HuggingFace Transformers. +### Usage ``` -python convert2llama.py --src /path/to/internlm2 --tgt /path/to/target +python convert2llama.py --src /path/to/internlm2/ckpt --tgt /path/to/target/ckpt ``` + +### Note + +While the `convert2llama.py` tool is available, we still advise opting for InternLM2 when practical, chiefly due to its superior efficiency. InternLM2, which is adapted from LLaMA, streamlines the process by integrating the `Wq`, `Wk`, `Wv` weight matrices into a single matrix `Wqkv`. This integration leads to approximately a **5%** speed increase during training. Given the substantial costs associated with pre-training, this efficiency boost can result in significant savings.