Comments (5)
我编译llama.cpp时也遇到类似的问题,我是在报错的.c文件中重新定义了报错函数的宏。我用的是ubuntu 虚拟机,编译后cpu运行都可以。
from inferllm.
我编译llama.cpp时也遇到类似的问题,我是在报错的.c文件中重新定义了报错函数的宏。我用的是ubuntu 虚拟机,编译后cpu运行都可以。
我也是Ubuntu虚拟机遇到了这个问题,能否贴一下定义的宏函数,可以的话,非常感谢。
from inferllm.
我编译llama.cpp时也遇到类似的问题,我是在报错的.c文件中重新定义了报错函数的宏。我用的是ubuntu 虚拟机,编译后cpu运行都可以。
@lilongxian 欢迎提一个 PR
from inferllm.
看了大家的解决方案,我也想了一个笨办法。
_mm256_fmadd_ps
是 AVX2 指令集,我的 CPU 不支持,只支持 AVX ,所以,把 _mm256_fmadd_ps
这个函数替换为 AVX 的函数。这个函数在 src/kern/optimized/x86/optimized_x86.h
中使用了两次。
目前的替换方案是:
// acc = _mm256_fmadd_ps(scale, p, acc);
__m256 tmp = _mm256_mul_ps(scale, p);
acc = _mm256_add_ps(tmp, acc);
目前编译通过了,运行示例也正常。大家看看这样有没有问题?以前没接触过相关的指令集函数。
from inferllm.
我在llama.cpp中遇到 _mm256_set_m128i函数报错时我的宏定义如下(llama.cpp中在ggml.c 、 k_quants.c中添加):
/* 编译报错error: incompatible types when initializing type ‘__m256i ... */
#define _mm256_set_m128i(v0, v1) _mm256_insertf128_si256(_mm256_castsi128_si256(v1), (v0), 1)
#define _mm256_setr_m128i(v0, v1) _mm256_set_m128i((v1), (v0))
希望能给遇到类似问题的同学带来一点帮助。
非常感谢 @chenqy4933 大牛专家贡献的 InferLLM c++版本,推理速度上明显比llama.cpp要快很多,代码结构简洁整齐,便于在此基础上改进与适配,和llama.cpp并驾齐驱,是目前尚且鲜有的大模型加速推理c++版本,未来在大模型开源社区发展潜力巨大,非常值得关注!
from inferllm.
Related Issues (20)
- unsupported relocation 37 on musl libc HOT 3
- Please support RWKV for refs and compare.
- O3 optimization are slower on SG2042 HOT 3
- Thread wakening may be bottom neck for large core systems HOT 8
- 【new feature】通义千问有没有计划支持 HOT 2
- 能否改为GPU辅助计算 HOT 6
- ChatGLM2 效果异常 HOT 1
- chatglm2 GPU版本的int4、int8量化模型预测结果异常 HOT 1
- 请问是否有计划支持Whisper? HOT 1
- mac os Big Sur 11.7.4 Linking Error , Undefined symbols HOT 1
- arm 平台输出乱码 HOT 3
- chatglm3有计划支持吗? HOT 3
- I got the error on centos 7: failed to tokenize string! HOT 2
- 可以在RV64指令集的CPU上运行吗
- 请问可以在不支持V扩展的RISC-V CPU上运行吗 HOT 1
- 移植问题
- 在运行llama2-13b的时候出现以下问题
- How to build wasm file?
- 这个有windows的部署教程吗
- 在树莓派3b+上部署,出现无法打开模型的问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inferllm.