THUDM / GLM-iprompt

Apply Iprompt on GLM with innovative new methods. Currently support Chinese QA, English QA and Chinese poem generation.
MIT License
20 stars 6 forks source link

TypeError: forward() got an unexpected keyword argument 'mems' #4

Open SCAUapc opened 1 year ago

SCAUapc commented 1 year ago

Hi, I found that there are some wrong arguments. in inference_poems_iprompt.py, line 357 the code is: logits, *mem_kv = model( tokens[:, index:], position_ids[..., index: counter+1], attention_mask[..., index: counter+1, :counter+1], # TODO memlen mems=mems, log_attention_weights=log_attention_weights_part ) but model got an unexpected keyword argument 'mems'