Downloads · 30 days
17
3% of all-time downloads
openkg/aijudge
aijudge is a text generation model from openkg. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
---- <p align = "justify" The advent of ChatGPT and GPT-4 have brought groundbreaking progress in the realm of natural language processing, with its astonishing generative capabilities. Nevertheless, the training and…
Downloads · 30 days
17
3% of all-time downloads
All-time downloads
555
Public
Repo size
1.3 GB
Likes
3
Public
Click a slice to open those files.
.bin421 MB · 100%
From the Hugging Face model README
import torch
from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
fact_description = "1、2013年6月25日9时许,被告人丁某某在平阴县中医院建筑工地工人宿舍,窃取被害人胡某(男,43岁)现金1500元,在逃离现场时被工地工人抓获,丁某某将窃取的现金返还被害人。2、2013年7月12日14时许,被告人丁某某在平阴县府前街文鼎嘉苑建筑工地工人宿舍,窃取被害人陈某(男,31岁)及王某(男,25岁)现金850元,在逃跑时被抓获,丁某某将盗窃现金返还被害人。本院认为,"
model_name = "openkg/aijudge"
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
tokenizer = BertTokenizer.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name).to(device)
generator = TextGenerationPipeline(model, tokenizer, device=0)
generator.tokenizer.pad_token_id = generator.model.config.eos_token_id
prediction = generator(fact_description,
max_length=1024,
num_beams=1,
top_p=0.7,
num_return_sequences=1,
eos_token_id=50256,
pad_token_id=generator.model.config.eos_token_id)
court_view = prediction[0]["generated_text"].replace(" ", "").split("。本院认为,")[1].split("<生成结束>")[0]
print(court_view)
For detailed comparisons, please refer to (JurisLMs)
Despite being significantly ameliorated through professional annotation and evaluation, JurisGPT2 inevitably retains certain limitations, including but not limited to:
Sheng Bi, Haofen Wang, Tianxing Wu, Guilin Qi