Views
No views yet
1>>> from transformers import AutoModel, AutoTokenizer
2>>> tokenizer = AutoTokenizer.from_pretrained("thunlp/Lawformer")
3>>> model = AutoModel.from_pretrained("thunlp/Lawformer")
4>>> inputs = tokenizer("任某提起诉讼,请求判令解除婚姻关系并对夫妻共同财产进行分割。", return_tensors="pt")
5>>> outputs = model(**inputs)@article{xiao2021lawformer,
title={Lawformer: A Pre-trained Language Model forChinese Legal Long Documents},
author={Xiao, Chaojun and Hu, Xueyu and Liu, Zhiyuan and Tu, Cunchao and Sun, Maosong},
year={2021}
}