AbhishekBhavnani commited on
Commit
7c06cee
·
verified ·
1 Parent(s): 1e73bca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +88 -3
README.md CHANGED
@@ -1,3 +1,88 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - token-classification
4
+ - distilbert
5
+ - named-entity-recognition
6
+ license: apache-2.0
7
+ datasets: restaurant-data
8
+ language:
9
+ - en
10
+ model-index:
11
+ - name: DistilBERT for Token Classification
12
+ results:
13
+ - task:
14
+ type: token-classification
15
+ name: Token Classification
16
+ metrics:
17
+ - type: f1
18
+ value: 0.92
19
+ name: F1 Score
20
+ ---
21
+
22
+ # DistilBERT for Token Classification
23
+
24
+ ## 📝 Overview
25
+
26
+ This model is a fine-tuned version of **DistilBERT** for **token classification** on restaurant-related data. It is capable of recognizing various entities such as:
27
+
28
+ - Dishes
29
+ - Amenities
30
+ - Ratings
31
+ - Restaurant names
32
+ - Opening hours
33
+ - Locations
34
+ - Prices
35
+ - Cuisine types
36
+
37
+ ## 🧠 Model Details
38
+
39
+ - **Architecture**: DistilBertForTokenClassification
40
+ - **Hidden Size**: 768
41
+ - **FFN Inner Hidden Size**: 3072
42
+ - **Attention Heads**: 12
43
+ - **Layers**: 6
44
+ - **Max Position Embeddings**: 512
45
+ - **Dropout**: 0.1
46
+ - **Tokenizer**: DistilBERT Tokenizer
47
+ - **Transformers Version**: 4.51.3
48
+
49
+ ## 🏷️ Labels
50
+
51
+ The model supports the following 17 token classification labels:
52
+
53
+ | ID | Label |
54
+ |----|---------------------|
55
+ | 0 | O |
56
+ | 1 | B-Amenity |
57
+ | 2 | I-Amenity |
58
+ | 3 | B-Dish |
59
+ | 4 | I-Dish |
60
+ | 5 | B-Rating |
61
+ | 6 | I-Rating |
62
+ | 7 | B-Restaurant_Name |
63
+ | 8 | I-Restaurant_Name |
64
+ | 9 | B-Hours |
65
+ | 10 | I-Hours |
66
+ | 11 | B-Location |
67
+ | 12 | I-Location |
68
+ | 13 | B-Price |
69
+ | 14 | I-Price |
70
+ | 15 | B-Cuisine |
71
+ | 16 | I-Cuisine |
72
+
73
+ ## 🚀 Usage Example
74
+
75
+ ```python
76
+ from transformers import DistilBertTokenizer, DistilBertForTokenClassification
77
+
78
+ # Load tokenizer and model
79
+ tokenizer = DistilBertTokenizer.from_pretrained("AbhishekBhavnani/Restaurant-Token-Classifier")
80
+ model = DistilBertForTokenClassification.from_pretrained("AbhishekBhavnani/Restaurant-Token-Classifier")
81
+
82
+ # Example input
83
+ inputs = tokenizer("Find The Best Place To Eat Pizza in Ahmedabad", return_tensors="pt")
84
+ outputs = model(**inputs)
85
+
86
+ # Get predictions
87
+ predictions = outputs.logits.argmax(dim=-1)
88
+ print(predictions)