Comments (7)
This should help: #111
Just append --dtype bfloat16
to the conversion arguments and it will keep half precision tensors in memory during conversion.
@psych0v0yager can you try this out on your system?
from lit-llama.
most likely it means you don't have enough RAM
from lit-llama.
from lit-llama.
@psych0v0yager I don't think you have enough RAM to hold the 13B model at 32bit precision (you need 48GB).
As a check, try instantiating the 13B model
from lit_llama.model import LLaMA
model = LLaMA.from_name("13B")
BTW are you loading the original checkpoints? We could provide an option to load incrementally in bfloat16 to reduce the requirements.
from lit-llama.
Thank you for the prompt replies.
I attempted the instantiation and additional conversion argument and received the following results.
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from lit_llama.model import LLaMA
model = LLaMA.from_name("13B")
Killed
python scripts/convert_checkpoint.py --output_dir checkpoints/lit-llama --ckpt_dir /dalai/llama/models --tokenizer_path /dalai/llama/models/tokenizer.model --model_size 13B --dtype bfloat16
50%|█████████████████████████████████████████████████████████████████▌ | 1/2 [00:46<00:46, 46.04s/it]
Killed
Could it potentially be a VRAM issue? I only have 12 gb in my Nvidia 3060. Furthermore the model weights come from the dalai llama repo (https://github.com/cocktailpeanut/dalai) and I believe they are the full precision weights.
Thanks again for the support
from lit-llama.
Killed
means that the program was killed by your OS. From my experience it appears in 99% when you try using more RAM and SWAP than you have. My advice: run htop
(or top
) and check the memory consumption when the script is running to confirm the root cause of the problem. If you dont have enough VRAM, you see OOM exception.
from lit-llama.
Closing this one, feel free to reopen
from lit-llama.
Related Issues (20)
- How to convert hf weight of 70b to lit-lamma weights?
- How to quantize LLama in fine-tuning ?
- RuntimeError: cutlassF: no kernel found to launch! HOT 1
- RuntimeError: Expected x1.dtype() == cos.dtype() to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.) HOT 1
- Can I use Lightning fabirc to pre train llama2 on v100?
- Ban some tokens
- Error: git submodule update --init --recursive -q did not run successfully HOT 1
- Beam search generation
- Issue with Rotary Embedding Initialization when the number of devices is > 1
- TPU Training
- OSError: Not found: "checkpoints/lit-llama/tokenizer.model": No such file or directory Error #2 HOT 4
- `PackedDatasetBuilder` does not separate with `sep_token`
- it seems that hash of traindata is lost, so it's impossible to continue finetune after stop
- Converting from lit-llama to HF checkpoint?
- why cannot the generate function be used twice
- How to convert lit-llama pretrained model to HF format? HOT 1
- Using llama3 through lit lama HOT 5
- Where is tokenizer.model? tokenizer path HOT 1
- 数据集与训练方法的相关问题
- add special token
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 lit-llama.