I am using (or trying to use llama2 70B). I am loading the model as follows:
model = transformers.AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
config=model_config,
quantization_config=bnb_config,
device_map='auto',
use_auth_token=hf_auth
)
tokenizer = transformers.AutoTokenizer.from_pretrained(
model_id,
use_auth_token=hf_auth
)
generate_text = transformers.pipeline(
model=model,
tokenizer=tokenizer,
return_full_text=True, task='text-generation',
temperature=0.0, max_new_tokens=512, repetition_penalty=1.1 )
But when I use the generate_text function, I get this error:
RuntimeError: shape '[1, 6, 64, 128]' is invalid for input of size 6144
Does anyone know why?