Instructions to use Rajveerx11/email-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Rajveerx11/email-classifier with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Rajveerx11/email-classifier", filename="Phi-3-mini-4k-instruct-Q5_K_M.gguf", )
llm.create_chat_completion( messages = "\"I like you. I love you\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Rajveerx11/email-classifier with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Rajveerx11/email-classifier:Q5_K_M # Run inference directly in the terminal: llama-cli -hf Rajveerx11/email-classifier:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Rajveerx11/email-classifier:Q5_K_M # Run inference directly in the terminal: llama-cli -hf Rajveerx11/email-classifier:Q5_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 Rajveerx11/email-classifier:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf Rajveerx11/email-classifier:Q5_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 Rajveerx11/email-classifier:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Rajveerx11/email-classifier:Q5_K_M
Use Docker
docker model run hf.co/Rajveerx11/email-classifier:Q5_K_M
- LM Studio
- Jan
- Ollama
How to use Rajveerx11/email-classifier with Ollama:
ollama run hf.co/Rajveerx11/email-classifier:Q5_K_M
- Unsloth Studio new
How to use Rajveerx11/email-classifier with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Rajveerx11/email-classifier to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Rajveerx11/email-classifier to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Rajveerx11/email-classifier to start chatting
- Docker Model Runner
How to use Rajveerx11/email-classifier with Docker Model Runner:
docker model run hf.co/Rajveerx11/email-classifier:Q5_K_M
- Lemonade
How to use Rajveerx11/email-classifier with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Rajveerx11/email-classifier:Q5_K_M
Run and chat with the model
lemonade run user.email-classifier-Q5_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,62 +8,45 @@ tags:
|
|
| 8 |
- gguf
|
| 9 |
- llama.cpp
|
| 10 |
- phi-3
|
|
|
|
| 11 |
---
|
| 12 |
-
# π§ Email Classifier (Phi-3 Mini GGUF)
|
| 13 |
|
| 14 |
## π§ Model Overview
|
| 15 |
|
| 16 |
-
This
|
| 17 |
|
| 18 |
* **Base Model:** Phi-3 Mini 4K Instruct
|
| 19 |
-
* **
|
|
|
|
| 20 |
* **Quantization:** Q5_K_M
|
| 21 |
-
* **Framework:** llama.cpp / compatible runtimes
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
-
##
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
*
|
| 30 |
-
*
|
| 31 |
-
* Edge or CPU-based deployments
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
-
##
|
| 36 |
-
|
| 37 |
-
### Using llama.cpp
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
-
##
|
| 46 |
-
|
| 47 |
-
| File Name | Description |
|
| 48 |
-
| ---------------------------------- | -------------------- |
|
| 49 |
-
| Phi-3-mini-4k-instruct-Q5_K_M.gguf | Quantized model file |
|
| 50 |
-
|
| 51 |
-
---
|
| 52 |
-
|
| 53 |
-
## π Model Details
|
| 54 |
-
|
| 55 |
-
* Context Length: 4K tokens
|
| 56 |
-
* Architecture: Transformer
|
| 57 |
-
* Quantization Type: Q5_K_M
|
| 58 |
-
* Precision: 5-bit
|
| 59 |
-
|
| 60 |
-
---
|
| 61 |
|
| 62 |
-
##
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
|
| 68 |
---
|
| 69 |
|
|
@@ -84,22 +67,39 @@ Spam
|
|
| 84 |
|
| 85 |
---
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
## π Notes
|
| 88 |
|
| 89 |
-
*
|
| 90 |
-
*
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
## π License
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
---
|
| 99 |
|
| 100 |
## π Acknowledgements
|
| 101 |
|
| 102 |
* Microsoft for Phi-3
|
| 103 |
-
*
|
|
|
|
| 104 |
|
| 105 |
-
---
|
|
|
|
| 8 |
- gguf
|
| 9 |
- llama.cpp
|
| 10 |
- phi-3
|
| 11 |
+
pipeline_tag: text-classification
|
| 12 |
---
|
| 13 |
+
# π§ Email Classifier (Phi-3 Mini Fine-Tuned GGUF)
|
| 14 |
|
| 15 |
## π§ Model Overview
|
| 16 |
|
| 17 |
+
This model is a **fine-tuned version of Phi-3 Mini (4K Instruct)** optimized for **email classification tasks** such as spam detection and categorization.
|
| 18 |
|
| 19 |
* **Base Model:** Phi-3 Mini 4K Instruct
|
| 20 |
+
* **Fine-tuning:** Supervised fine-tuning on email dataset
|
| 21 |
+
* **Format:** GGUF (for efficient local inference)
|
| 22 |
* **Quantization:** Q5_K_M
|
|
|
|
| 23 |
|
| 24 |
---
|
| 25 |
|
| 26 |
+
## π Dataset
|
| 27 |
|
| 28 |
+
The model was trained on:
|
| 29 |
|
| 30 |
+
* **Dataset:** `json22322/email-classifier`
|
| 31 |
+
* Contains labeled email samples for classification tasks (e.g., spam vs non-spam)
|
|
|
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
+
## π― Task
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
* Email classification
|
| 38 |
+
* Spam detection
|
| 39 |
+
* Priority categorization
|
| 40 |
|
| 41 |
---
|
| 42 |
|
| 43 |
+
## βοΈ Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
### Using llama.cpp
|
| 46 |
|
| 47 |
+
```bash
|
| 48 |
+
./main -m Phi-3-mini-4k-instruct-Q5_K_M.gguf -p "Classify this email: Subject: ... Body: ..."
|
| 49 |
+
```
|
| 50 |
|
| 51 |
---
|
| 52 |
|
|
|
|
| 67 |
|
| 68 |
---
|
| 69 |
|
| 70 |
+
## β οΈ Limitations
|
| 71 |
+
|
| 72 |
+
* Performance depends on dataset quality
|
| 73 |
+
* May not generalize to unseen domains
|
| 74 |
+
* Sensitive to prompt phrasing
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## π¦ Files
|
| 79 |
+
|
| 80 |
+
| File | Description |
|
| 81 |
+
| ------ | -------------------------- |
|
| 82 |
+
| *.gguf | Quantized fine-tuned model |
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
## π Notes
|
| 87 |
|
| 88 |
+
* Optimized for **local inference (CPU-friendly)**
|
| 89 |
+
* Compatible with **llama.cpp and GGUF runtimes**
|
| 90 |
|
| 91 |
---
|
| 92 |
|
| 93 |
## π License
|
| 94 |
|
| 95 |
+
Same as base model (Phi-3).
|
| 96 |
|
| 97 |
---
|
| 98 |
|
| 99 |
## π Acknowledgements
|
| 100 |
|
| 101 |
* Microsoft for Phi-3
|
| 102 |
+
* Hugging Face
|
| 103 |
+
* llama.cpp
|
| 104 |
|
| 105 |
+
---
|