Instructions to use nickbull/D13 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nickbull/D13 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="nickbull/D13")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("nickbull/D13") model = AutoModelForTokenClassification.from_pretrained("nickbull/D13", device_map="auto") - Notebooks
- Google Colab
- Kaggle
matterstack/legal-bert-ner
Browse filesFiles changed (6)
- README.md+18-18
- config.json+21-26
- model.safetensors+2-2
- tokenizer.json
- tokenizer_config.json+6-15
- training_args.bin+1-1
12343456710 unmodified lines181920212122232425262324252627282912 unmodified lines424344454647454647484950505152531 unmodified line5556575859606162636458596061626364656667---library_name: transformerslicense: mitbase_model: microsoft/deberta-v3-largelicense: cc-by-sa-4.0base_model: nlpaueb/legal-bert-base-uncasedtags:- generated_from_trainermetrics:10 unmodified lines
# D13
This model is a fine-tuned version of [microsoft/deberta-v3-large](https://huggingface.co/microsoft/deberta-v3-large) on the None dataset.This model is a fine-tuned version of [nlpaueb/legal-bert-base-uncased](https://huggingface.co/nlpaueb/legal-bert-base-uncased) on the None dataset.It achieves the following results on the evaluation set:- Loss: nan- Precision: 0- Recall: 0.0- F1: 0- Loss: 0.1706- Precision: 0.9156- Recall: 0.8697- F1: 0.8921
## Model description
12 unmodified lines### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 1e-05- train_batch_size: 4- eval_batch_size: 8- learning_rate: 3e-05- train_batch_size: 16- eval_batch_size: 32- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 16- total_train_batch_size: 64- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- lr_scheduler_warmup_steps: 0.11 unmodified line
### Training results
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 ||:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:--:|| 0.0 | 1.0 | 223 | nan | 0 | 0.0 | 0 || 0.0 | 2.0 | 446 | nan | 0 | 0.0 | 0 || 0.0 | 3.0 | 669 | nan | 0 | 0.0 | 0 || 0.0 | 4.0 | 892 | nan | 0 | 0.0 | 0 || 0.0 | 5.0 | 1115 | nan | 0 | 0.0 | 0 || Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 ||:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|| 5.1623 | 1.0 | 56 | 0.3592 | 0.8416 | 0.7402 | 0.7876 || 0.9632 | 2.0 | 112 | 0.2104 | 0.9104 | 0.8380 | 0.8727 || 0.6647 | 3.0 | 168 | 0.1821 | 0.9147 | 0.8574 | 0.8851 || 0.5513 | 4.0 | 224 | 0.1706 | 0.9156 | 0.8697 | 0.8921 || 0.5136 | 5.0 | 280 | 0.1701 | 0.9144 | 0.8692 | 0.8912 |
### Framework versions12334566787891011121314111516171814 unmodified lines33343532363738394013 unmodified lines545556525357585556575859596061626361626364656667686970716465666774686970767172{ "add_cross_attention": false, "architectures": [ "DebertaV2ForTokenClassification" "BertForTokenClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 1, "dtype": "float16", "eos_token_id": 2, "bos_token_id": null, "classifier_dropout": null, "dtype": "float32", "eos_token_id": null, "eos_token_ids": 0, "finetuning_task": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1024, "hidden_size": 768, "id2label": { "0": "O", "1": "B-PERSON",14 unmodified lines "16": "I-MISC" }, "initializer_range": 0.02, "intermediate_size": 4096, "intermediate_size": 3072, "is_decoder": false, "label2id": { "B-CODE": 9, "B-DATETIME": 7,13 unmodified lines "I-QUANTITY": 12, "O": 0 }, "layer_norm_eps": 1e-07, "legacy": true, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "max_relative_positions": -1, "model_type": "deberta-v2", "norm_rel_ebd": "layer_norm", "num_attention_heads": 16, "num_hidden_layers": 24, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "output_past": true, "pad_token_id": 0, "pooler_dropout": 0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 1024, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 256, "relative_attention": true, "share_att_key": true, "pruned_heads": {}, "tie_word_embeddings": true, "torchscript": false, "transformers_version": "5.1.0", "type_vocab_size": 0, "type_vocab_size": 2, "use_bfloat16": false, "use_cache": false, "vocab_size": 128100 "vocab_size": 30522}12323version https://git-lfs.github.com/spec/v1oid sha256:8bd4012cf000397408d81d5255a8013b935c9843988be3d8533df23064f5e956size 868107682oid sha256:bd1eb59cde8ed5a973d41cbbcb35754063d79f60fcce0fa1bf08c1797badf1cfsize 4356422041224367891011124561578918192021221011121314{ "add_prefix_space": true, "backend": "tokenizers", "bos_token": "[CLS]", "cls_token": "[CLS]", "do_lower_case": false, "eos_token": "[SEP]", "extra_special_tokens": [ "[PAD]", "[CLS]", "[SEP]" ], "do_lower_case": true, "is_local": false, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "model_max_length": 512, "pad_token": "[PAD]", "sep_token": "[SEP]", "split_by_punct": false, "tokenizer_class": "DebertaV2Tokenizer", "unk_id": 3, "unk_token": "[UNK]", "vocab_type": "spm" "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}1223version https://git-lfs.github.com/spec/v1oid sha256:0e38b92ea70d4ee86763a277a31ce7aee92a61b96c69eef67ac90d989c0fb93foid sha256:0941155c089d3347ec1dff7458cb872bf2d653e36ab6685724255f990720dd62size 5201README.md+18-18
config.json+21-26
model.safetensors+2-2
tokenizer.json
tokenizer_config.json+6-15
training_args.bin+1-1