model.inference_pretrain(prompt, tokenizer)

#1
by BeardingFace - opened

from the notebook and model card:

model.inference_pretrain(prompt, tokenizer)

File ~/.local/lib/python3.10/site-packages/torch/nn/modules/module.py:1709, in Module.getattr(self, name)
1707 if name in modules:
1708 return modules[name]
-> 1709 raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")

AttributeError: 'InternLM2ForCausalLM' object has no attribute 'inference_pretrain'

with transformers 4.39.3 - also made a github issue for this, crosspost for visibility.

I recommend to comment the 'inference_pretrain' function at link and try to implement and rewrite the function outside of the model.

Best,
Shuangrui

Sign up or log in to comment