File size: 2,175 Bytes
df8519c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
language: en
tags:
- token-classification
- ner
- named-entity-recognition
- roberta
- restaurant
- mit-restaurant
datasets:
- mit_restaurant
metrics:
- f1
- precision
- recall
- accuracy
widget:
- text: "I want a reservation at an italian restaurant with outdoor seating"
  example_title: "Restaurant query"
- text: "Find me a cheap chinese place near downtown"
  example_title: "Restaurant search"
---

# RoBERTa Large for MIT Restaurant NER

This model is a fine-tuned version of RoBERTa Large on the MIT Restaurant dataset for Named Entity Recognition (NER).

## Model Description

- **Model type:** Token Classification (NER)
- **Base model:** roberta-large
- **Dataset:** MIT Restaurant NER dataset
- **Languages:** English
- **Task:** Named Entity Recognition for restaurant domain

## Entity Types

The model can identify the following entity types:
['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']

## Usage

```python
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline

tokenizer = AutoTokenizer.from_pretrained("niruthiha/roberta-large-mit-restaurant-ner")
model = AutoModelForTokenClassification.from_pretrained("niruthiha/roberta-large-mit-restaurant-ner")

# Using pipeline
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
result = nlp("I want a reservation at an italian restaurant with outdoor seating")
print(result)

# Manual usage
inputs = tokenizer("I want a reservation at an italian restaurant", return_tensors="pt")
outputs = model(**inputs)
```

## Training Details

- Fine-tuned on MIT Restaurant NER dataset
- Training epochs: 5
- Learning rate: 1e-5
- Batch size: 16
- Gradient accumulation steps: 2

## Dataset

The MIT Restaurant dataset contains restaurant-related queries with entity annotations.
Dataset source: https://groups.csail.mit.edu/sls/downloads/restaurant/

## Performance

The model achieves good performance on restaurant domain NER tasks. Specific metrics will be updated after evaluation.