Instructions to use saxon11/llama3.1-8b-classifier-josh-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saxon11/llama3.1-8b-classifier-josh-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="saxon11/llama3.1-8b-classifier-josh-ds") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("saxon11/llama3.1-8b-classifier-josh-ds", dtype="auto") - llama-cpp-python
How to use saxon11/llama3.1-8b-classifier-josh-ds with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="saxon11/llama3.1-8b-classifier-josh-ds", filename="meta-llama-3.1-8b-instruct.Q8_0.gguf", )
llm.create_chat_completion( messages = "\"I like you. I love you\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use saxon11/llama3.1-8b-classifier-josh-ds with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0 # Run inference directly in the terminal: llama-cli -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0 # Run inference directly in the terminal: llama-cli -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
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 saxon11/llama3.1-8b-classifier-josh-ds:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
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 saxon11/llama3.1-8b-classifier-josh-ds:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
Use Docker
docker model run hf.co/saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
- LM Studio
- Jan
- Ollama
How to use saxon11/llama3.1-8b-classifier-josh-ds with Ollama:
ollama run hf.co/saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
- Unsloth Studio
How to use saxon11/llama3.1-8b-classifier-josh-ds 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 saxon11/llama3.1-8b-classifier-josh-ds 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 saxon11/llama3.1-8b-classifier-josh-ds to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for saxon11/llama3.1-8b-classifier-josh-ds to start chatting
- Pi
How to use saxon11/llama3.1-8b-classifier-josh-ds with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
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": "saxon11/llama3.1-8b-classifier-josh-ds:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use saxon11/llama3.1-8b-classifier-josh-ds with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
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 saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use saxon11/llama3.1-8b-classifier-josh-ds with Docker Model Runner:
docker model run hf.co/saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
- Lemonade
How to use saxon11/llama3.1-8b-classifier-josh-ds with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saxon11/llama3.1-8b-classifier-josh-ds:Q8_0
Run and chat with the model
lemonade run user.llama3.1-8b-classifier-josh-ds-Q8_0
List all available models
lemonade list
Llama 3.1 8B โ Josh/DS Question Classifier
A fine-tuned Llama 3.1 8B Instruct model that classifies incoming questions as either JOSH_DS (related to Josh Janzen or Data Science/AI) or OFF_TOPIC.
Built as the routing layer for a multi-model virtual assistant architecture on joshjanzen.com.
Training
- Method: GRPO (Group Relative Policy Optimization) via Unsloth
- Base model:
meta-llama/Llama-3.1-8B-Instruct - Dataset: 110 labeled examples (68 JOSH_DS, 42 OFF_TOPIC)
- Best checkpoint: Step 170 (reward 2.652)
- Hardware: NVIDIA RTX 5090 (32 GB)
- Quantization: Q8_0 (~8 GB)
Reward Functions
| Function | Weight | Purpose |
|---|---|---|
| XML tag structure | 0.5 | Proper <reasoning> and <classification> tags |
| Format match | 0.5 | Complete XML output format |
| Valid label | 0.5 | Only "JOSH_DS" or "OFF_TOPIC" |
| Correctness | 2.0 | Matches ground truth label |
Usage with Ollama
# Download the GGUF and Modelfile, then:
ollama create josh-classifier -f Modelfile
ollama run josh-classifier "What is RAG in AI?"
Expected Output
<reasoning>This question is about Retrieval-Augmented Generation, a core AI/ML topic
in Josh's expertise.</reasoning><classification>JOSH_DS</classification>
System Prompt
The model expects this system prompt (included in the Modelfile):
You are a question classifier for Josh Janzen's virtual assistant.
Your task is to classify incoming questions into one of two categories:
- JOSH_DS: Questions about Josh Janzen, his background, his projects, OR questions about Data Science, AI, Machine Learning, LLMs, or related technical topics
- OFF_TOPIC: Questions not related to Josh or Data Science/AI topics
JOSH'S EXPERTISE AREAS (classify as JOSH_DS if related to any of these):
1. LLM Engineering: building LLMs, transformers, fine-tuning (LoRA, QLoRA, RLHF), PyTorch
2. Self-Hosting LLMs: Ollama, Qwen, Llama, GPU inference, Hugging Face
3. Agentic AI: LangChain, LangGraph, OpenAI Agents SDK, tool calling, MCP
4. RAG: pipelines, chunking, embeddings, ChromaDB, FAISS, semantic search
5. Production AI Deployment: FastAPI, Docker, CI/CD, GCP, Azure, AWS
6. Full-Stack AI Apps: Streamlit, Gradio, BigQuery, VertexAI
7. AI Security: prompt injection, observability, LangSmith
8. Business AI Strategy, Supply Chain AI, CPG/Food Industry AI
9. Nutrition/Fitness AI, USDA data integration
10. Vector Databases and Semantic Search
11. Tech Career Development and AI Learning Paths
12. Data Science and Analytics
13. Josh's personal background, projects, experience at C.H. Robinson or Hormel Foods
IMPORTANT:
- Casual greetings (hello, hi, hey) -> JOSH_DS (so Josh can greet warmly)
- General programming questions related to AI/ML -> JOSH_DS
- Questions about cooking recipes, sports scores, celebrities, etc. -> OFF_TOPIC
Think briefly about why the question fits a category, then provide your classification.
Place your reasoning between <reasoning> and </reasoning>.
Place your final classification (JOSH_DS or OFF_TOPIC) between <classification> and </classification>.
Architecture
User Question
|
[This Model: Llama 3.1 8B Classifier]
|
JOSH_DS โโ> Main LLM (Qwen 30B + context)
OFF_TOPIC โโ> Polite decline
Limitations
- Trained on 110 examples โ may not generalize perfectly to edge cases
- Designed specifically for Josh Janzen's assistant; not a general-purpose classifier
- Downloads last month
- 1
8-bit
Model tree for saxon11/llama3.1-8b-classifier-josh-ds
Base model
meta-llama/Llama-3.1-8B