๐ Incremental label | Acc: 0.714, F1: 0.519
Browse files- .gitignore +13 -0
- README.md +45 -54
- checkpoint-11/config.json +36 -0
- checkpoint-11/model.safetensors +3 -0
- checkpoint-11/special_tokens_map.json +37 -0
- checkpoint-11/tokenizer.json +0 -0
- checkpoint-11/tokenizer_config.json +64 -0
- checkpoint-11/trainer_state.json +64 -0
- checkpoint-11/vocab.txt +0 -0
- config.json +1 -1
- model.safetensors +1 -1
- training_args.bin +2 -2
.gitignore
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TradePulse ML - Artefacts ร ignorer
|
| 2 |
+
logs/
|
| 3 |
+
*.pt
|
| 4 |
+
*.pth
|
| 5 |
+
*.bin
|
| 6 |
+
checkpoints/
|
| 7 |
+
runs/
|
| 8 |
+
wandb/
|
| 9 |
+
*.log
|
| 10 |
+
__pycache__/
|
| 11 |
+
*.pyc
|
| 12 |
+
.DS_Store
|
| 13 |
+
tmp_eval/
|
README.md
CHANGED
|
@@ -1,71 +1,62 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
tags:
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
- f1
|
| 10 |
-
model-index:
|
| 11 |
-
- name: tradepulse-finbert-sentiment
|
| 12 |
-
results: []
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
| 16 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- Accuracy: 0.3846
|
| 24 |
-
- Precision: 0.4462
|
| 25 |
-
- Recall: 0.3846
|
| 26 |
-
- F1: 0.4126
|
| 27 |
-
- F1 Macro: 0.3258
|
| 28 |
-
- Precision Macro: 0.3500
|
| 29 |
-
- Recall Macro: 0.3056
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
- lr_scheduler_type: linear
|
| 54 |
-
- lr_scheduler_warmup_steps: 12
|
| 55 |
-
- num_epochs: 3
|
| 56 |
|
| 57 |
-
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
| No log | 1.0 | 7 | 5.3820 | 0.3077 | 0.3077 | 0.3077 | 0.3077 | 0.2222 | 0.2222 | 0.2222 |
|
| 62 |
-
| 4.744 | 2.0 | 14 | 3.3730 | 0.3846 | 0.4462 | 0.3846 | 0.4126 | 0.3258 | 0.3500 | 0.3056 |
|
| 63 |
-
| 1.0682 | 3.0 | 21 | 2.7144 | 0.3846 | 0.4462 | 0.3846 | 0.4126 | 0.3258 | 0.3500 | 0.3056 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
### Framework versions
|
| 67 |
-
|
| 68 |
-
- Transformers 4.41.0
|
| 69 |
-
- Pytorch 2.7.1+cpu
|
| 70 |
-
- Datasets 2.19.1
|
| 71 |
-
- Tokenizers 0.19.1
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
tags:
|
| 5 |
+
- finance
|
| 6 |
+
- sentiment-analysis
|
| 7 |
+
- finbert
|
| 8 |
+
- trading
|
| 9 |
+
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Bencode92/tradepulse-finbert-sentiment
|
|
|
|
| 13 |
|
| 14 |
+
## Description
|
| 15 |
+
Fine-tuned FinBERT model for financial sentiment analysis in TradePulse.
|
| 16 |
|
| 17 |
+
**Task**: Sentiment Classification
|
| 18 |
+
**Target Column**: `label`
|
| 19 |
+
**Labels**: ['negative', 'neutral', 'positive']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
## Performance
|
| 22 |
|
| 23 |
+
*Last training: 2025-07-09 15:39*
|
| 24 |
+
*Dataset: `news_20250709.csv` (56 samples)*
|
| 25 |
|
| 26 |
+
| Metric | Value |
|
| 27 |
+
|--------|-------|
|
| 28 |
+
| Loss | 1.6623 |
|
| 29 |
+
| Accuracy | 0.7857 |
|
| 30 |
+
| F1 Score | 0.7837 |
|
| 31 |
+
| F1 Macro | 0.7837 |
|
| 32 |
+
| Precision | 0.7934 |
|
| 33 |
+
| Recall | 0.7857 |
|
| 34 |
|
| 35 |
+
## Training Details
|
| 36 |
|
| 37 |
+
- **Base Model**: Bencode92/tradepulse-finbert-sentiment
|
| 38 |
+
- **Training Mode**: Incremental
|
| 39 |
+
- **Epochs**: 2
|
| 40 |
+
- **Learning Rate**: 1e-05
|
| 41 |
+
- **Batch Size**: 4
|
| 42 |
+
- **Class Balancing**: None
|
| 43 |
|
| 44 |
+
## Usage
|
| 45 |
|
| 46 |
+
```python
|
| 47 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 48 |
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained("Bencode92/tradepulse-finbert-sentiment")
|
| 50 |
+
model = AutoModelForSequenceClassification.from_pretrained("Bencode92/tradepulse-finbert-sentiment")
|
| 51 |
|
| 52 |
+
# Example prediction
|
| 53 |
+
text = "Apple reported strong quarterly earnings beating expectations"
|
| 54 |
+
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
|
| 55 |
+
outputs = model(**inputs)
|
| 56 |
+
predictions = outputs.logits.softmax(dim=-1)
|
| 57 |
+
```
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
## Model Card Authors
|
| 60 |
|
| 61 |
+
- TradePulse ML Team
|
| 62 |
+
- Auto-generated on 2025-07-09 15:39:06
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkpoint-11/config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "Bencode92/tradepulse-finbert-sentiment",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "negative",
|
| 13 |
+
"1": "neutral",
|
| 14 |
+
"2": "positive"
|
| 15 |
+
},
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 3072,
|
| 18 |
+
"label2id": {
|
| 19 |
+
"negative": 0,
|
| 20 |
+
"neutral": 1,
|
| 21 |
+
"positive": 2
|
| 22 |
+
},
|
| 23 |
+
"layer_norm_eps": 1e-12,
|
| 24 |
+
"max_position_embeddings": 512,
|
| 25 |
+
"model_type": "bert",
|
| 26 |
+
"num_attention_heads": 12,
|
| 27 |
+
"num_hidden_layers": 12,
|
| 28 |
+
"pad_token_id": 0,
|
| 29 |
+
"position_embedding_type": "absolute",
|
| 30 |
+
"problem_type": "single_label_classification",
|
| 31 |
+
"torch_dtype": "float32",
|
| 32 |
+
"transformers_version": "4.41.0",
|
| 33 |
+
"type_vocab_size": 2,
|
| 34 |
+
"use_cache": true,
|
| 35 |
+
"vocab_size": 30873
|
| 36 |
+
}
|
checkpoint-11/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:beb7a90b969fd27377b1473dfa16619a7086d635988a964302c9887669d7fe5d
|
| 3 |
+
size 439039996
|
checkpoint-11/special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
checkpoint-11/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-11/tokenizer_config.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"2": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"3": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"4": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"5": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"max_length": 512,
|
| 50 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_to_multiple_of": null,
|
| 53 |
+
"pad_token": "[PAD]",
|
| 54 |
+
"pad_token_type_id": 0,
|
| 55 |
+
"padding_side": "right",
|
| 56 |
+
"sep_token": "[SEP]",
|
| 57 |
+
"stride": 0,
|
| 58 |
+
"strip_accents": null,
|
| 59 |
+
"tokenize_chinese_chars": true,
|
| 60 |
+
"tokenizer_class": "BertTokenizer",
|
| 61 |
+
"truncation_side": "right",
|
| 62 |
+
"truncation_strategy": "longest_first",
|
| 63 |
+
"unk_token": "[UNK]"
|
| 64 |
+
}
|
checkpoint-11/trainer_state.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7836734693877551,
|
| 3 |
+
"best_model_checkpoint": "hf-sentiment-production/checkpoint-11",
|
| 4 |
+
"epoch": 1.0,
|
| 5 |
+
"eval_steps": 500,
|
| 6 |
+
"global_step": 11,
|
| 7 |
+
"is_hyper_param_search": false,
|
| 8 |
+
"is_local_process_zero": true,
|
| 9 |
+
"is_world_process_zero": true,
|
| 10 |
+
"log_history": [
|
| 11 |
+
{
|
| 12 |
+
"epoch": 0.9090909090909091,
|
| 13 |
+
"grad_norm": 20.06096839904785,
|
| 14 |
+
"learning_rate": 1e-05,
|
| 15 |
+
"loss": 0.5297,
|
| 16 |
+
"step": 10
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"epoch": 1.0,
|
| 20 |
+
"eval_accuracy": 0.7857142857142857,
|
| 21 |
+
"eval_f1": 0.7836734693877551,
|
| 22 |
+
"eval_f1_macro": 0.7746031746031745,
|
| 23 |
+
"eval_loss": 1.6622570753097534,
|
| 24 |
+
"eval_precision": 0.7933673469387755,
|
| 25 |
+
"eval_precision_macro": 0.7579365079365079,
|
| 26 |
+
"eval_recall": 0.7857142857142857,
|
| 27 |
+
"eval_recall_macro": 0.8055555555555555,
|
| 28 |
+
"eval_runtime": 7.8549,
|
| 29 |
+
"eval_samples_per_second": 1.782,
|
| 30 |
+
"eval_steps_per_second": 0.509,
|
| 31 |
+
"step": 11
|
| 32 |
+
}
|
| 33 |
+
],
|
| 34 |
+
"logging_steps": 10,
|
| 35 |
+
"max_steps": 22,
|
| 36 |
+
"num_input_tokens_seen": 0,
|
| 37 |
+
"num_train_epochs": 2,
|
| 38 |
+
"save_steps": 500,
|
| 39 |
+
"stateful_callbacks": {
|
| 40 |
+
"EarlyStoppingCallback": {
|
| 41 |
+
"args": {
|
| 42 |
+
"early_stopping_patience": 1,
|
| 43 |
+
"early_stopping_threshold": 0.0
|
| 44 |
+
},
|
| 45 |
+
"attributes": {
|
| 46 |
+
"early_stopping_patience_counter": 0
|
| 47 |
+
}
|
| 48 |
+
},
|
| 49 |
+
"TrainerControl": {
|
| 50 |
+
"args": {
|
| 51 |
+
"should_epoch_stop": false,
|
| 52 |
+
"should_evaluate": false,
|
| 53 |
+
"should_log": false,
|
| 54 |
+
"should_save": true,
|
| 55 |
+
"should_training_stop": false
|
| 56 |
+
},
|
| 57 |
+
"attributes": {}
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
"total_flos": 11050763544576.0,
|
| 61 |
+
"train_batch_size": 4,
|
| 62 |
+
"trial_name": null,
|
| 63 |
+
"trial_params": null
|
| 64 |
+
}
|
checkpoint-11/vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "Bencode92/tradepulse-finbert-sentiment",
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 439039996
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:beb7a90b969fd27377b1473dfa16619a7086d635988a964302c9887669d7fe5d
|
| 3 |
size 439039996
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee63087a09f921beca0840c54a1806c0f34dd30d754242a62ed314cf5ffea0c3
|
| 3 |
+
size 5521
|