Skip to content

校招、秋招、春招、实习好项目,带你从零动手实现支持LLama2/3和Qwen2.5的大模型推理框架。

Notifications You must be signed in to change notification settings

zjhellofss/KuiperLLama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

自制大模型推理框架

第三方依赖

  1. google glog https://github.com/google/glog
  2. google gtest https://github.com/google/googletest
  3. sentencepiece https://github.com/google/sentencepiece
  4. armadillo + openblas https://arma.sourceforge.net/download.html

openblas作为armadillo的后端数学库,加速矩阵乘法等操作,也可以选用Intel-MKL

模型下载地址

  1. llama2 https://pan.baidu.com/s/1PF5KqvIvNFR8yDIY1HmTYA?pwd=ma8r

编译方法

  # 假设已经装好上述的第三方依赖
  mkdir build 
  cd build
  cmake ..
  make -j16

生成文本的方法

./llama_infer llama2_7b.bin tokenizer.model