niruthiha commited on
Commit
df8519c
·
verified ·
1 Parent(s): 79863ed

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - token-classification
5
+ - ner
6
+ - named-entity-recognition
7
+ - roberta
8
+ - restaurant
9
+ - mit-restaurant
10
+ datasets:
11
+ - mit_restaurant
12
+ metrics:
13
+ - f1
14
+ - precision
15
+ - recall
16
+ - accuracy
17
+ widget:
18
+ - text: "I want a reservation at an italian restaurant with outdoor seating"
19
+ example_title: "Restaurant query"
20
+ - text: "Find me a cheap chinese place near downtown"
21
+ example_title: "Restaurant search"
22
+ ---
23
+
24
+ # RoBERTa Large for MIT Restaurant NER
25
+
26
+ This model is a fine-tuned version of RoBERTa Large on the MIT Restaurant dataset for Named Entity Recognition (NER).
27
+
28
+ ## Model Description
29
+
30
+ - **Model type:** Token Classification (NER)
31
+ - **Base model:** roberta-large
32
+ - **Dataset:** MIT Restaurant NER dataset
33
+ - **Languages:** English
34
+ - **Task:** Named Entity Recognition for restaurant domain
35
+
36
+ ## Entity Types
37
+
38
+ The model can identify the following entity types:
39
+ ['O', 'B-Amenity', 'I-Amenity', 'B-Cuisine', 'I-Cuisine', 'B-Dish', 'I-Dish', 'B-Hours', 'I-Hours', 'B-Location', 'I-Location', 'B-Price', 'I-Price', 'B-Rating', 'I-Rating', 'B-Restaurant_Name', 'I-Restaurant_Name']
40
+
41
+ ## Usage
42
+
43
+ ```python
44
+ from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
45
+
46
+ tokenizer = AutoTokenizer.from_pretrained("niruthiha/roberta-large-mit-restaurant-ner")
47
+ model = AutoModelForTokenClassification.from_pretrained("niruthiha/roberta-large-mit-restaurant-ner")
48
+
49
+ # Using pipeline
50
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
51
+ result = nlp("I want a reservation at an italian restaurant with outdoor seating")
52
+ print(result)
53
+
54
+ # Manual usage
55
+ inputs = tokenizer("I want a reservation at an italian restaurant", return_tensors="pt")
56
+ outputs = model(**inputs)
57
+ ```
58
+
59
+ ## Training Details
60
+
61
+ - Fine-tuned on MIT Restaurant NER dataset
62
+ - Training epochs: 5
63
+ - Learning rate: 1e-5
64
+ - Batch size: 16
65
+ - Gradient accumulation steps: 2
66
+
67
+ ## Dataset
68
+
69
+ The MIT Restaurant dataset contains restaurant-related queries with entity annotations.
70
+ Dataset source: https://groups.csail.mit.edu/sls/downloads/restaurant/
71
+
72
+ ## Performance
73
+
74
+ The model achieves good performance on restaurant domain NER tasks. Specific metrics will be updated after evaluation.
config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "roberta-large",
3
+ "architectures": [
4
+ "RobertaForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "id2label": {
14
+ "0": "O",
15
+ "1": "B-Amenity",
16
+ "2": "I-Amenity",
17
+ "3": "B-Cuisine",
18
+ "4": "I-Cuisine",
19
+ "5": "B-Dish",
20
+ "6": "I-Dish",
21
+ "7": "B-Hours",
22
+ "8": "I-Hours",
23
+ "9": "B-Location",
24
+ "10": "I-Location",
25
+ "11": "B-Price",
26
+ "12": "I-Price",
27
+ "13": "B-Rating",
28
+ "14": "I-Rating",
29
+ "15": "B-Restaurant_Name",
30
+ "16": "I-Restaurant_Name"
31
+ },
32
+ "initializer_range": 0.02,
33
+ "intermediate_size": 4096,
34
+ "label2id": {
35
+ "B-Amenity": 1,
36
+ "B-Cuisine": 3,
37
+ "B-Dish": 5,
38
+ "B-Hours": 7,
39
+ "B-Location": 9,
40
+ "B-Price": 11,
41
+ "B-Rating": 13,
42
+ "B-Restaurant_Name": 15,
43
+ "I-Amenity": 2,
44
+ "I-Cuisine": 4,
45
+ "I-Dish": 6,
46
+ "I-Hours": 8,
47
+ "I-Location": 10,
48
+ "I-Price": 12,
49
+ "I-Rating": 14,
50
+ "I-Restaurant_Name": 16,
51
+ "O": 0
52
+ },
53
+ "layer_norm_eps": 1e-05,
54
+ "max_position_embeddings": 514,
55
+ "model_type": "roberta",
56
+ "num_attention_heads": 16,
57
+ "num_hidden_layers": 24,
58
+ "pad_token_id": 1,
59
+ "position_embedding_type": "absolute",
60
+ "torch_dtype": "float32",
61
+ "transformers_version": "4.48.3",
62
+ "type_vocab_size": 1,
63
+ "use_cache": true,
64
+ "vocab_size": 50265
65
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8afce2aa862f4a6433e13eb6420eadc5d48f59af7de3354df4d52fb42befb0a6
3
+ size 1417358292
special_tokens_map.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": {
6
+ "content": "<mask>",
7
+ "lstrip": true,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "pad_token": "<pad>",
13
+ "sep_token": "</s>",
14
+ "unk_token": "<unk>"
15
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": false,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "extra_special_tokens": {},
51
+ "mask_token": "<mask>",
52
+ "model_max_length": 512,
53
+ "pad_token": "<pad>",
54
+ "sep_token": "</s>",
55
+ "tokenizer_class": "RobertaTokenizer",
56
+ "trim_offsets": true,
57
+ "unk_token": "<unk>"
58
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97ee8c05659a087fc0e79e4c341c4131415f6cdc72aeb6945a3ec9f0d7cd99bc
3
+ size 5304
vocab.json ADDED
The diff for this file is too large to render. See raw diff