Instructions to use SanatanSinghVishen/sift-1b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SanatanSinghVishen/sift-1b-gguf with PEFT:
Task type is invalid.
- Transformers
How to use SanatanSinghVishen/sift-1b-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SanatanSinghVishen/sift-1b-gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SanatanSinghVishen/sift-1b-gguf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SanatanSinghVishen/sift-1b-gguf 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 SanatanSinghVishen/sift-1b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SanatanSinghVishen/sift-1b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf SanatanSinghVishen/sift-1b-gguf: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 SanatanSinghVishen/sift-1b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf SanatanSinghVishen/sift-1b-gguf: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 SanatanSinghVishen/sift-1b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Use Docker
docker model run hf.co/SanatanSinghVishen/sift-1b-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use SanatanSinghVishen/sift-1b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SanatanSinghVishen/sift-1b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SanatanSinghVishen/sift-1b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SanatanSinghVishen/sift-1b-gguf:Q4_K_M
- SGLang
How to use SanatanSinghVishen/sift-1b-gguf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SanatanSinghVishen/sift-1b-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SanatanSinghVishen/sift-1b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SanatanSinghVishen/sift-1b-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SanatanSinghVishen/sift-1b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use SanatanSinghVishen/sift-1b-gguf with Ollama:
ollama run hf.co/SanatanSinghVishen/sift-1b-gguf:Q4_K_M
- Unsloth Desktop
- Pi
How to use SanatanSinghVishen/sift-1b-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SanatanSinghVishen/sift-1b-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SanatanSinghVishen/sift-1b-gguf with Docker Model Runner:
docker model run hf.co/SanatanSinghVishen/sift-1b-gguf:Q4_K_M
- Lemonade
How to use SanatanSinghVishen/sift-1b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.sift-1b-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SanatanSinghVishen/sift-1b-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SanatanSinghVishen/sift-1b-gguf: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 SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SanatanSinghVishen/sift-1b-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SanatanSinghVishen/sift-1b-gguf:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "SanatanSinghVishen/sift-1b-gguf:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Sift-1B: Deterministic Function Calling & Intent Routing SLM
Sift-1B is a hyper-specialized 1.5B-parameter Small Language Model (SLM) engineered specifically to sift structured JSON parameters out of unstructured user prompts and shift routing workloads away from expensive cloud LLMs.
Trained via a two-stage Supervised Fine-Tuning (SFT) + Direct Preference Optimization (DPO) pipeline on top of Qwen/Qwen2.5-1.5B-Instruct, Sift-1B strips away all conversational fluff ("Sure! Here is your JSON:") and outputs strict, machine-readable JSON on the very first attempt.
- Developed & Designed by: Sanatan Singh
- Base Architecture:
Qwen/Qwen2.5-1.5B-Instruct - Model Type: Causal Language Model + QLoRA Adapter + GGUF Quantization (
q4_k_m) - License: MIT
- GitHub Repository: SanatanSinghVishen/Sift-1B
- GGUF Quantized:
SanatanSinghVishen/sift-1b-gguf - DPO Golden Adapter:
SanatanSinghVishen/sift-1b-dpo - SFT Adapter:
SanatanSinghVishen/sift-1b-sft
๐ Comprehensive Benchmark Results
Evaluated across 50 holdout test cases containing UNSEEN function schemas (not present in training) comparing Base Qwen vs. SFT vs. DPO (Golden Release Checkpoint-750):
| Evaluation Metric | Base Model (Qwen2.5-1.5B) | Sift-1B (SFT) | ๐ Sift-1B (DPO Golden) | Delta vs Base |
|---|---|---|---|---|
| Tool Selection Accuracy | 70.0% | 98.0% | 100.0% โ | +30.0% |
| Parameter Extraction Accuracy | 34.0% | 80.0% | 88.0% โ | +54.0% |
| JSON Parse / Validity Rate | 96.0% | 98.0% | 100.0% โ | +4.0% |
| Zero Markdown / Fluff Rate | 76.0% | 100.0% | 100.0% โ | +24.0% |
| Zero Hallucination Rate | 100.0% | 100.0% | 100.0% โ | 0% Hallucinations |
| Average Latency (TTFT) | 2,277 ms | 1,734 ms | 1,714 ms โก | 25% Faster |
โ๏ธ Technical Specifications & GGUF Metadata
GGUF Architecture Parameters
- Quantization Format:
q4_k_m(4-bit medium K-quantization) - GGUF File Size:
940.4 MB(0.94 GB) - Context Length (
n_ctx):32,768 tokens - Embedding Dimensions (
n_embd):1,536 - Feed-Forward Network Dimension (
n_ff):8,960 - Attention Heads (
n_head):12 - Key-Value Heads (
n_head_kv):2(Grouped-Query Attention / GQA) - RMS Norm Epsilon:
1e-6 - RoPE Theta Base (
rope_theta):1,000,000.0 - Vocabulary Size:
151,936 tokens(ChatML format)
Training Hyperparameters
Stage 1: Supervised Fine-Tuning (SFT)
- Dataset: 10,000 ChatML multi-turn function calling samples derived from Salesforce/xlam-60k
- Quantization: QLoRA 4-bit NF4 (
load_in_4bit=True) - LoRA Rank ($r$): 16 | LoRA Alpha ($\alpha$): 32 | Dropout: 0
- Target Modules:
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj - Batch Size: 1 per device | Gradient Accumulation: 8 (Effective batch size = 8)
- Learning Rate:
2.0e-4(Cosine schedule,warmup_ratio=0.05) - Epochs: 2 (2,500 total steps) | Optimizer:
adamw_8bit
Stage 2: Direct Preference Optimization (DPO)
- Dataset: Synthetically mutated preference pairs ($y_w$ = clean JSON, $y_l$ = markdown fluff/hallucinations)
- DPO Temperature ($\beta$):
0.1| Loss Type:sigmoid - Learning Rate:
5.0e-6(Cosine schedule,warmup_ratio=0.1) - Epochs: 1 (2,500 total steps, golden checkpoint at step 750)
๐ Quick Start Code Examples
1. Ollama (Local CLI & Server)
# Run directly from Hugging Face Hub:
ollama run hf.co/SanatanSinghVishen/sift-1b-gguf
- Downloads last month
- 134
4-bit