lxyuan commited on
Commit
ba1a56a
·
1 Parent(s): 1cf4fbd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -6
README.md CHANGED
@@ -2,11 +2,18 @@
2
  license: apache-2.0
3
  tags:
4
  - generated_from_trainer
 
 
5
  datasets:
6
  - banking77
7
  model-index:
8
  - name: banking-intent-distilbert-classifier
9
  results: []
 
 
 
 
 
10
  ---
11
 
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -24,19 +31,40 @@ It achieves the following results on the evaluation set:
24
  - epoch: 10.0
25
  - step: 3130
26
 
27
- ## Model description
 
 
 
 
 
28
 
29
- More information needed
 
 
30
 
31
- ## Intended uses & limitations
 
32
 
33
- More information needed
 
 
 
 
 
 
 
 
 
34
 
35
  ## Training and evaluation data
36
 
37
- More information needed
 
 
 
38
 
39
  ## Training procedure
 
40
 
41
  ### Training hyperparameters
42
 
@@ -57,4 +85,4 @@ The following hyperparameters were used during training:
57
  - Transformers 4.29.2
58
  - Pytorch 1.9.0+cu111
59
  - Datasets 2.12.0
60
- - Tokenizers 0.13.3
 
2
  license: apache-2.0
3
  tags:
4
  - generated_from_trainer
5
+ - finance
6
+ - intent-classification
7
  datasets:
8
  - banking77
9
  model-index:
10
  - name: banking-intent-distilbert-classifier
11
  results: []
12
+ language:
13
+ - en
14
+ metrics:
15
+ - accuracy
16
+ pipeline_tag: text-classification
17
  ---
18
 
19
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
31
  - epoch: 10.0
32
  - step: 3130
33
 
34
+ _Note: This is just a simple example of fine-tuning a DistilBERT model for
35
+ multi-class classification task to see how much it costs to train this
36
+ model on Google Cloud (using a T4 GPU). It costs me about 1.07 SGD and
37
+ takes less than 20 mins to complete the training. Although my intention was just
38
+ to test it out on Google Cloud, the model has been appropriately trained
39
+ and is now ready to be used. Hopefully, it is what you're looking for._
40
 
41
+ ## Inference example
42
+ ```python
43
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
44
 
45
+ tokenizer = AutoTokenizer.from_pretrained("lxyuan/banking-intent-distilbert-classifier")
46
+ model = AutoModelForSequenceClassification.from_pretrained("lxyuan/banking-intent-distilbert-classifier")
47
 
48
+ banking_intend_classifier = TextClassificationPipeline(
49
+ model=model,
50
+ tokenizer=tokenizer,
51
+ device=0
52
+ )
53
+
54
+ banking_intend_classifier("How to report lost card?")
55
+ >>> [{'label': 'lost_or_stolen_card', 'score': 0.9518502950668335}]
56
+
57
+ ```
58
 
59
  ## Training and evaluation data
60
 
61
+ The BANKING77 dataset consists of online banking queries labeled with their corresponding intents,
62
+ offering a comprehensive collection of 77 finely categorized intents within the banking domain.
63
+ With a total of 13,083 customer service queries, it specifically emphasizes precise intent detection
64
+ within a single domain.
65
 
66
  ## Training procedure
67
+ To reproduce the result, please refer to this [notebook](https://github.com/LxYuan0420/nlp/blob/main/notebooks/distillbert-intent-classification-banking.ipynb)
68
 
69
  ### Training hyperparameters
70
 
 
85
  - Transformers 4.29.2
86
  - Pytorch 1.9.0+cu111
87
  - Datasets 2.12.0
88
+ - Tokenizers 0.13.3