bilalzafar commited on
Commit
8c7b9ad
·
verified ·
1 Parent(s): 56b0e95

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -7
README.md CHANGED
@@ -34,18 +34,12 @@ tags:
34
 
35
  **Intended usage:** Use this model to **classify sentence-level sentiment** in **CBDC** texts (reports, consultations, speeches, research notes, reputable news). It is **domain-specific** and *not intended* for generic or informal sentiment tasks.
36
 
37
- ---
38
-
39
  ## Preprocessing & class imbalance
40
  Sentences were **lowercased** (no stemming/lemmatization) and tokenized with the base tokenizer from [`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT) using **max\_length=320** with truncation and **dynamic padding** via `DataCollatorWithPadding`. To address imbalance, training used *Focal Loss (γ=1.0)* with **class weights** computed from the *train* split (`class_weight="balanced"`) applied in the loss, plus a *WeightedRandomSampler* with √(inverse-frequency) *per-sample weights*.
41
 
42
- ---
43
-
44
  ## Training procedure
45
  Training used **[`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT)** as the base, with a 3-label `AutoModelForSequenceClassification` head. Optimization was *AdamW* (HF Trainer) with *learning rate 2e-5*, *batch size 16* (train/eval), and up to *8 epochs* with early stopping (patience=2)*—best epoch \~*6*. A *warmup ratio of 0.06*, *weight decay 0.01*, and *fp16* precision were applied. Runs were seeded (*42*) and executed on *Google Colab (T4)*.
46
 
47
- ---
48
-
49
  ## Evaluation
50
 
51
  On the **validation split** (\~10% of data), the model achieved **accuracy** *0.8458*, **macro-F1** *0.8270*, and **weighted-F1** *0.8453*.
@@ -63,6 +57,29 @@ Note: On the **entire annotated dataset** (in-domain evaluation, no hold-out), t
63
 
64
  ---
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ## Usage
67
 
68
  ```python
@@ -82,4 +99,21 @@ for s in sentences:
82
  print(f"{s}\n → {result['label']} (score={result['score']:.4f})\n")
83
 
84
  # Example output:
85
- # [{CBDCs will revolutionize payment systems and improve financial inclusion. → positive (score=0.9789)}]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  **Intended usage:** Use this model to **classify sentence-level sentiment** in **CBDC** texts (reports, consultations, speeches, research notes, reputable news). It is **domain-specific** and *not intended* for generic or informal sentiment tasks.
36
 
 
 
37
  ## Preprocessing & class imbalance
38
  Sentences were **lowercased** (no stemming/lemmatization) and tokenized with the base tokenizer from [`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT) using **max\_length=320** with truncation and **dynamic padding** via `DataCollatorWithPadding`. To address imbalance, training used *Focal Loss (γ=1.0)* with **class weights** computed from the *train* split (`class_weight="balanced"`) applied in the loss, plus a *WeightedRandomSampler* with √(inverse-frequency) *per-sample weights*.
39
 
 
 
40
  ## Training procedure
41
  Training used **[`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT)** as the base, with a 3-label `AutoModelForSequenceClassification` head. Optimization was *AdamW* (HF Trainer) with *learning rate 2e-5*, *batch size 16* (train/eval), and up to *8 epochs* with early stopping (patience=2)*—best epoch \~*6*. A *warmup ratio of 0.06*, *weight decay 0.01*, and *fp16* precision were applied. Runs were seeded (*42*) and executed on *Google Colab (T4)*.
42
 
 
 
43
  ## Evaluation
44
 
45
  On the **validation split** (\~10% of data), the model achieved **accuracy** *0.8458*, **macro-F1** *0.8270*, and **weighted-F1** *0.8453*.
 
57
 
58
  ---
59
 
60
+ ## Other CBDC Models
61
+
62
+ This model is part of the **CentralBank-BERT / CBDC model family**, a suite of domain-adapted classifiers for analyzing central-bank communication.
63
+
64
+ | **Model** | **Purpose** | **Intended Use** | **Link** |
65
+ | ------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------- |
66
+ | **bilalzafar/CentralBank-BERT** | Domain-adaptive masked LM trained on BIS speeches (1996–2024). | Base encoder for CBDC downstream tasks; fill-mask tasks. | [CentralBank-BERT](https://huggingface.co/bilalzafar/CentralBank-BERT) |
67
+ | **bilalzafar/CBDC-BERT** | Binary classifier: CBDC vs. Non-CBDC. | Flagging CBDC-related discourse in large corpora. | [CBDC-BERT](https://huggingface.co/bilalzafar/CBDC-BERT) |
68
+ | **bilalzafar/CBDC-Stance** | 3-class stance model (Pro, Wait-and-See, Anti). | Research on policy stances and discourse monitoring. | [CBDC-Stance](https://huggingface.co/bilalzafar/CBDC-Stance) |
69
+ | **bilalzafar/CBDC-Sentiment** | 3-class sentiment model (Positive, Neutral, Negative). | Tone analysis in central bank communications. | [CBDC-Sentiment](https://huggingface.co/bilalzafar/CBDC-Sentiment) |
70
+ | **bilalzafar/CBDC-Type** | Classifies Retail, Wholesale, General CBDC mentions. | Distinguishing policy focus (retail vs wholesale). | [CBDC-Type](https://huggingface.co/bilalzafar/CBDC-Type) |
71
+ | **bilalzafar/CBDC-Discourse** | 3-class discourse classifier (Feature, Process, Risk-Benefit). | Structured categorization of CBDC communications. | [CBDC-Discourse](https://huggingface.co/bilalzafar/CBDC-Discourse) |
72
+ | **bilalzafar/CentralBank-NER** | Named Entity Recognition (NER) model for central banking discourse. | Identifying institutions, persons, and policy entities in speeches. | [CentralBank-NER](https://huggingface.co/bilalzafar/CentralBank-NER) |
73
+
74
+
75
+ ## Repository and Replication Package
76
+
77
+ All **training pipelines, preprocessing scripts, evaluation notebooks, and result outputs** are available in the companion GitHub repository:
78
+
79
+ 🔗 **[https://github.com/bilalezafar/CentralBank-BERT](https://github.com/bilalezafar/CentralBank-BERT)**
80
+
81
+ ---
82
+
83
  ## Usage
84
 
85
  ```python
 
99
  print(f"{s}\n → {result['label']} (score={result['score']:.4f})\n")
100
 
101
  # Example output:
102
+ # [{CBDCs will revolutionize payment systems and improve financial inclusion. → positive (score=0.9789)}]
103
+ ```
104
+ ---
105
+
106
+ ## Citation
107
+
108
+ If you use this model, please cite as:
109
+
110
+ **Zafar, M. B. (2025). *CentralBank-BERT: Machine Learning Evidence on Central Bank Digital Currency Discourse*. SSRN. [https://papers.ssrn.com/abstract=5404456](https://papers.ssrn.com/abstract=5404456)**
111
+
112
+ ```bibtex
113
+ @article{zafar2025centralbankbert,
114
+ title={CentralBank-BERT: Machine Learning Evidence on Central Bank Digital Currency Discourse},
115
+ author={Zafar, Muhammad Bilal},
116
+ year={2025},
117
+ journal={SSRN Electronic Journal},
118
+ url={https://papers.ssrn.com/abstract=5404456}
119
+ }