forked from ztxz16/fastllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cgli
committed
Oct 18, 2023
1 parent
d730e63
commit 93188f3
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# fastllm-pytools API | ||
|
||
## 全局参数设置 | ||
|
||
| 方法 | 说明 | | ||
| ----- | ----- | | ||
| llm.print_ins_info() | 显示当前编译的指令集支持情况 | | ||
| llm.set_cpu_threads(threads:int) | 设置当前运行线程数,默认为4 | | ||
| llm.get_cpu_threads()->int | 获取当前运行线程数 | | ||
| llm.set_cpu_low_mem(low_mem:bool) | 设置低内存模式下运行,默认为False | | ||
| llm.get_cpu_low_mem()->bool | 判断低内存模式下运行,为True则embedding放在文件中。 | | ||
| llm.set_cpu_kvcache(cpu_kvcache:bool) | 设置是否将KVCache放在内存中,默认为False | | ||
| llm.get_cpu_kvcache()->bool | 判断是否将KVCache放在内存而非GPU显存中(当前只对ChatGLM生效) | | ||
| llm.set_device_map(device_map:str) | 设置推理设备,'cpu' 为CPU推理 ’cuda:0‘ 为0号CUDA GPU,以此类推 | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// | ||
// | ||
// Created by huangyuyang on 5/11/23. | ||
// | ||
|
||
|