Commit
·
23dde14
1
Parent(s):
ed69d87
replaces q-future/one-align to pablete/one-align
Browse files- modeling_mplug_owl2.py +3 -3
modeling_mplug_owl2.py
CHANGED
|
@@ -253,8 +253,8 @@ class MPLUGOwl2LlamaForCausalLM(LlamaForCausalLM, MPLUGOwl2MetaForCausalLM):
|
|
| 253 |
super(LlamaForCausalLM, self).__init__(config)
|
| 254 |
self.model = MPLUGOwl2LlamaModel(config)
|
| 255 |
|
| 256 |
-
self.tokenizer = AutoTokenizer.from_pretrained("
|
| 257 |
-
self.image_processor = CLIPImageProcessor.from_pretrained("
|
| 258 |
|
| 259 |
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 260 |
self.preferential_ids_ = [id_[1] for id_ in self.tokenizer(["excellent","good","fair","poor","bad"])["input_ids"]]
|
|
@@ -389,7 +389,7 @@ AutoModelForCausalLM.register(MPLUGOwl2Config, MPLUGOwl2LlamaForCausalLM)
|
|
| 389 |
replace_llama_modality_adaptive()
|
| 390 |
|
| 391 |
if __name__ == "__main__":
|
| 392 |
-
config = MPLUGOwl2Config.from_pretrained('
|
| 393 |
# config = MPLUGOwl2Config()
|
| 394 |
model = AutoModelForCausalLM(config)
|
| 395 |
|
|
|
|
| 253 |
super(LlamaForCausalLM, self).__init__(config)
|
| 254 |
self.model = MPLUGOwl2LlamaModel(config)
|
| 255 |
|
| 256 |
+
self.tokenizer = AutoTokenizer.from_pretrained("pablete/one-align")
|
| 257 |
+
self.image_processor = CLIPImageProcessor.from_pretrained("pablete/one-align")
|
| 258 |
|
| 259 |
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 260 |
self.preferential_ids_ = [id_[1] for id_ in self.tokenizer(["excellent","good","fair","poor","bad"])["input_ids"]]
|
|
|
|
| 389 |
replace_llama_modality_adaptive()
|
| 390 |
|
| 391 |
if __name__ == "__main__":
|
| 392 |
+
config = MPLUGOwl2Config.from_pretrained('pablete/one-align')
|
| 393 |
# config = MPLUGOwl2Config()
|
| 394 |
model = AutoModelForCausalLM(config)
|
| 395 |
|