Downloads · 30 days
10
19% of all-time downloads
ShivanshiNigam/loglens-vllm-ready
loglens-vllm-ready is a machine learning model from ShivanshiNigam. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A custom-architected causal LM with Sliding Window Attention, trained on real production log data. Memory usage: 61 MB fixed regardless of log file size. 10× cheaper than GPT-4 for log analysis.
Downloads · 30 days
10
19% of all-time downloads
All-time downloads
52
Public
Parameters
19.5M
78.1 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors78.1 MB · 96%
From the Hugging Face model README
A custom-architected causal LM with Sliding Window Attention, trained on real production log data.
Memory usage: 61 MB fixed regardless of log file size.
10× cheaper than GPT-4 for log analysis.
⚠️ PROOF OF CONCEPT (PoC) DISCLAIMER
This model proves the architecture and memory math of Sliding Window Attention. This custom 16M parameter model was trained on a small synthetic dataset of log files to prove the plumbing (RAG pipeline, vLLM deployment). It is NOT a general-purpose AI like ChatGPT. To get true natural language generation in production, this architectural concept must be injected into a large pre-trained model (like Llama-3 8B) rather than using our tiny custom-built weights.
| File | What it does |
|---|---|
model.safetensors | Trained weights (16M params) |
config.json | Model architecture config |
tokenizer.json + vocab | GPT-2 tokenizer |
log_attention.py | Custom sliding window attention module |
mini_deepseek_model.py | Full causal LM architecture (RMSNorm, SwiGLU, RoPE) |
train_mini_deepseek.py | Training pipeline — run this to retrain on your own logs |
save_and_upload.py | Verify saved model + upload to HuggingFace |
ingest_logs.py | Embed log files into ChromaDB vector store |
rag_query.py | Query logs via ChromaDB + this model (RAG pipeline) |
requirements.txt | All Python dependencies |
👉 https://huggingface.co/spaces/ShivanshiNigam/loglens-demo
# Clone the GitHub repo
git clone https://github.com/shivanshinigam/DeepseekLogLens
cd DeepseekLogLens
# Install dependencies
pip install -r requirements.txt
# Generate sample logs
python3 generate_logs.py
python3 generate_3_log_files.py
# Step 1 — Embed your log files into the vector DB
python3 ingest_logs.py
# Step 2 — Ask a question (local keyword analysis, no GPU needed)
python3 rag_query.py --query "Why did the payments fail?"
# Step 3 — With a live vLLM endpoint (RunPod)
python3 rag_query.py --query "Why did the payments fail?" \
--endpoint https://YOUR_POD_ID-8000.proxy.runpod.net/v1 \
--model ShivanshiNigam/loglens-mini-deepseek
# Put your .log files in logs/
python3 train_mini_deepseek.py --epochs 5 --device cuda
# Save and upload
python3 save_and_upload.py --repo-id YOUR_USERNAME/loglens-mini-deepseek
Input log tokens
↓
Embedding (vocab=50257, dim=256)
↓
4× DeepSeekDecoderLayer:
├── RMSNorm
├── LogWindowAttention (window=128, RoPE)
├── RMSNorm
└── SwiGLU FFN (dim=256 → 1024 → 256)
↓
RMSNorm
↓
LM Head (tied to embedding weights)
↓
Logits (vocab=50257)
Memory: 61 MB · Parameters: 16M · Training loss: 10.8 → 2.9 (2 epochs, CPU)
Your Log Files (any size)
↓
ingest_logs.py → ChromaDB vector store
↓ (semantic search)
User Query → rag_query.py → vLLM endpoint → Answer
See the full guide: docs/runpod_deployment.md
One-line vLLM command:
--model ShivanshiNigam/loglens-mini-deepseek --port 8000 --trust-remote-code
Cheapest GPU: RTX 4000 Ada @ $0.28/hr (20 GB VRAM — 20× more than needed)