randaller / llama-cpu Goto Github PK
View Code? Open in Web Editor NEWThis project forked from meta-llama/llama
Inference on CPU code for LLaMA models
License: GNU General Public License v3.0
This project forked from meta-llama/llama
Inference on CPU code for LLaMA models
License: GNU General Public License v3.0
I have totally 56 CPUs, but the max cpu usage is below 50% during inference. How to increase the usage of CPUs?
any idea why?
Using BFLOAT16 and 7B model. Fast to read and low mem but error before answer.
No solved replacing previous files (generation y model) on "llama" folder.
prompt> the meaning of the life is
0%| | 0/256 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/user/IA/ll-cpu3/llama-cpu/example-chat.py", line 109, in
fire.Fire(main)
...
...
File "/home/user/IA/ll-cpu3/llama-cpu/llama/model.py", line 109, in forward
xq, xk, xv = self.wq(x), self.wk(x), self.wv(x)
File "/home/user/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: expected scalar type Float but found BFloat16
0%| | 0/256 [00:02<?, ?it/s]
When I run python3 merge-weights.py --input_dir /home//llama-cpu/ --model_size 7B I receive the following error:
Traceback (most recent call last):
File "merge-weights.py", line 168, in <module>
main()
File "merge-weights.py", line 161, in main
write_model(
File "merge-weights.py", line 63, in write_model
state_dict |= {
TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'
In the README I understood that it is necessary to run example-chat-bfloat16.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.