Instructions to use vantan/longformer-text-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vantan/longformer-text-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vantan/longformer-text-classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("vantan/longformer-text-classification") model = AutoModelForSequenceClassification.from_pretrained("vantan/longformer-text-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 1947
Browse files- config.json +1 -1
- model.safetensors +1 -1
- tokenizer_config.json +4 -0
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LongformerForSequenceClassification"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "vantan/longformer-text-classification",
|
| 3 |
"architectures": [
|
| 4 |
"LongformerForSequenceClassification"
|
| 5 |
],
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 594690488
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5a0522c34afdfe11dd8070fc9ca45cfb99916cc06b56d3c5f0758389e11585dd
|
| 3 |
size 594690488
|
tokenizer_config.json
CHANGED
|
@@ -48,10 +48,14 @@
|
|
| 48 |
"eos_token": "</s>",
|
| 49 |
"errors": "replace",
|
| 50 |
"mask_token": "<mask>",
|
|
|
|
| 51 |
"model_max_length": 4096,
|
| 52 |
"pad_token": "</s>",
|
| 53 |
"sep_token": "</s>",
|
|
|
|
| 54 |
"tokenizer_class": "LongformerTokenizer",
|
| 55 |
"trim_offsets": true,
|
|
|
|
|
|
|
| 56 |
"unk_token": "<unk>"
|
| 57 |
}
|
|
|
|
| 48 |
"eos_token": "</s>",
|
| 49 |
"errors": "replace",
|
| 50 |
"mask_token": "<mask>",
|
| 51 |
+
"max_length": 2048,
|
| 52 |
"model_max_length": 4096,
|
| 53 |
"pad_token": "</s>",
|
| 54 |
"sep_token": "</s>",
|
| 55 |
+
"stride": 0,
|
| 56 |
"tokenizer_class": "LongformerTokenizer",
|
| 57 |
"trim_offsets": true,
|
| 58 |
+
"truncation_side": "right",
|
| 59 |
+
"truncation_strategy": "longest_first",
|
| 60 |
"unk_token": "<unk>"
|
| 61 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5112
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12c8e9dcfafef434a1dbbe2745175d7b0470c5b2ae9a7c655267920fb38e4694
|
| 3 |
size 5112
|