Upload modeling_mplug_owl2.py with huggingface_hub
Browse files- modeling_mplug_owl2.py +1 -1
modeling_mplug_owl2.py
CHANGED
|
@@ -256,7 +256,7 @@ class MPLUGOwl2LlamaForCausalLM(LlamaForCausalLM, MPLUGOwl2MetaForCausalLM):
|
|
| 256 |
|
| 257 |
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 258 |
self.preferential_ids_ = [id_[1] for id_ in self.tokenizer(["excellent","good","fair","poor","bad"])["input_ids"]]
|
| 259 |
-
self.weight_tensor = torch.Tensor([5.,4.,3.,2.,1.]).half().to(
|
| 260 |
|
| 261 |
# Initialize weights and apply final processing
|
| 262 |
self.post_init()
|
|
|
|
| 256 |
|
| 257 |
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 258 |
self.preferential_ids_ = [id_[1] for id_ in self.tokenizer(["excellent","good","fair","poor","bad"])["input_ids"]]
|
| 259 |
+
self.weight_tensor = torch.Tensor([5.,4.,3.,2.,1.]).half().to(self.device)
|
| 260 |
|
| 261 |
# Initialize weights and apply final processing
|
| 262 |
self.post_init()
|