首页 > 其他分享 >ChatGLM项目启动选项参数

ChatGLM项目启动选项参数

时间:2023-06-18 09:02:43浏览次数:43  
标签:选项 remote no -- 参数 ChatGLM model lora dir

项目启动选项
usage: langchina-ChatGLM [-h] [--no-remote-model] [--model MODEL] [--lora LORA] [--model-dir MODEL_DIR] [--lora-dir LORA_DIR] [--cpu] [--auto-devices] [--gpu-memory GPU_MEMORY [GPU_MEMORY ...]] [--cpu-memory CPU_MEMORY]
[--load-in-8bit] [--bf16]

基于langchain和chatGML的LLM文档阅读器

options:
-h, --help show this help message and exit
--no-remote-model remote in the model on loader checkpoint, if your load local model to add the --no-remote-model
--model MODEL Name of the model to load by default.
--lora LORA Name of the LoRA to apply to the model by default.
--model-dir MODEL_DIR
Path to directory with all the models
--lora-dir LORA_DIR Path to directory with all the loras
--cpu Use the CPU to generate text. Warning: Training on CPU is extremely slow.
--auto-devices Automatically split the model across the available GPU(s) and CPU.
--gpu-memory GPU_MEMORY [GPU_MEMORY ...]
Maxmimum GPU memory in GiB to be allocated per GPU. Example: --gpu-memory 10 for a single GPU, --gpu-memory 10 5 for two GPUs. You can also set values in MiB like --gpu-memory 3500MiB.
--cpu-memory CPU_MEMORY
Maximum CPU memory in GiB to allocate for offloaded weights. Same as above.
--load-in-8bit Load the model with 8-bit precision.
--bf16 Load the model with bfloat16 precision. Requires NVIDIA Ampere GPU.

示例
1、加载本地模型
--model-dir 本地checkpoint存放文件夹
--model 模型名称
--no-remote-model 不从远程加载模型
$ python cli_demo.py --model-dir /media/mnt/ --model chatglm-6b --no-remote-model
2、低精度加载模型
--model-dir 本地checkpoint存放文件夹
--model 模型名称
--no-remote-model 不从远程加载模型
--load-in-8bit 以8位精度加载模型
$ python cli_demo.py --model-dir /media/mnt/ --model chatglm-6b --no-remote-model --load-in-8bit
3、使用cpu预测模型
--model-dir 本地checkpoint存放文件夹
--model 模型名称
--no-remote-model 不从远程加载模型
--cpu 使用CPU生成文本。警告:CPU上的训练非常缓慢。
$ python cli_demo.py --model-dir /media/mnt/ --model chatglm-6b --no-remote-model --cpu
3、加载lora微调文件
--model-dir 本地checkpoint存放文件夹
--model 模型名称
--no-remote-model 不从远程加载模型
--lora-dir 本地lora存放文件夹
--lora lora名称
$ python cli_demo.py --model-dir /media/mnt/ --model chatglm-6b --no-remote-model --lora-dir /media/mnt/loras --lora chatglm-step100

标签:选项,remote,no,--,参数,ChatGLM,model,lora,dir
From: https://www.cnblogs.com/tommickey/p/17488684.html

相关文章

  • 用于提速的一些C++ 编译器的编译选项
    C++Compilerflags在TIO中怎么用?在C++Compilerflags新建几行:-Ofast:这个编译器优化选项启用所有-O3级别的优化,并进一步启用一些可能会破坏标准精度的优化,如忽视IEEE或ISO规定的某些数学准则的优化。这可能会使得程序运行得更快,但也可能会降低精度,因此只有在你可以接......
  • RoundingMode 几个参数详解
    第一版java.math.RoundingMode几个参数详解java.math.RoundingMode里面有几个参数搞得我有点晕,现以个人理解对其一一进行总结:为了能更好理解,我们可以画一个XY轴RoundingMode.CEILING:取右边最近的整数RoundingMode.DOWN:去掉小数部分取整,也就是正数取左边,负数取右边,相当于向原点靠近......
  • grep -A -B -C 显示行选项
    -A是显示匹配后和它后面的n行。 -B是显示匹配行和它前面的n行。 -C是匹配行和它前后各n行。 [root@DESKTOP-U476VLM~]#cattest123a4567[root@DESKTOP-U476VLM~]#[root@DESKTOP-U476VLM~]#grep-A2atesta45[root@DESKTOP-U476VLM~]#grep-B2at......
  • 电源参数计算常用的Mathcad功能介绍
    mathcad作为一款常用的数学计算软件,在很多个领域都用应用。本文用于总结在电源参数计算常用的功能或者函数。  一、分段函数在变量后面输入英文状态下的]键,就能出现分段函数的格式,将函数f(x)分为两段,再次按]键,将函数分为三段。不过分段函数一般是结合其他函数命令......
  • 在 Windows 下部署 ChatGLM-6B 过程记录
    1、为git安装lfs模块下载模型文件前,需要安装gitlfs模块以支持大文件的下载。下载地址:https://git-lfs.com/验证:gitlfsinstall2、下载模型文件gitclonehttps://huggingface.co/THUDM/chatglm-6b-int43、......
  • 【初识C++】(缺省参数和函数重载)
    @TOC一、缺省参数1.缺省参数定义缺省参数是在函数的声明中给定参数一个指定的值。如果传参没有给定参数,那就按照声明中默认的缺省值,如果给定了参数,那就按照给定的参数值。比如:usingnamespacestd;voidFunc(inta=0){ cout<<a<<endl;}intmain(){ Func(); //......
  • ChatGLM-6B云服务器部署教程
    目录一、准备服务器1.购买服务器2.开机进入终端3.进入终端二、部署ChatGLM1.执行命令2.本地代理访问地址2.1结果如下2.2api接口一样操作三、Fastapi流式接口1.api_fast.py1.2将api_fast.py上传到服务器2.准备插件3.访问地址CSDN链接地址:https://blog.csdn.net/Yh_yh_new_Yh/ar......
  • Python - 方法参数中,带self和不带self的区别
    不带self该python文件中,没有类的概念。因此所有的方法参数中,没有self#文件名solution.pydefpartition(head:Optional[ListNode],x:int)->Optional[ListNode]:#...if__name__=='__main__':#注意这里的区别...partition() 如果未来要在其他类里......
  • ASEMI代理光宝高速光耦LTV-5341参数,LTV-5341应用
    编辑-ZLTV-5341参数描述:型号:LTV-5341储存温度Tstg:-55~+125℃工作温度Topr:-40~+110℃总输出电源电压(VCC–VEE):35V平均正向输入电流IF:20mA峰值瞬态输入电流IF(TRAN):1A输入功率耗散PI:40mW输出IC功耗PO:450mW电源电压VCC:30V输入电流(ON):10mA输入电压(OFF):0.8V工作频率f:50......
  • 修改ASM实例参数,导致GI集群无法启动
    0、有一套预生产环境,准备在上线之前先进行数据库参数修改。结果在修改ASM内存参数时,忘记resetmemory_max_target参数,导致GI集群无法启动。将整个故障记录下来。 1、修改ASM实例参数altersystemsetprocesses=1000scope=spfilesid='*';altersystemsetsga_max_size......