**Usage**


    # 设置环境
    git clone https://github.com/hiyouga/ChatGLM-Efficient-Tuning.git
    conda create -n chatglm_etuning python=3.10
    conda activate chatglm_etuning
    cd ChatGLM-Efficient-Tuning
    pip install -r requirements.txt

    # 模型部署,新建文件夹path_to_checkpoint，下载Laurie/ChatGLM-Efficient-Tuning-SFT里的文件到里面
    import sys
    sys.path.append("src")
    from src import load_pretrained, ModelArguments
    model_args = ModelArguments(checkpoint_dir=path_to_checkpoint)
    model, tokenizer = load_pretrained(model_args)
    model = model.cuda()
    model.eval()
    
    # model.generate, model.chat()...

    # 命令行进行测试
    CUDA_VISIBLE_DEVICES=0 python src/infer.py \
    --checkpoint_dir path_to_checkpoint
{}
region:us
TAGS
#region-us 

Usage


    # 设置环境
    git clone URL
    conda create -n chatglm_etuning python=3.10
    conda activate chatglm_etuning
    cd ChatGLM-Efficient-Tuning
    pip install -r URL

    # 模型部署,新建文件夹path_to_checkpoint，下载Laurie/ChatGLM-Efficient-Tuning-SFT里的文件到里面
    import sys
    URL("src")
    from src import load_pretrained, ModelArguments
    model_args = ModelArguments(checkpoint_dir=path_to_checkpoint)
    model, tokenizer = load_pretrained(model_args)
    model = URL()
    URL()
    
    # model.generate, URL()...

    # 命令行进行测试
    CUDA_VISIBLE_DEVICES=0 python src/URL \
    --checkpoint_dir path_to_checkpoint
# 设置环境
    git clone URL
    conda create -n chatglm_etuning python=3.10
    conda activate chatglm_etuning
    cd ChatGLM-Efficient-Tuning
    pip install -r URL

    # 模型部署,新建文件夹path_to_checkpoint，下载Laurie/ChatGLM-Efficient-Tuning-SFT里的文件到里面
    import sys
    URL("src")
    from src import load_pretrained, ModelArguments
    model_args = ModelArguments(checkpoint_dir=path_to_checkpoint)
    model, tokenizer = load_pretrained(model_args)
    model = URL()
    URL()
    
    # model.generate, URL()...

    # 命令行进行测试
    CUDA_VISIBLE_DEVICES=0 python src/URL \
    --checkpoint_dir path_to_checkpoint
TAGS
#region-us 
 # 设置环境
    git clone URL
    conda create -n chatglm_etuning python=3.10
    conda activate chatglm_etuning
    cd ChatGLM-Efficient-Tuning
    pip install -r URL

    # 模型部署,新建文件夹path_to_checkpoint，下载Laurie/ChatGLM-Efficient-Tuning-SFT里的文件到里面
    import sys
    URL("src")
    from src import load_pretrained, ModelArguments
    model_args = ModelArguments(checkpoint_dir=path_to_checkpoint)
    model, tokenizer = load_pretrained(model_args)
    model = URL()
    URL()
    
    # model.generate, URL()...

    # 命令行进行测试
    CUDA_VISIBLE_DEVICES=0 python src/URL \
    --checkpoint_dir path_to_checkpoint