Downloads · 30 days
11
11% of all-time downloads
DIAG-PSSeng/cicero_v2-phi1.5
cicero_v2-phi1.5 is a text generation model from DIAG-PSSeng. 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.
Cicero italian legal assistant version 2. Based upon Phi1.5, fine-tuned with 1.5GB of italian civil judgements.
Downloads · 30 days
11
11% of all-time downloads
All-time downloads
96
Public
Parameters
1.4B
5.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.8 GB · 100%
From the Hugging Face model README
Cicero italian legal assistant version 2. Based upon Phi1.5, fine-tuned with 1.5GB of italian civil judgements.
Use Cicero to autocomplete sentences in a legal italian context.
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("DIAG-PSSeng/cicero_v2-phi1.5", trust_remote_code=True ,torch_dtype=torch.float16).to("cuda")
tokenizer = AutoTokenizer.from_pretrained("DIAG-PSSeng/cicero_v2-phi1.5", trust_remote_code=True)
def generate_text(model, tokenizer, prompt, length=50, do_sample=True):
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
gen_tokens = model.generate(**inputs,do_sample=True,temperature=0.9, min_length=length,max_length=length)
generated_text = tokenizer.batch_decode(gen_tokens)
return generated_text
print(generate_text(model=model, tokenizer=tokenizer, prompt="Con ricorso del"))
BibTeX: Under review