Comments (4)
So I did some research on my own and basically my first 2 questions can be answered by looking at the huggingface transformers repository: https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py
from trl.
So I did some research on my own and basically my first 2 questions can be answered by looking at the huggingface transformers repository: https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py
Hi @clam004, do you mind explaining your answer/understanding on why they do it? Thanks!
from trl.
@danjohnvelasco as long as you use the same name self.lm_head
, when you load the pretrained model from the dictionary of parameters, these linear parameters will be replaced with the trained ones. So thats why the model still works (question 2). Also regarding question 3, I suspect somehow it doesnt matter, although Im not sure why, cause when I run this repo without the dropout layer, as expected, it behaves the same.
from trl.
Regarding 3 I agree and we moved the dropout before the linear layer in #70.
from trl.
Related Issues (20)
- Regarding `setup_chat_format` overwriting existing special tokens HOT 6
- BUG: UserWarning: Could not find response key in the following instance: HOT 1
- running rloo.py got. RuntimeError: CUDA error: device-side assert triggered HOT 1
- AttributeError: 'NoneType' object has no attribute 'device' HOT 1
- Support for Iterative DPO HOT 1
- The meaning of "--dataset_name"?
- Not find sft.py
- How to use `predict` function in `DPOTrainer`
- Support more than one rejected responses HOT 1
- No way to drop samples which are longer than `max_length` in ORPOTrainer? HOT 2
- OOM Error using PPO Trainer to LoRa-tune 4-bit Llama-3-8B Model
- evaluation_loop() Bug in KTOTrainer HOT 1
- Possible bug in SFTTrainer HOT 3
- Overflow with padding left warning.
- TR-DPO : Why is the loss not changing at all, and reward/accuracies and reward/margins always = 0? HOT 1
- scripts/dpo.py : Unable to train custom gpt2 model
- Support packing for pretokenized datasets
- DPO Evalution with WandB triggers a `cannot pickle '_thread.lock' object` failure HOT 11
- Will long text be truncated and split into different examples when using packing?
- Some questions about PPO trainer
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 trl.