Instructions to use xshubhamx/REAL-InLegalBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xshubhamx/REAL-InLegalBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="xshubhamx/REAL-InLegalBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("xshubhamx/REAL-InLegalBERT") model = AutoModelForSequenceClassification.from_pretrained("xshubhamx/REAL-InLegalBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "law-ai/InLegalBERT", | |
| "architectures": [ | |
| "BertForSequenceClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_ids": 0, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "Issue", | |
| "1": "Court Discourse", | |
| "2": "Conclusion", | |
| "3": "Precedent Analysis", | |
| "4": "Section Analysis", | |
| "5": "Argument by Petitioner", | |
| "6": "Fact", | |
| "7": "Argument by Respondent", | |
| "8": "Ratio", | |
| "9": "Appellant", | |
| "10": "Respondent", | |
| "11": "Argument by Appellant", | |
| "12": "Petitioner", | |
| "13": "Judge", | |
| "14": "Argument by Defendant" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "Appellant": 9, | |
| "Argument by Appellant": 11, | |
| "Argument by Defendant": 14, | |
| "Argument by Petitioner": 5, | |
| "Argument by Respondent": 7, | |
| "Conclusion": 2, | |
| "Court Discourse": 1, | |
| "Fact": 6, | |
| "Issue": 0, | |
| "Judge": 13, | |
| "Petitioner": 12, | |
| "Precedent Analysis": 3, | |
| "Ratio": 8, | |
| "Respondent": 10, | |
| "Section Analysis": 4 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "output_past": true, | |
| "pad_token_id": 30522, | |
| "position_embedding_type": "absolute", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.38.2", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 30523 | |
| } | |