diff --git a/README.md b/README.md index baf7d97..2648dde 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@
🌐 Blog • 🤗 HF Repo • 🐦 Twitter • 📃 [GLM@ACL 22] [GitHub] • 📃 [GLM-130B@ICLR 23] [GitHub]
+ 🌐 Blog • 🤗 HF Repo • 🐦 Twitter • 📃 [GLM@ACL 22] [GitHub] • 📃 [GLM-130B@ICLR 23] [GitHub]
+
+ 👋 Join our Slack and WeChat +
+ ## Introduction ChatGLM-6B is an open bilingual language model based on [General Language Model (GLM)](https://github.com/THUDM/GLM) framework, with 6.2 billion parameters. With the quantization technique, users can deploy locally on consumer-grade graphics cards (only 6GB of GPU memory is required at the INT4 quantization level). diff --git a/ptuning/README.md b/ptuning/README.md index ab91468..ffa45ba 100644 --- a/ptuning/README.md +++ b/ptuning/README.md @@ -155,15 +155,15 @@ for k, v in prefix_state_dict.items(): new_prefix_state_dict[k[len("transformer.prefix_encoder."):]] = v model.transformer.prefix_encoder.load_state_dict(new_prefix_state_dict) ``` -注意你可能需要将 `pre_seq_len` 改成你训练时的实际值。 +注意你可能需要将 `pre_seq_len` 改成你训练时的实际值。如果你是[从本地加载模型的话](https://github.com/THUDM/ChatGLM-6B#%E4%BB%8E%E6%9C%AC%E5%9C%B0%E5%8A%A0%E8%BD%BD%E6%A8%A1%E5%9E%8B),需要将 `THUDM/chatglm-6b` 改成本地的模型路径(注意不是checkpoint路径)。 -(2) 如果需要加载的是旧 Checkpoint(包含 ChatGLM-6B 以及 PrefixEncoder 参数),则直接加载整个 Checkpoint: +(2) 如果需要加载的是旧 Checkpoint(包含 ChatGLM-6B 以及 PrefixEncoder 参数),或者进行的全参数微调,则直接加载整个 Checkpoint: ```python model = AutoModel.from_pretrained(CHECKPOINT_PATH, config=config, trust_remote_code=True) ``` -再进行量化即可使用: +之后根据需求可以进行量化,也可以直接使用: ```python print(f"Quantized to 4 bit") @@ -176,7 +176,7 @@ response, history = model.chat(tokenizer, "你好", history=[]) ``` ## 使用自己的数据集 -修改 `train.sh` 和 `evaluate.sh` 中的 `train_file`、`validation_file`和`test_file`为你自己的 JSON 格式数据集路径,并将 `prompt_column` 和 `response_column` 改为 JSON 文件中输入文本和输出文本对应的 KEY。 +修改 `train.sh` 和 `evaluate.sh` 中的 `train_file`、`validation_file`和`test_file`为你自己的 JSON 格式数据集路径,并将 `prompt_column` 和 `response_column` 改为 JSON 文件中输入文本和输出文本对应的 KEY。可能还需要增大 `max_source_length` 和 `max_target_length` 来匹配你自己的数据集中的最大输入输出长度。 ## 对话数据集 diff --git a/resources/WECHAT.md b/resources/WECHAT.md new file mode 100644 index 0000000..c9ee867 --- /dev/null +++ b/resources/WECHAT.md @@ -0,0 +1,7 @@ +扫码关注公众号,加入「ChatGLM交流群」
+Scan the QR code to follow the official account and join the "ChatGLM Discussion Group"
+