GraySoft
Projects Models About FAQ Contact Download guIDE →
Model Intelligence Sheet

richarderkhov/nimamegh_-_roberta_cnn_legal-gguf overview

Comprehensive model page for richarderkhov/nimamegh-robertacnnlegal-gguf

ggufarxiv:2410.21139endpoints_compatibleregion:usfeature-extraction
richarderkhov/nimamegh_-_roberta_cnn_legal-gguf visual
Downloads
288
Likes
0
Pipeline
Library
Visibility
Public
Access
Open

Repository Files & Downloads

22 files detected
Direct downloads for all repository files
FileTypeQuantizationSizeLink
roberta_cnn_legal.IQ3_M.gguf GGUF IQ3_M 176.92 MB Download
roberta_cnn_legal.IQ3_S.gguf GGUF IQ3_S 168.95 MB Download
roberta_cnn_legal.IQ3_XS.gguf GGUF IQ3_XS 163.33 MB Download
roberta_cnn_legal.IQ4_NL.gguf GGUF IQ4_NL 208.70 MB Download
roberta_cnn_legal.IQ4_XS.gguf GGUF IQ4_XS 200.08 MB Download
roberta_cnn_legal.Q2_K.gguf GGUF Q2_K 154.33 MB Download
roberta_cnn_legal.Q3_K.gguf GGUF Q3_K 188.83 MB Download
roberta_cnn_legal.Q3_K_L.gguf GGUF Q3_K_L 206.08 MB Download
roberta_cnn_legal.Q3_K_M.gguf GGUF Q3_K_M 188.83 MB Download
roberta_cnn_legal.Q3_K_S.gguf GGUF Q3_K_S 168.95 MB Download
roberta_cnn_legal.Q4_0.gguf GGUF 207.20 MB Download
roberta_cnn_legal.Q4_1.gguf GGUF 225.20 MB Download
roberta_cnn_legal.Q4_K.gguf GGUF Q4_K 222.67 MB Download
roberta_cnn_legal.Q4_K_M.gguf GGUF Q4_K_M 222.67 MB Download
roberta_cnn_legal.Q4_K_S.gguf GGUF Q4_K_S 209.20 MB Download
roberta_cnn_legal.Q5_0.gguf GGUF 243.20 MB Download
roberta_cnn_legal.Q5_1.gguf GGUF 261.20 MB Download
roberta_cnn_legal.Q5_K.gguf GGUF Q5_K 251.17 MB Download
roberta_cnn_legal.Q5_K_M.gguf GGUF Q5_K_M 251.17 MB Download
roberta_cnn_legal.Q5_K_S.gguf GGUF Q5_K_S 243.20 MB Download
roberta_cnn_legal.Q6_K.gguf GGUF Q6_K 281.45 MB Download
roberta_cnn_legal.Q8_0.gguf GGUF 363.09 MB Download

Model Details Live

Model Slug
richarderkhov/nimamegh_-_roberta_cnn_legal-gguf
Author
RichardErkhov
Pipeline Task
Library
Created
2025-06-14
Last Modified
2025-06-14
Gated
No
Private
No
HF SHA
940517eb801bf2669bcb7c28a597213f6091a0dd
License
Unknown
Language
Unknown
Base Model
Unknown

Metadata Inspector

Normalized metadata (stored in metadata_json)
{
  "metadata": {},
  "card_data": {
    "frontmatter": {},
    "hero_image_url": "",
    "summary": "",
    "quick_links": [],
    "benchmark_table_html": "",
    "readme_markdown": "Quantization made by Richard Erkhov.\n\n[Github](https://github.com/RichardErkhov)\n\n[Discord](https://discord.gg/pvy7H8DZMG)\n\n[Request more models](https://github.com/RichardErkhov/quant_request)\n\n\nroberta_cnn_legal - GGUF\n- Model creator: https://huggingface.co/nimamegh/\n- Original model: https://huggingface.co/nimamegh/roberta_cnn_legal/\n\n\n| Name | Quant method | Size |\n| ---- | ---- | ---- |\n| [roberta_cnn_legal.Q2_K.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q2_K.gguf) | Q2_K | 0.15GB |\n| [roberta_cnn_legal.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.IQ3_XS.gguf) | IQ3_XS | 0.16GB |\n| [roberta_cnn_legal.IQ3_S.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.IQ3_S.gguf) | IQ3_S | 0.16GB |\n| [roberta_cnn_legal.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q3_K_S.gguf) | Q3_K_S | 0.16GB |\n| [roberta_cnn_legal.IQ3_M.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.IQ3_M.gguf) | IQ3_M | 0.17GB |\n| [roberta_cnn_legal.Q3_K.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q3_K.gguf) | Q3_K | 0.18GB |\n| [roberta_cnn_legal.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q3_K_M.gguf) | Q3_K_M | 0.18GB |\n| [roberta_cnn_legal.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q3_K_L.gguf) | Q3_K_L | 0.2GB |\n| [roberta_cnn_legal.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.IQ4_XS.gguf) | IQ4_XS | 0.2GB |\n| [roberta_cnn_legal.Q4_0.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q4_0.gguf) | Q4_0 | 0.2GB |\n| [roberta_cnn_legal.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.IQ4_NL.gguf) | IQ4_NL | 0.2GB |\n| [roberta_cnn_legal.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q4_K_S.gguf) | Q4_K_S | 0.2GB |\n| [roberta_cnn_legal.Q4_K.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q4_K.gguf) | Q4_K | 0.22GB |\n| [roberta_cnn_legal.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q4_K_M.gguf) | Q4_K_M | 0.22GB |\n| [roberta_cnn_legal.Q4_1.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q4_1.gguf) | Q4_1 | 0.22GB |\n| [roberta_cnn_legal.Q5_0.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q5_0.gguf) | Q5_0 | 0.24GB |\n| [roberta_cnn_legal.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q5_K_S.gguf) | Q5_K_S | 0.24GB |\n| [roberta_cnn_legal.Q5_K.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q5_K.gguf) | Q5_K | 0.25GB |\n| [roberta_cnn_legal.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q5_K_M.gguf) | Q5_K_M | 0.25GB |\n| [roberta_cnn_legal.Q5_1.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q5_1.gguf) | Q5_1 | 0.26GB |\n| [roberta_cnn_legal.Q6_K.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q6_K.gguf) | Q6_K | 0.27GB |\n| [roberta_cnn_legal.Q8_0.gguf](https://huggingface.co/RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf/blob/main/roberta_cnn_legal.Q8_0.gguf) | Q8_0 | 0.35GB |\n\n\n\n\nOriginal model description:\n---\r\nlicense: mit\r\nlanguage:\r\n- en\r\npipeline_tag: sentence-similarity\r\ndatasets:\r\n- darrow-ai/LegalLensNLI\r\nmetrics:\r\n- f1\r\nbase_model:\r\n- ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli\r\nlibrary_name: transformers\r\n---\r\n# roberta_cnn_legal\n\n## Overview\nThis repository hosts the uOttawa model developed for Subtask B (Legal Natural Language Inference) in the LegalLens-2024 shared task. The task focuses on classifying relationships between legal texts, such as determining if a premise (e.g., a summary of a legal complaint) entails, contradicts, or is neutral with respect to a hypothesis (e.g., an online review).\n## Model Details\n- **Model Type**: Transformer-based model combined with a Convolutional Neural Network (CNN)\n\n- **Framework**: PyTorch, Transformers library\n\n- **Training Data**: LegalLensNLI dataset provided by the LegalLens-2024 organizers\n\n- **Architecture**: Integration of RoBERTa (ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli) with a custom CNN for keyword pattern detection\n\n- **Use Case**: Classifying relationships between legal documents for applications like legal case matching and automated reasoning\n\n## Model Architecture\nThe model architecture consists of:\n\n- **RoBERTa model**: Responsible for capturing contextual information from the input text.\n\n- **CNN model**: Used for keyword detection, including an embedding layer and three convolutional layers with filter sizes (2, 3, 4).\n\n- **Fully connected layer**: Combines the outputs from RoBERTa and CNN for the final classification.\n\n## Installation\nTo use this model, clone this repository and make sure to have the following installed:\n\n```bash\npip install torch\npip install transformers\n```\n## Quick Start\nLoad the model and run inference using the Hugging Face Transformers library:\n\n```code\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification\n\n# Load the model and tokenizer\nmodel = AutoModelForSequenceClassification.from_pretrained(\"nimamegh/roberta_cnn_legal\")\ntokenizer = AutoTokenizer.from_pretrained(\"nimamegh/roberta_cnn_legal\")\n\n# Example inputs\npremise = \"The cat is on the mat.\"\nhypothesis = \"The animal is on the mat.\"\ninputs = tokenizer(premise, hypothesis, return_tensors='pt')\n\n# Get predictions\noutputs = model(**inputs)\npredictions = outputs.logits.argmax(dim=-1)\n\n# Print the prediction result\nprint(\"Predicted class:\", predictions.item())\n\n# Interpretation (optional)\nlabel_map = {0: \"Entailment\", 1: \"Neutral\", 2: \"Contradiction\"}\nprint(\"Result:\", label_map[predictions.item()])\n```\n\n## Training Configuration\n\n- Learning Rate: 2e-5\n\n- Batch Size: 4 (train and evaluation)\n\n- Number of Epochs: 20\n\n- Weight Decay: 0.01\n\n- Optimizer: AdamW\n\n- Trainer Class: Used for fine-tuning with early stopping and warmup steps\n\n## Evaluation Metrics\nThe model was evaluated using an F1-score across multiple domains in the validation set:\n\n- Average F1-score: 88.6%\n\n## Result\n\n- Performance on Hidden Test Set: F1-score of 0.724, achieving 5th place in the LegalLens-2024 competition.\n\n- Comparison:\n\n  - Falcon 7B: 81.02% (average across domains)\n\n  - RoBERTa base: 71.02% (average)\n\n  - uOttawa Model: 88.6% (average on validation)\n\n## Citation\n\n```bibtex\n@misc{meghdadi2024uottawalegallens2024transformerbasedclassification,\n      title={uOttawa at LegalLens-2024: Transformer-based Classification Experiments}, \n      author={Nima Meghdadi and Diana Inkpen},\n      year={2024},\n      eprint={2410.21139},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2410.21139}, \n}\n```\n\n",
    "related_quantizations": []
  },
  "tags": [
    "gguf",
    "arxiv:2410.21139",
    "endpoints_compatible",
    "region:us",
    "feature-extraction"
  ],
  "likes": 0,
  "downloads": 288,
  "gated": false,
  "private": false,
  "last_modified": "2025-06-14T08:35:04.000Z",
  "created_at": "2025-06-14T08:14:12.000Z",
  "pipeline_tag": "",
  "library_name": ""
}
Source payload excerpt (from Hugging Face API)
{
  "_id": "684d2f5490aa3ddb96edf883",
  "id": "RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf",
  "modelId": "RichardErkhov/nimamegh_-_roberta_cnn_legal-gguf",
  "sha": "940517eb801bf2669bcb7c28a597213f6091a0dd",
  "createdAt": "2025-06-14T08:14:12.000Z",
  "lastModified": "2025-06-14T08:35:04.000Z",
  "author": "RichardErkhov",
  "downloads": 288,
  "likes": 0,
  "gated": false,
  "private": false,
  "pipeline_tag": "",
  "library_name": "",
  "siblings_count": 24
}