Run this model with HF Jobs

Run get2rayan/smartsavor-intent-distilbert on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/get2rayan/smartsavor-intent-distilbert. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/get2rayan/smartsavor-intent-distilbert on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Model Card for SmartSavor Intent Classifier

Fine-tuned DistilBERT model for classifying English prompts into three SmartSavor intent categories: recipe lookup, culinary assistance, and out-of-scope requests.

Model Details

Model Description

  • Developed by: get2rayan
  • Model type: DistilBERT sequence classifier
  • Language(s): English
  • License: Apache-2.0 (inherited from the base model; see note below)
  • Finetuned from: distilbert/distilbert-base-uncased

The classifier returns one of the following labels:

Label Meaning
recipe_lookup Requests for recipe recommendations or meal ideas
culinary_assistance Cooking questions, ingredient substitutions, or technique help
out_of_scope Requests outside the intended food and cooking domain

Model Sources

Uses

Direct Use

Classify a single English user prompt into one of the three intent labels. The model predicts a category; it does not answer the prompt or generate recipes.

Downstream Use

Use the predicted label to route requests in a food or cooking application. Applications should include suitable fallback behavior for uncertain predictions.

Out-of-Scope Use

Do not use this model as a general-purpose classifier, as a response generator, or as the sole basis for safety-critical or high-impact decisions. It is not designed for non-English text or domains not represented in its training data.

Bias, Risks, and Limitations

  • The training dataset contains 300 labeled prompts, and the evaluation split contains only 60 examples.
  • The evaluation split was also used for per-epoch evaluation and best-checkpoint selection. Reported results are not an independent estimate of generalization.
  • The classifier always selects one of its three labels, even for ambiguous or unfamiliar prompts.
  • Performance may vary with non-English text, unusual phrasing, long inputs, or examples that differ from the training data.
  • Softmax scores are model confidence estimates, not calibrated probabilities or guarantees of correctness.

Recommendations

Test on representative, previously unseen prompts before deployment. Consider a confidence threshold and a human or rule-based fallback for ambiguous requests. Monitor errors across all labels and update the training data when the application domain changes.

How to Get Started with the Model

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_id = "get2rayan/smartsavor-intent-distilbert"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()

text = "Suggest a vegetarian pasta recipe for dinner"
inputs = tokenizer(text, return_tensors="pt", truncation=True)

with torch.no_grad():
    logits = model(**inputs).logits
    probabilities = torch.softmax(logits, dim=-1)[0]

predicted_id = probabilities.argmax().item()
label = model.config.id2label[predicted_id]
confidence = probabilities[predicted_id].item()
print({"label": label, "confidence": confidence})

For hosted inference, send requests to the authenticated endpoint URL using the request format provided by the hosting service.

Training Details

Training Data

The source dataset contains 300 English prompts with prompt text and one of three intent labels. The dataset was split with stratification into 240 training examples and 60 evaluation examples (test_size=0.2, random_state=42). The training dataset is not included in this model repository.

Training Procedure

The base model was fine-tuned as a three-class sequence classifier. The best checkpoint was selected using evaluation accuracy.

Preprocessing

Prompts were tokenized with the base model's uncased tokenizer, with truncation and a maximum sequence length of 512 tokens. Intent labels were encoded as:

ID Label
0 recipe_lookup
1 culinary_assistance
2 out_of_scope

Training Hyperparameters

  • Training regime: float32 (as saved in model configuration)
  • Epochs: 3
  • Learning rate: 2e-5
  • Per-device train batch size: 10
  • Per-device evaluation batch size: 10
  • Weight decay: 0.01
  • Best-checkpoint metric: accuracy

Speeds, Sizes, Times

Training duration, compute cost, and energy usage were not recorded for this model card.

Evaluation

Testing Data, Factors & Metrics

Testing Data

Evaluation used the 60-example stratified split from the 300-prompt source dataset, with 20 examples per class. This split was used during training for checkpoint selection and should not be treated as an independent final test set.

Factors

Metrics are reported by intent label. No demographic or other subgroup evaluation was performed.

Metrics

Accuracy is the fraction of evaluation prompts assigned the correct label. Per-class precision, recall, and F1 are also reported.

Results

Label Precision Recall F1 Support
recipe_lookup 1.00 1.00 1.00 20
culinary_assistance 1.00 1.00 1.00 20
out_of_scope 1.00 1.00 1.00 20
Overall accuracy 1.00 60

These scores describe the provided evaluation split only. Because the same split informed checkpoint selection and is small, performance on new data may be lower.

Environmental Impact

Compute region, hardware hours, and carbon emissions were not measured. Emissions can be estimated with the Machine Learning Impact calculator when the required compute information is available.

Technical Specifications

Model Architecture and Objective

DistilBERT sequence classification with three output classes; trained using a single-label classification objective.

Compute Infrastructure

The training environment was a local Python 3.13 environment. Exact hardware and runtime details were not recorded.

Software

  • Python 3.13
  • PyTorch
  • Transformers

Citation

This model has no separate publication. For the base model, see the DistilBERT model card and DistilBERT paper.

Model Card Authors

get2rayan

Model Card Contact

Use the discussion or contact options on the model repository.

License Note

The base model is listed as Apache-2.0. Confirm that the training data and your intended use also permit redistribution and use under the applicable terms.

Downloads last month
40
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 get2rayan/smartsavor-intent-distilbert

Finetuned
(13,056)
this model

Paper for get2rayan/smartsavor-intent-distilbert