chatglm.cpp
chatglm.cpp copied to clipboard
C++ implementation of ChatGLM-6B & ChatGLM2-6B & ChatGLM3 & GLM4(V)
when submit the content by pressing the button,(run web-demo.py), the fault occur。 error content: File "c:\Users\lzj_r\chatglm.cpp\chatglm_cpp\__init__.py", line 68, in chat input_ids = self.tokenizer.apply_chat_template(messages, max_context_length) AttributeError: 'NoneType' object has no attribute...
想请问下对于一段长的内容,要如何设计提示词进行总结比较好,用的是glm4-chat-1m int4量化模型,没按照我的模板进行总结,prompt.txt是具体事情内容。 我的代码如下 prompt = "/home/lili/project/chatglm.cpp/prompt.txt" with open(prompt, "r", encoding="utf-8") as f: content = f.read() system = "你是一个总结助手,帮我根据内容按如下格式总结,内容包括:\ 一、主题 \ 二、目的 \ 三、主要内容 \ 四、结论 \" pipeline = chatglm_cpp.Pipeline(DEFAULT_MODEL_PATH, max_length=20000)...
ggml_metal_init: allocating ggml_metal_init: found device: Apple M1 Pro ggml_metal_init: picking default device: Apple M1 Pro ggml_metal_init: default.metallib not found, loading from source ggml_metal_init: GGML_METAL_PATH_RESOURCES = nil ggml_metal_init: loading '/Users/lwo2002/miniforge3/envs/glm/lib/python3.10/site-packages/chatglm_cpp/ggml-metal.metal' ggml_metal_init:...
import sys import os module_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.insert(0, module_folder)
使用下面的docker构建命令在arrch64主机上构建镜像 docker build . --network=host -t chatglm.cpp-cuda-arm64 \ --build-arg BASE_IMAGE=nvidia/cuda:11.4.0-devel-ubuntu20.04 \ --build-arg CMAKE_ARGS="-DGGML_CUBLAS=ON -DCUDA_ARCHITECTURES=75" 52.51 Building wheels for collected packages: chatglm-cpp 52.51 Building wheel for chatglm-cpp (pyproject.toml): started 54.66 Building...
试了半天chatglm_cpp-0.3.3,Python绑定始终不能用上Cuda,只能使用CPU进行运算。再次尝试pip install时,发现版本有变化! 做个留念 👍
使用如下命令安装cuda版 CMAKE_ARGS="-DGGML_CUDA=ON" pip install -U chatglm-cpp Linux云服务机器,资源有限,AWS g4dn.xlarge 安装直接导致机器卡死,ssh都响应不了 v0.4.0有此现象,v0.3.x没有 请问有没有能限制资源使用的cmake args?
今天更新了一下到0.4版本,但是cmake时候提示 xcrun: error: unable to find utility "metal", not a developer tool or in PATH make[2]: *** [bin/default.metallib] Error 72 make[1]: *** [third_party/ggml/src/CMakeFiles/ggml-metal.dir/all] Error 2 make[1]: *** Waiting for unfinished...

## 系统环境 版本 Windows 10 IoT 企业版 LTSC 版本号 21H2 安装日期 2023/8/1 操作系统内部版本 19044.4291 体验 Windows Feature Experience Pack 1000.19056.1000.0 Python 3.11.5 ## 控制台输出 ``` (base) PS C:\Users\10632\Documents\GitHub\BigModel\chatglm3-6b> pip install...