Run this model with HF Jobs
Run cngchis/phi4-mini-intent 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/cngchis/phi4-mini-intent. 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/cngchis/phi4-mini-intent 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.
Instructions to use cngchis/phi4-mini-intent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cngchis/phi4-mini-intent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cngchis/phi4-mini-intent")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cngchis/phi4-mini-intent") model = AutoModelForCausalLM.from_pretrained("cngchis/phi4-mini-intent", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files13 unmodified lines1415161713 unmodified linesnew_version: cngchis/phi4-mini-intentpipeline_tag: text-classificationlibrary_name: transformers---13 unmodified lines141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811913 unmodified linesnew_version: cngchis/phi4-mini-intentpipeline_tag: text-classificationlibrary_name: transformers---# Intent Classification Model## Model DescriptionThis repository contains a **fine-tuned Transformer model** for **intent classification**.The model is built using Hugging Face `transformers` and stored in **safetensors format**, enabling efficient and safe loading.It predicts an intent label from input text for tasks such as chatbot understanding, ticket routing, and text categorization.---## How to Use### Install dependencies```bashpip install transformers torch```---### Load model```bashfrom transformers import AutoTokenizer, AutoModelForSequenceClassificationimport torchmodel_path = "cngchis/phi4-mini-intent"tokenizer = AutoTokenizer.from_pretrained(model_path)model = AutoModelForSequenceClassification.from_pretrained(model_path)text = "I cannot log into my account"inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)with torch.no_grad():outputs = model(**inputs)logits = outputs.logitspredicted_class = torch.argmax(logits, dim=1).item()print(predicted_class)```---### Input Format (Recommended)```json"I want to reset my password"```---### Output FormatThe model outputs a class index, which can be mapped to intent labels:```json3 → password_reset1 → login_issue5 → payment_problem```(You should define label mapping in your application.)---### Model DetailsArchitecture: Transformer-based classification modelTask: Intent classificationFormat: PyTorch (safetensors)Library: Hugging Face TransformersInput: Natural language textOutput: Single intent classNotesBest performance when input format matches training dataRequires label mapping for interpretationWorks with GPUSupports batch inference via Transformers---### LimitationsNot suitable for generative tasksSensitive to domain shift (out-of-distribution text)Requires consistent intent label schema---### AcknowledgementsBuilt using:Hugging Face TransformersPyTorchSafetensors format
README.md+103-1