Comments (4)
I can load the weight using the model.load_state_dict()
, and then everything will go smoothly, but I really want to know why from_pretrained(state_dict=state_dict)
can't work.
from litgpt.
Thanks for raising that. Maybe it's a HF thing. I will have to investigate.
from litgpt.
I could not reproduce it for another model yet when I gave it a quick try.
I am not sure if it's related because the differences are so big, but I wonder what the precision of the tensors in your current state dict are. Could you print the precision of the state dict, and could you also try to load it without torch_dtype=torch.float16
?
EDIT: Nevermind, I can see that the precision is bfloat16 in your screenshot.
from litgpt.
I tried this also with Llama 3 and it seemed to work fine for me there as well. Here are my steps:
litgpt download --repo_id meta-llama/Meta-Llama-3-8B-Instruct --access_token ...
litgpt finetune \
--checkpoint_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct \
--out_dir my_llama_model \
--train.max_steps 1 \
--eval.max_iter 1
litgpt convert from_litgpt \
--checkpoint_dir my_llama_model/final \
--output_dir out/converted_llama_model/
and
from litgpt.
Related Issues (20)
- After some iteration in pretraining a LLM, IndexError is raised related to dataset chunking
- Cannot copy out of meta tensor; no data! HOT 2
- How to specify which GPU to use? HOT 2
- How to use custom dataset for evaluate?
- fabric.print only works on sys.stderr, does not print inference result HOT 1
- LoRA multi-GPU no longer works if applying LoRA selectively HOT 3
- Will CycleIterator forward to dataset on resume for pretrain? HOT 1
- ValueError: Cannot attend to 3063, block size is only 2048 HOT 1
- Customizable loss function & inference step? HOT 2
- Address frozen parameter warning with FSDP on nightly torch HOT 1
- LR scheduler can result in a division by 0
- how to solve this debug
- LoRA matrices dropout
- test_tinyllama issue with LitData and `iterate_over_all` HOT 2
- Remove old and unused LLMs
- Pretraining example from readme fails in Colab HOT 3
- Streamline LitGPT API HOT 7
- Redundancy? HOT 2
- support for qwen2 and baichuan
- 'Phi-3-mini-4k-instruct' is not a supported config name HOT 1
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 litgpt.