ChatGLM Series 8: Fine-tuning the medical question and answer system

1. ChatGLM2-6B ChatGLM2-6B is the second-generation version of ChatGLM-6B. On the basis of retaining many excellent features of the first-generation model such as smooth dialogue and low deployment threshold, it also introduces many new features, such as: more powerful performance, longer context, more efficient reasoning, more open protocols, etc. 2. P-tuning v2 P-tuning v2 fine-tuning […]

ChatGLM2-6B model early adopter

1. Preface ChatGLM2-6B is the second-generation version of the open source Chinese-English bilingual dialogue model ChatGLM-6B. While retaining many excellent features of the first-generation model such as smooth dialogue and low deployment threshold, ChatGLM2-6B introduces the following new features: More powerful performance: Based on the development experience of the first-generation ChatGLM model, we have comprehensively […]

ChatGLM Series 6: Questions and Answers Based on Knowledge Base

1. Install milvus Download milvus-standalone-docker-compose.yml and save as docker-compose.yml wget https://github.com/milvus-io/milvus/releases/download/v2.3.2/milvus-standalone-docker-compose.yml -O docker-compose.yml Run milvus sudo docker-compose up -d 2. Document preprocessing import os import re import jieba import torch import pandas as pd from pymilvus import utility from pymilvus import connections, CollectionSchema, FieldSchema, Collection, DataType from transformers import AutoTokenizer, AutoModel connections.connect( alias=”default”, host=’localhost’, port=’19530′ […]

Original: flagship game graphics card (980Ti, 1080Ti, TiTan V, 2080Ti, 3090, 4090), AI drawing stable diffusion) and large model (chatglm2-6b) inference performance are rated highly

Foreword: Since the release of ChatGPT and stable diffusion last October triggered a wave of generative AI, but many people, especially some leaders, have been talking about artificial intelligence at conferences all day It brings various risks and shortcomings. In fact, I have almost never used ChatGPT and stable diffusion, and I only have a […]

Ubuntu18.4 (later changed to 20.4) deploys chatglm2 and performs fine-tuning based on P-Tuning v2

Ubuntu18.4 supports cuda11 but not cuda12, ubuntu20.4 supports cuda12! ! Download driver NVIDIA graphics card driver official download address Download the corresponding driver and place it in a certain directory. Before installing the NVIDIA graphics driver in a Linux system, it is recommended to uninstall the graphics driver nouveau that comes with the Linux system. […]

ChatGLM2-INT4 + Lora structural adaptation and transformation

Lora is currently recognized as the best fine-tuning method. On the one hand, it does not change the architecture of the original model like AdapterTuning, making it inconvenient to migrate between different frameworks. On the other hand, it does not change all tasks like PTuning. The word generation probability seriously damages the acquired knowledge. ChatGLM2-INT4 […]

[ChatGLM2-6B] Deploy on a Linux server with only CPU

Introduction ChatGLM2-6B is an open source conversational language model developed by Tsinghua University that supports Chinese and English bilingualism. After 1.4T pre-training of Chinese and English identifiers and human preference alignment training, ChatGLM2-6B with 6.2 billion parameters has been able to generate quite Answers consistent with human preferences. Combined with model quantization technology, users can […]

Large model deployment notes (16) ChatGLM2+Ubuntu+LongChain-ChatChat

1. Introduction Organization: Zhipu/Tsinghua University Code warehouse: https://github.com/THUDM/ChatGLM2-6B Model: THUDM/chatglm2-6b Embedding model moka-ai/m3e-base Download: https://huggingface.co/THUDM/chatglm2-6b https://huggingface.co/moka-ai/m3e-base Mirror download: https://aliendao.cn/models/THUDM/chatglm2-6b Hardware environment: Shadow Elf 7Plus Ubuntu version: 18.04 Memory 32G GPU graphics card: Nvidia GTX 3080 Laptop (16G) 2. Code and model download Reference Large Model Deployment Notes (5) ChatGLM2 + Jetson AGX Orin-Cloud Community-Huawei Cloud […]

Teach you how to fine-tune ChatGLM based on MindSpore

Clone Hugging Face model Clone the chatglm-6b code repository and download the distributed model files git lfs install git clone https://huggingface.co/THUDM/chatglm-6b Prepare the environment InstallTransformer pip install transformers Execute the python script to merge model weights. from transformers import AutoModel import torch as pt pt_ckpt_path=”./models/chatglm-6b” model = AutoModel.from_pretrained(pt_ckpt_path, trust_remote_code=True).half() pt_pth_path = “models/mindspore/pt_glm_6b.pth” pt.save(model.state_dict(), pt_pth_path) Execute […]

[Open Source] Write a Java-interfaced SDK for ChatGLM

Author: Brother Xiao Fu – Baidu Search Brother Xiao Fu bugstack Blog: bugstack.cn Precipitate, share, grow, so that you and others can gain something! Hello everyone, I am Brother Fu, the master of technical UP. The ultra-large-scale training model ChatGLM-130B of the Department of Computer Science of Tsinghua University is very effective, so I also […]