Instructions to use dima806/tweets-financial-classifier-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/tweets-financial-classifier-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dima806/tweets-financial-classifier-distilbert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dima806/tweets-financial-classifier-distilbert") model = AutoModelForSequenceClassification.from_pretrained("dima806/tweets-financial-classifier-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- checkpoint-12144/config.json +70 -0
- checkpoint-12144/optimizer.pt +3 -0
- checkpoint-12144/pytorch_model.bin +3 -0
- checkpoint-12144/rng_state.pth +3 -0
- checkpoint-12144/scheduler.pt +3 -0
- checkpoint-12144/trainer_state.json +0 -0
- checkpoint-12144/training_args.bin +3 -0
- config.json +70 -0
- pytorch_model.bin +3 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
checkpoint-12144/config.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bert-base-uncased",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "Analyst Update",
|
| 14 |
+
"1": "Company | Product News",
|
| 15 |
+
"2": "Currencies",
|
| 16 |
+
"3": "Dividend",
|
| 17 |
+
"4": "Earnings",
|
| 18 |
+
"5": "Energy | Oil",
|
| 19 |
+
"6": "Fed | Central Banks",
|
| 20 |
+
"7": "Financials",
|
| 21 |
+
"8": "General News | Opinion",
|
| 22 |
+
"9": "Gold | Metals | Materials",
|
| 23 |
+
"10": "IPO",
|
| 24 |
+
"11": "Legal | Regulation",
|
| 25 |
+
"12": "M&A | Investments",
|
| 26 |
+
"13": "Macro",
|
| 27 |
+
"14": "Markets",
|
| 28 |
+
"15": "Personnel Change",
|
| 29 |
+
"16": "Politics",
|
| 30 |
+
"17": "Stock Commentary",
|
| 31 |
+
"18": "Stock Movement",
|
| 32 |
+
"19": "Treasuries | Corporate Debt"
|
| 33 |
+
},
|
| 34 |
+
"initializer_range": 0.02,
|
| 35 |
+
"intermediate_size": 3072,
|
| 36 |
+
"label2id": {
|
| 37 |
+
"Analyst Update": 0,
|
| 38 |
+
"Company | Product News": 1,
|
| 39 |
+
"Currencies": 2,
|
| 40 |
+
"Dividend": 3,
|
| 41 |
+
"Earnings": 4,
|
| 42 |
+
"Energy | Oil": 5,
|
| 43 |
+
"Fed | Central Banks": 6,
|
| 44 |
+
"Financials": 7,
|
| 45 |
+
"General News | Opinion": 8,
|
| 46 |
+
"Gold | Metals | Materials": 9,
|
| 47 |
+
"IPO": 10,
|
| 48 |
+
"Legal | Regulation": 11,
|
| 49 |
+
"M&A | Investments": 12,
|
| 50 |
+
"Macro": 13,
|
| 51 |
+
"Markets": 14,
|
| 52 |
+
"Personnel Change": 15,
|
| 53 |
+
"Politics": 16,
|
| 54 |
+
"Stock Commentary": 17,
|
| 55 |
+
"Stock Movement": 18,
|
| 56 |
+
"Treasuries | Corporate Debt": 19
|
| 57 |
+
},
|
| 58 |
+
"layer_norm_eps": 1e-12,
|
| 59 |
+
"max_position_embeddings": 512,
|
| 60 |
+
"model_type": "bert",
|
| 61 |
+
"num_attention_heads": 12,
|
| 62 |
+
"num_hidden_layers": 12,
|
| 63 |
+
"pad_token_id": 0,
|
| 64 |
+
"position_embedding_type": "absolute",
|
| 65 |
+
"torch_dtype": "float32",
|
| 66 |
+
"transformers_version": "4.33.0",
|
| 67 |
+
"type_vocab_size": 2,
|
| 68 |
+
"use_cache": true,
|
| 69 |
+
"vocab_size": 30522
|
| 70 |
+
}
|
checkpoint-12144/optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd1e847d55e68deb46721d2ab96be41ef44498a5fb4e00f17ff84fb29d7bb800
|
| 3 |
+
size 876148613
|
checkpoint-12144/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f16f57e05e26cd342e335725560c29d7bf18dd6096eadd32bf0fe47cbc396f7
|
| 3 |
+
size 438058865
|
checkpoint-12144/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3abeada9fd5d82b9e06d3a5ae8fc7fd5ea9afc711a7e473f515d9509b1d0fbf4
|
| 3 |
+
size 14575
|
checkpoint-12144/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:584b8c7e8de3a254527bb00ed5290c556b3fda302c598cc8fda01d856a7089e0
|
| 3 |
+
size 627
|
checkpoint-12144/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-12144/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e53b84e53b815c8d950387b45b503a10236b98d9668972d031dcc81f75563cf
|
| 3 |
+
size 4027
|
config.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bert-base-uncased",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "Analyst Update",
|
| 14 |
+
"1": "Company | Product News",
|
| 15 |
+
"2": "Currencies",
|
| 16 |
+
"3": "Dividend",
|
| 17 |
+
"4": "Earnings",
|
| 18 |
+
"5": "Energy | Oil",
|
| 19 |
+
"6": "Fed | Central Banks",
|
| 20 |
+
"7": "Financials",
|
| 21 |
+
"8": "General News | Opinion",
|
| 22 |
+
"9": "Gold | Metals | Materials",
|
| 23 |
+
"10": "IPO",
|
| 24 |
+
"11": "Legal | Regulation",
|
| 25 |
+
"12": "M&A | Investments",
|
| 26 |
+
"13": "Macro",
|
| 27 |
+
"14": "Markets",
|
| 28 |
+
"15": "Personnel Change",
|
| 29 |
+
"16": "Politics",
|
| 30 |
+
"17": "Stock Commentary",
|
| 31 |
+
"18": "Stock Movement",
|
| 32 |
+
"19": "Treasuries | Corporate Debt"
|
| 33 |
+
},
|
| 34 |
+
"initializer_range": 0.02,
|
| 35 |
+
"intermediate_size": 3072,
|
| 36 |
+
"label2id": {
|
| 37 |
+
"Analyst Update": 0,
|
| 38 |
+
"Company | Product News": 1,
|
| 39 |
+
"Currencies": 2,
|
| 40 |
+
"Dividend": 3,
|
| 41 |
+
"Earnings": 4,
|
| 42 |
+
"Energy | Oil": 5,
|
| 43 |
+
"Fed | Central Banks": 6,
|
| 44 |
+
"Financials": 7,
|
| 45 |
+
"General News | Opinion": 8,
|
| 46 |
+
"Gold | Metals | Materials": 9,
|
| 47 |
+
"IPO": 10,
|
| 48 |
+
"Legal | Regulation": 11,
|
| 49 |
+
"M&A | Investments": 12,
|
| 50 |
+
"Macro": 13,
|
| 51 |
+
"Markets": 14,
|
| 52 |
+
"Personnel Change": 15,
|
| 53 |
+
"Politics": 16,
|
| 54 |
+
"Stock Commentary": 17,
|
| 55 |
+
"Stock Movement": 18,
|
| 56 |
+
"Treasuries | Corporate Debt": 19
|
| 57 |
+
},
|
| 58 |
+
"layer_norm_eps": 1e-12,
|
| 59 |
+
"max_position_embeddings": 512,
|
| 60 |
+
"model_type": "bert",
|
| 61 |
+
"num_attention_heads": 12,
|
| 62 |
+
"num_hidden_layers": 12,
|
| 63 |
+
"pad_token_id": 0,
|
| 64 |
+
"position_embedding_type": "absolute",
|
| 65 |
+
"torch_dtype": "float32",
|
| 66 |
+
"transformers_version": "4.33.0",
|
| 67 |
+
"type_vocab_size": 2,
|
| 68 |
+
"use_cache": true,
|
| 69 |
+
"vocab_size": 30522
|
| 70 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f16f57e05e26cd342e335725560c29d7bf18dd6096eadd32bf0fe47cbc396f7
|
| 3 |
+
size 438058865
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e53b84e53b815c8d950387b45b503a10236b98d9668972d031dcc81f75563cf
|
| 3 |
+
size 4027
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|