Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| roberta_cnn_legal.Q2_K.gguf | Q2_K | 0.15GB |
| roberta_cnn_legal.IQ3_XS.gguf | IQ3_XS | 0.16GB |
| roberta_cnn_legal.IQ3_S.gguf | IQ3_S | 0.16GB |
| roberta_cnn_legal.Q3_K_S.gguf | Q3_K_S | 0.16GB |
| roberta_cnn_legal.IQ3_M.gguf | IQ3_M | 0.17GB |
| roberta_cnn_legal.Q3_K.gguf | Q3_K | 0.18GB |
| roberta_cnn_legal.Q3_K_M.gguf | Q3_K_M | 0.18GB |
| roberta_cnn_legal.Q3_K_L.gguf | Q3_K_L | 0.2GB |
| roberta_cnn_legal.IQ4_XS.gguf | IQ4_XS | 0.2GB |
| roberta_cnn_legal.Q4_0.gguf | Q4_0 | 0.2GB |
| roberta_cnn_legal.IQ4_NL.gguf | IQ4_NL | 0.2GB |
| roberta_cnn_legal.Q4_K_S.gguf | Q4_K_S | 0.2GB |
| roberta_cnn_legal.Q4_K.gguf | Q4_K | 0.22GB |
| roberta_cnn_legal.Q4_K_M.gguf | Q4_K_M | 0.22GB |
| roberta_cnn_legal.Q4_1.gguf | Q4_1 | 0.22GB |
| roberta_cnn_legal.Q5_0.gguf | Q5_0 | 0.24GB |
| roberta_cnn_legal.Q5_K_S.gguf | Q5_K_S | 0.24GB |
| roberta_cnn_legal.Q5_K.gguf | Q5_K | 0.25GB |
| roberta_cnn_legal.Q5_K_M.gguf | Q5_K_M | 0.25GB |
| roberta_cnn_legal.Q5_1.gguf | Q5_1 | 0.26GB |
| roberta_cnn_legal.Q6_K.gguf | Q6_K | 0.27GB |
| roberta_cnn_legal.Q8_0.gguf | Q8_0 | 0.35GB |
1pip install torch
2pip install transformers1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3# Load the model and tokenizer
4model = AutoModelForSequenceClassification.from_pretrained("nimamegh/roberta_cnn_legal")
5tokenizer = AutoTokenizer.from_pretrained("nimamegh/roberta_cnn_legal")
6
7# Example inputs
8premise = "The cat is on the mat."
9hypothesis = "The animal is on the mat."
10inputs = tokenizer(premise, hypothesis, return_tensors='pt')
11
12# Get predictions
13outputs = model(**inputs)
14predictions = outputs.logits.argmax(dim=-1)
15
16# Print the prediction result
17print("Predicted class:", predictions.item())
18
19# Interpretation (optional)
20label_map = {0: "Entailment", 1: "Neutral", 2: "Contradiction"}
21print("Result:", label_map[predictions.item()])1@misc{meghdadi2024uottawalegallens2024transformerbasedclassification,
2 title={uOttawa at LegalLens-2024: Transformer-based Classification Experiments},
3 author={Nima Meghdadi and Diana Inkpen},
4 year={2024},
5 eprint={2410.21139},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2410.21139},
9}