Instructions to use Rainnighttram/Scam_Detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Rainnighttram/Scam_Detection with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Rainnighttram/Scam_Detection", filename="Fused_Model-1.2B-F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Rainnighttram/Scam_Detection with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Rainnighttram/Scam_Detection:F16 # Run inference directly in the terminal: llama-cli -hf Rainnighttram/Scam_Detection:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Rainnighttram/Scam_Detection:F16 # Run inference directly in the terminal: llama-cli -hf Rainnighttram/Scam_Detection:F16
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 Rainnighttram/Scam_Detection:F16 # Run inference directly in the terminal: ./llama-cli -hf Rainnighttram/Scam_Detection:F16
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 Rainnighttram/Scam_Detection:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Rainnighttram/Scam_Detection:F16
Use Docker
docker model run hf.co/Rainnighttram/Scam_Detection:F16
- LM Studio
- Jan
- Ollama
How to use Rainnighttram/Scam_Detection with Ollama:
ollama run hf.co/Rainnighttram/Scam_Detection:F16
- Unsloth Studio
How to use Rainnighttram/Scam_Detection 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 Rainnighttram/Scam_Detection 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 Rainnighttram/Scam_Detection to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Rainnighttram/Scam_Detection to start chatting
- Pi
How to use Rainnighttram/Scam_Detection with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Rainnighttram/Scam_Detection:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Rainnighttram/Scam_Detection:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Rainnighttram/Scam_Detection with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Rainnighttram/Scam_Detection:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Rainnighttram/Scam_Detection:F16
Run Hermes
hermes
- Docker Model Runner
How to use Rainnighttram/Scam_Detection with Docker Model Runner:
docker model run hf.co/Rainnighttram/Scam_Detection:F16
- Lemonade
How to use Rainnighttram/Scam_Detection with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Rainnighttram/Scam_Detection:F16
Run and chat with the model
lemonade run user.Scam_Detection-F16
List all available models
lemonade list
Scam SMS Detection Model (Llama 3.2 1B Fine-tuned)
A fine-tuned Llama 3.2 1B model specifically designed to detect and classify scam SMS messages in Hong Kong, with support for both Traditional Chinese and English text.
🚀 Model Overview
This model is based on Meta's Llama 3.2 1B and has been fine-tuned using MLX framework on a carefully curated dataset of SMS messages collected in Hong Kong. The model can effectively distinguish between legitimate and fraudulent SMS messages in both Traditional Chinese and English.
Key Features
- Bilingual Support: Traditional Chinese and English
- Lightweight: 1B parameters for efficient deployment
- Cross-Platform: GGUF format optimized for llama.cpp deployment
- Local Processing: No internet connection required for inference
📊 Model Details
| Specification | Details |
|---|---|
| Base Model | Meta Llama 3.2 1B |
| Fine-tuning Framework | MLX |
| Model Format | GGUF |
| Languages | Traditional Chinese, English |
| Training Data | Self-collected Hong Kong SMS samples |
| Model Size | ~2.5GB |
| Context Length | 8,192 tokens |
🛠 Requirements
Software Dependencies
- llama.cpp (Model Engine)
- Python 3.8+ (for preprocessing scripts)
Hardware Requirements
- Minimum RAM: 8GB
- Recommended RAM: 16GB+
- Storage: 3GB free space
📱 Installation & Deployment
Desktop/Server Deployment
Install llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp makeDownload the model
# Download your model file (replace with actual download link) wget [MODEL_DOWNLOAD_URL] -O scam_sms_detector.ggufRun inference
./main -m scam_sms_detector.gguf -p "Classify this SMS: 恭喜您中獎了!請點擊鏈接領取獎金" -n 50
🔧 Usage Examples
Basic Classification
# English SMS
./main -m scam_sms_detector.gguf -p "Classify: Congratulations! You've won $10,000. Click here to claim your prize!" -n 30
# Traditional Chinese SMS
./main -m scam_sms_detector.gguf -p "分類此短信:您的銀行賬戶已被凍結,請立即點擊鏈接驗證身份" -n 30
Batch Processing
import subprocess
import json
def classify_sms(text):
cmd = [
"./main",
"-m", "scam_sms_detector.gguf",
"-p", f"Classify this SMS as SCAM or LEGITIMATE: {text}",
"-n", "10"
]
result = subprocess.run(cmd, capture_output=True, text=True)
return result.stdout.strip()
# Example usage
messages = [
"Your package is ready for delivery. Track: https://bit.ly/track123",
"Meeting scheduled for 3 PM tomorrow in conference room A",
"恭喜!您已被選中獲得免費iPhone,請點擊領取"
]
for msg in messages:
classification = classify_sms(msg)
print(f"Message: {msg}")
print(f"Classification: {classification}\n")
API Integration
# Simple Flask API wrapper
from flask import Flask, request, jsonify
import subprocess
app = Flask(__name__)
@app.route('/classify', methods=['POST'])
def classify_sms():
data = request.json
sms_text = data.get('text', '')
cmd = [
"./main",
"-m", "scam_sms_detector.gguf",
"-p", f"Classify: {sms_text}",
"-n", "20"
]
result = subprocess.run(cmd, capture_output=True, text=True)
return jsonify({
'text': sms_text,
'classification': result.stdout.strip(),
'confidence': 'high' # You may want to implement confidence scoring
})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
📈 Performance & Capabilities
Language Support
- Traditional Chinese: Optimized for Hong Kong usage patterns
- English: Standard international English
- Mixed Language: Can handle code-switching between Chinese and English
Expected Performance
- Memory Usage: ~3GB RAM during inference
⚠️ Limitations
- Regional Specificity: Optimized for Hong Kong SMS patterns; may need retraining for other regions
- Language Support: Limited to Traditional Chinese and English
- Context Dependency: May require additional context for borderline cases
- Update Frequency: Scam patterns evolve; periodic retraining recommended
- Legal Compliance: Users responsible for compliance with local privacy laws
🤝 Contributing
You are welcomed to contributions to improve the model:
- Data Collection: Help expand the training dataset
- Bug Reports: Report issues or false classifications
- Feature Requests: Suggest improvements or new capabilities
Acknowledgments
- Meta AI for the Llama 3.2 base model
- Apple MLX team for the fine-tuning framework
- Georgi Gerganov for llama.cpp
- Downloads last month
- 5
16-bit
Model tree for Rainnighttram/Scam_Detection
Base model
meta-llama/Llama-3.2-1B