distilbert_food_text_artifacts

This model is a fine-tuned version of distilbert-base-uncased on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 0.0155
  • Accuracy: 1.0
  • Precision: 1.0
  • Recall: 1.0
  • F1: 1.0

Model description

This model classifies short food descriptions into semantic classes (e.g., Dish, Ingredient, Beverage). It was fine-tuned on the augmented split and evaluated on both the test subset of augmented and the original split as an external validation set.

Dataset

  • HF dataset: aedupuga/food-description-text (splits: augmented, original)
  • We discover the label set dynamically from both splits to stay consistent with the dataset card.

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 5

Training results

Training Loss Epoch Step Validation Loss Accuracy Precision Recall F1
0.1081 1.0 80 0.0947 0.975 0.9788 0.975 0.9698
0.0182 2.0 160 0.0139 1.0 1.0 1.0 1.0
0.0118 3.0 240 0.0077 1.0 1.0 1.0 1.0
0.0085 4.0 320 0.0059 1.0 1.0 1.0 1.0
0.0068 5.0 400 0.0054 1.0 1.0 1.0 1.0

Framework versions

  • Transformers 4.56.1
  • Pytorch 2.8.0+cu126
  • Datasets 4.0.0
  • Tokenizers 0.22.0

Quickstart

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch, numpy as np

model_id = "{cfg.HUB_REPO_ID}"
tok = AutoTokenizer.from_pretrained(model_id)
mdl = AutoModelForSequenceClassification.from_pretrained(model_id)
mdl.eval()

text = "Orange juice is made by squeezing oranges."
inputs = tok(text, return_tensors="pt", truncation=True)
with torch.no_grad():
    logits = mdl(**inputs).logits
probs = torch.softmax(logits, dim=-1)[0].detach().numpy()
pred = int(np.argmax(probs))
print(pred, mdl.config.id2label[pred], probs[pred])
Downloads last month
3
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yusenthebot/distilbert_food_text_artifacts

Finetuned
(10039)
this model

Dataset used to train yusenthebot/distilbert_food_text_artifacts