Instructions to use eclec/patentClassificationLongFormer2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eclec/patentClassificationLongFormer2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="eclec/patentClassificationLongFormer2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("eclec/patentClassificationLongFormer2") model = AutoModelForSequenceClassification.from_pretrained("eclec/patentClassificationLongFormer2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
update model card README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: allenai/longformer-large-4096
|
| 3 |
+
tags:
|
| 4 |
+
- generated_from_trainer
|
| 5 |
+
metrics:
|
| 6 |
+
- accuracy
|
| 7 |
+
- f1
|
| 8 |
+
model-index:
|
| 9 |
+
- name: patentClassificationLongFormer2
|
| 10 |
+
results: []
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
+
|
| 16 |
+
# patentClassificationLongFormer2
|
| 17 |
+
|
| 18 |
+
This model is a fine-tuned version of [allenai/longformer-large-4096](https://huggingface.co/allenai/longformer-large-4096) on the None dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 0.5872
|
| 21 |
+
- Accuracy: 0.6915
|
| 22 |
+
- F1: 0.6830
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training and evaluation data
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training procedure
|
| 37 |
+
|
| 38 |
+
### Training hyperparameters
|
| 39 |
+
|
| 40 |
+
The following hyperparameters were used during training:
|
| 41 |
+
- learning_rate: 1.2626703924039218e-05
|
| 42 |
+
- train_batch_size: 8
|
| 43 |
+
- eval_batch_size: 8
|
| 44 |
+
- seed: 14
|
| 45 |
+
- gradient_accumulation_steps: 2
|
| 46 |
+
- total_train_batch_size: 16
|
| 47 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 48 |
+
- lr_scheduler_type: cosine
|
| 49 |
+
- lr_scheduler_warmup_ratio: 0.2371119155080165
|
| 50 |
+
- lr_scheduler_warmup_steps: 60
|
| 51 |
+
- num_epochs: 4
|
| 52 |
+
|
| 53 |
+
### Training results
|
| 54 |
+
|
| 55 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
| 56 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
|
| 57 |
+
| 0.6157 | 1.0 | 2219 | 0.5872 | 0.6915 | 0.6830 |
|
| 58 |
+
| 0.5701 | 2.0 | 4438 | 0.6197 | 0.6558 | 0.7278 |
|
| 59 |
+
| 0.4684 | 3.0 | 6657 | 0.6148 | 0.6937 | 0.7203 |
|
| 60 |
+
| 0.3747 | 4.0 | 8876 | 0.6910 | 0.6915 | 0.6971 |
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
### Framework versions
|
| 64 |
+
|
| 65 |
+
- Transformers 4.31.0
|
| 66 |
+
- Pytorch 2.0.0
|
| 67 |
+
- Datasets 2.14.4
|
| 68 |
+
- Tokenizers 0.13.3
|