Instructions to use Shubhamranga11/logpsy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Shubhamranga11/logpsy with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Shubhamranga11/logpsy", filename="qwen2.5-coder-7b-instruct.Q4_K_M.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 Shubhamranga11/logpsy 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 Shubhamranga11/logpsy:Q4_K_M # Run inference directly in the terminal: llama cli -hf Shubhamranga11/logpsy:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Shubhamranga11/logpsy:Q4_K_M # Run inference directly in the terminal: llama cli -hf Shubhamranga11/logpsy: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 Shubhamranga11/logpsy:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Shubhamranga11/logpsy: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 Shubhamranga11/logpsy:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Shubhamranga11/logpsy:Q4_K_M
Use Docker
docker model run hf.co/Shubhamranga11/logpsy:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Shubhamranga11/logpsy with Ollama:
ollama run hf.co/Shubhamranga11/logpsy:Q4_K_M
- Unsloth Studio
How to use Shubhamranga11/logpsy 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 Shubhamranga11/logpsy 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 Shubhamranga11/logpsy to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Shubhamranga11/logpsy to start chatting
- Pi
How to use Shubhamranga11/logpsy with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Shubhamranga11/logpsy:Q4_K_M
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": "Shubhamranga11/logpsy:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Shubhamranga11/logpsy with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Shubhamranga11/logpsy:Q4_K_M
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 Shubhamranga11/logpsy:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Shubhamranga11/logpsy with Docker Model Runner:
docker model run hf.co/Shubhamranga11/logpsy:Q4_K_M
- Lemonade
How to use Shubhamranga11/logpsy with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Shubhamranga11/logpsy:Q4_K_M
Run and chat with the model
lemonade run user.logpsy-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Logpsy ๐ค๐ฉบ
Specialized SRE Incident Analysis Model for Structured Root Cause Analysis
Fine-tuned from Qwen2.5-Coder-7B-Instruct to analyze production logs and telemetry, identify evidence-backed incident hypotheses, and generate deterministic JSON for automated incident response pipelines.
Overview
Logpsy is a domain-specific Large Language Model designed for Site Reliability Engineering (SRE) workflows.
Unlike general-purpose chat models, Logpsy is trained to reason over raw operational telemetryโincluding logs from Kubernetes, Docker, Nginx, PostgreSQL, Kafka, Redis, Elasticsearch, and other infrastructure systemsโto produce structured Root Cause Analysis (RCA).
The model prioritizes evidence over speculation. When sufficient telemetry is unavailable, it explicitly abstains instead of inventing explanations.
This makes Logpsy suitable for:
- AI-powered incident response
- Automated RCA pipelines
- Internal SRE assistants
- DevOps automation
- Observability platforms
- SIEM integrations
- Local infrastructure analysis
Key Features
๐ Evidence-Driven RCA
Transforms noisy production logs into structured incident reports by separating:
- Observed facts
- Symptoms
- Supported hypotheses
- Missing telemetry
- Recommended verification steps
๐ซ Built-in Abstention
Production incidents often lack enough evidence.
Instead of hallucinating a root cause, Logpsy can return:
"decision": "insufficient_telemetry"
along with the additional telemetry required for diagnosis.
๐ Strict JSON Output
Designed for machine consumption.
The model generates valid JSON onlyโmaking it straightforward to integrate with:
- Incident management systems
- Alerting pipelines
- SOAR platforms
- Internal dashboards
- Automation workflows
No markdown.
No conversational text.
No unnecessary formatting.
๐ก Conservative by Design
Logpsy is intentionally cautious.
It will:
- never fabricate infrastructure components
- never assume deployments occurred
- never invent metrics or traces
- never recommend destructive actions first
- always reference evidence from the provided logs
Supported Infrastructure
The training data includes incident scenarios involving:
- Kubernetes
- Docker
- Nginx
- PostgreSQL
- Redis
- Kafka
- Elasticsearch
- Linux services
- Reverse proxies
- Containerized workloads
- Microservices
- API gateways
- Database failures
- Network connectivity issues
- Health check failures
- Resource exhaustion scenarios
Example
Input
[docker-engine] container 9d1a8f failed health check:
connection refused on port 8080
[nginx] upstream timed out
(110: Connection timed out)
while connecting to upstream
Output
{
"decision": "likely_cause",
"confidence": 0.86,
"incident_summary": "...",
"observed_facts": [...],
"symptoms": [...],
"likely_causes": [...],
"ruled_out": [...],
"missing_telemetry": [...],
"next_checks": [...],
"operator_risk": "medium",
"abstention_reason": ""
}
Local Deployment (Ollama)
1. Download
Download both files from this repository:
qwen2.5-coder-7b-instruct.Q4_K_M.gguf
Modelfile
2. Register the Model
ollama create logpsy-7b-v2 -f Modelfile
3. Run
ollama run logpsy-7b-v2
Python Example
from huggingface_hub import hf_hub_download
import httpx
# Download the GGUF model
model_path = hf_hub_download(
repo_id="Shubhamranga11/logpsy",
filename="qwen2.5-coder-7b-instruct.Q4_K_M.gguf",
local_dir="./model"
)
response = httpx.post(
"http://localhost:11434/api/chat",
json={
"model": "logpsy-7b-v2",
"messages": [
{
"role": "user",
"content": """
[docker-engine] container 9d1a8f failed health check:
connection refused on port 8080
[nginx] upstream timed out (110)
"""
}
],
"stream": False,
"format": "json"
},
timeout=60.0
)
print(response.json()["message"]["content"])
Recommended System Prompt
The model was trained using the following behavioral instructions:
You are Logpsy, a local SRE incident analysis assistant.
Analyze raw logs and telemetry excerpts.
Separate observed facts, symptoms, supported hypotheses,
and missing evidence.
Rules:
1. Never state a root cause unless the telemetry supports it.
2. Prefer abstention when evidence is insufficient.
3. Quote evidence for every hypothesis.
4. Never invent services, deployments, traces, metrics or hosts.
5. Recommend verification before remediation.
6. Return valid JSON only.
Output Schema
{
"decision": "cause_identified | likely_cause | insufficient_telemetry | multiple_hypotheses | no_incident",
"confidence": 0.95,
"incident_summary": "...",
"observed_facts": [],
"symptoms": [],
"likely_causes": [],
"ruled_out": [],
"missing_telemetry": [],
"next_checks": [],
"operator_risk": "low | medium | high",
"abstention_reason": ""
}
Training Details
| Item | Value |
|---|---|
| Base Model | Qwen2.5-Coder-7B-Instruct |
| Fine-tuning Framework | Unsloth |
| Trainer | TRL SFTTrainer |
| Dataset | 3,938 curated SRE incident examples |
| Validation Set | 193 examples |
| Epochs | 3 |
| LoRA Rank | 16 |
| LoRA Alpha | 16 |
| Quantization | 4-bit (QLoRA) |
| Hardware | NVIDIA H100 NVL |
| Cloud Platform | Microsoft Azure GPU VM |
| Final Training Loss | 0.8167 |
Intended Use
Ideal for:
- Local LLM deployments
- Internal DevOps tooling
- Incident response automation
- Production log analysis
- SRE copilots
- CI/CD diagnostics
- Infrastructure monitoring assistants
- Research on structured reasoning over telemetry
Limitations
Logpsy analyzes only the telemetry provided.
It cannot:
- infer missing logs
- inspect live infrastructure
- access monitoring systems
- replace human incident response
When evidence is incomplete, the model intentionally abstains instead of guessing.
Citation
If you use Logpsy in research or production, please cite this repository.
@misc{logpsy2026,
title={Logpsy: A Specialized LLM for Evidence-Based Site Reliability Incident Analysis},
author={Shubham Ranga},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/Shubhamranga11/logpsy}
}
License
MIT License.
- Downloads last month
- 42
4-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Shubhamranga11/logpsy", filename="qwen2.5-coder-7b-instruct.Q4_K_M.gguf", )