Grocery Named Entity Recognition Model
A fine-tuned GLiNER model for identifying grocery items and food categories in text.
Model Description
This model is fine-tuned on the grocery-ner-dataset to identify 14 different categories of grocery items including fruits, vegetables, dairy products, and more.
Supported Entity Types
- Fruits Vegetables
- Lactose, Diary, Eggs, Cheese, Yoghurt
- Meat, Fish, Seafood
- Frozen, Prepared Meals
- Baking, Cooking
- Cereals, Grains, Canned, Seeds
- Breads
- Snacks, Pastries, Treats
- Frozen Desserts
- Hot Drinks, Chilled Drinks
- Alcoholic Drinks
- Spices, Sauces
- World Foods
- Dietary Restrictions, Health, Allergens, Lifestyle
Training Details
- Base Model: gliner-community/gliner_medium-v2.5
- Training Data: empathyai/grocery-ner-dataset
- Batch Size: 8
- Learning Rate: 5e-6
- Weight Decay: 0.01
- Focal Loss Parameters: alpha=0.75, gamma=2
- Training Strategy: Linear learning rate with 10% warmup
Usage Example
from gliner import GLiNER
# Load model
model = GLiNER.from_pretrained("empathyai/grocery-ner-model")
labels = [
"Fruits Vegetables",
"Lactose, Diary, Eggs, Cheese, Yoghurt",
"Meat, Fish, Seafood",
"Frozen, Prepared Meals",
"Baking, Cooking",
"Cereals, Grains, Canned, Seeds",
"Breads",
"Snacks, Pastries, Treats",
"Frozen Desserts",
"Hot Drinks, Chilled Drinks",
"Alcoholic Drinks",
"Spices, Sauces",
"World Foods",
"Dietary Restrictions, Health, Allergens, Lifestyle"
]
# Example text
text = "I need to buy milk, bread, and fresh apples"
# Get predictions
predictions = model.predict(text, labels=labels)
print(predictions)
Limitations
- Optimized for English language text only
- Best performance on grocery shopping and food-related contexts
- May not recognize brand names or regional food items not present in training data
- Downloads last month
- 321
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the HF Inference API does not support gliner models with pipeline type token-classification
Model tree for empathyai/gliner_large-v2.5-groceries
Base model
gliner-community/gliner_medium-v2.5