cydxg commited on
Commit
f110196
·
verified ·
1 Parent(s): 32f2ec4

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -0
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - THUDM/glm-4-voice-9b
4
+ base_model_relation: quantized
5
+ ---
6
+ # GLM-4-Voice-9B (INT8 Quantized)
7
+
8
+ ## 模型简介
9
+ GLM-4-Voice 是智谱 AI 推出的端到端语音模型。GLM-4-Voice 能够直接理解和生成中英文语音,进行实时语音对话,并且能够根据用户的指令改变语音的情感、语调、语速、方言等属性。
10
+ 本仓库是是GLM-4-Voice-9B经过INT8量化的版本。
11
+
12
+ ## 使用教程
13
+
14
+ ### 创建虚拟环境
15
+ 首先,确保使用Python 3.10,创建虚拟环境:
16
+ ```bash
17
+ # no support for python=3.8/3.9/3.12
18
+ conda create -n GLM-4-Voice python=3.10
19
+ ```
20
+
21
+ ### 激活虚拟环境并克隆模型
22
+ 激活虚拟环境后,克隆模型和代码:
23
+ ```bash
24
+ conda activate GLM-4-Voice
25
+ git clone https://huggingface.co/cydxg/glm-4-voice-9b-int8
26
+ ```
27
+ 对于中国大陆用户,可以使用以下命令进行克隆:
28
+ ```bash
29
+ git clone https://hf-mirror.com/cydxg/glm-4-voice-9b-int8
30
+ ```
31
+
32
+ ### 安装依赖
33
+ 进入模型目录并安装所需依赖:
34
+ ```bash
35
+ cd glm-4-voice-9b-int8
36
+ pip install -r requirements.txt
37
+ # 根据自己的CUDA版本选择torch
38
+ conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 pytorch-cuda=12.4 -c pytorch -c nvidia
39
+ ```
40
+
41
+ ### 启动模型服务
42
+ 首先启动模型服务:
43
+ ```bash
44
+ python model_server.py
45
+ ```
46
+
47
+ ### 运行网页Demo
48
+ 接着运行网页Demo以访问模型:
49
+ ```bash
50
+ python web_demo.py
51
+ ```
52
+ 即可通过访问 `http://localhost:8888` 来使用模型。