Skip to content

Commit

Permalink
临时提交
Browse files Browse the repository at this point in the history
  • Loading branch information
cgli committed Oct 18, 2023
1 parent d730e63 commit 93188f3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions docs/fastllm_pytools.md
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,以此类推 |

2 changes: 1 addition & 1 deletion include/fastllm.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// Created by huangyuyang on 5/11/23.
//

Expand Down

0 comments on commit 93188f3

Please sign in to comment.