Instructions to use RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf with Ollama:
ollama run hf.co/RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf:Q4_K_M
Run and chat with the model
lemonade run user.kingabzpro_-_Phi-3.5-mini-instruct-Ecommerce-Text-Classification-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- Original model description:
- datasets:
- saurabhshahane/ecommerce-text-classification
language:
- en
library_name: transformers
license: apache-2.0
metrics:
- accuracy
- f1
pipeline_tag: text-generation
tags:
- Ecommerce
- Phi-3.5
- Fine-tuned
- Phi-3.5-mini-instruct-Ecommerce-Text-Classification
- Tutorial
- Use with Transformers
- Results
Quantization made by Richard Erkhov.
Phi-3.5-mini-instruct-Ecommerce-Text-Classification - GGUF
- Model creator: https://huggingface.co/kingabzpro/
- Original model: https://huggingface.co/kingabzpro/Phi-3.5-mini-instruct-Ecommerce-Text-Classification/
Original model description:
datasets: - saurabhshahane/ecommerce-text-classification language: - en library_name: transformers license: apache-2.0 metrics: - accuracy - f1 pipeline_tag: text-generation tags: - Ecommerce - Phi-3.5 - Fine-tuned
Phi-3.5-mini-instruct-Ecommerce-Text-Classification
This model is a fine-tuned version of microsoft/Phi-3.5-mini-instruct on an saurabhshahane/ecommerce-text-classification dataset.
Tutorial
Customize Phi-3.5-mini-instruct model to predict various Ecommerce Categories from the text.
Use with Transformers
from transformers import AutoTokenizer,AutoModelForCausalLM,pipeline
import torch
model_id = "kingabzpro/Phi-3.5-mini-instruct-Ecommerce-Text-Classification"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
return_dict=True,
low_cpu_mem_usage=True,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True,
)
text = "Inalsa Dazzle Glass Top, 3 Burner Gas Stove with Rust Proof Powder Coated Body, Black Toughened Glass Top, 2 Medium and 1 Small High Efficiency Brass Burners, Aluminum Mixing Tubes, Powder Coated Body, Inbuilt Stainless Steel Drip Trays, 360 degree Swivel Nozzle,Bigger Legs to Facilitate Cleaning Under Cooktop"
prompt = f"""Classify the E-commerce text into Electronics, Household, Books and Clothing.
text: {text}
label: """.strip()
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipe(prompt, max_new_tokens=4, do_sample=True, temperature=0.1)
print(outputs[0]["generated_text"].split("label: ")[-1].strip())
# Household
Results
Accuracy: 0.860
Accuracy for label Electronics: 0.825
Accuracy for label Household: 0.926
Accuracy for label Books: 0.683
Accuracy for label Clothing: 0.947
Classification Report:
precision recall f1-score support
Electronics 0.97 0.82 0.89 40
Household 0.88 0.93 0.90 81
Books 0.90 0.68 0.78 41
Clothing 0.88 0.95 0.91 38
micro avg 0.90 0.86 0.88 200
macro avg 0.91 0.85 0.87 200
weighted avg 0.90 0.86 0.88 200
Confusion Matrix:
[[33 6 1 0]
[ 1 75 2 3]
[ 0 3 28 2]
[ 0 1 0 36]]
- Downloads last month
- 698
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit