Instructions to use SanatanSinghVishen/sift-1b-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SanatanSinghVishen/sift-1b-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("base_model") model = PeftModel.from_pretrained(base_model, "SanatanSinghVishen/sift-1b-sft") - Transformers
How to use SanatanSinghVishen/sift-1b-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SanatanSinghVishen/sift-1b-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SanatanSinghVishen/sift-1b-sft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SanatanSinghVishen/sift-1b-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SanatanSinghVishen/sift-1b-sft" # 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-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SanatanSinghVishen/sift-1b-sft
- SGLang
How to use SanatanSinghVishen/sift-1b-sft 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-sft" \ --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-sft", "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-sft" \ --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-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use SanatanSinghVishen/sift-1b-sft 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 SanatanSinghVishen/sift-1b-sft 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 SanatanSinghVishen/sift-1b-sft to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SanatanSinghVishen/sift-1b-sft to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="SanatanSinghVishen/sift-1b-sft", max_seq_length=2048, ) - Docker Model Runner
How to use SanatanSinghVishen/sift-1b-sft with Docker Model Runner:
docker model run hf.co/SanatanSinghVishen/sift-1b-sft
Sift-1B-SFT (Supervised Fine-Tuned Adapter)
Sift-1B-SFT is a 1.5B-parameter Small Language Model adapter fine-tuned via 4-bit QLoRA on top of Qwen/Qwen2.5-1.5B-Instruct. It serves as Stage 1 in the Sift-1B model suite, explicitly trained to transform raw natural language queries into deterministic, type-safe JSON function calls and multi-agent routing decisions.
- Developer: Sanatan Singh
- Model Type: PEFT / QLoRA Adapter (Supervised Fine-Tuning)
- Base Model:
Qwen/Qwen2.5-1.5B-Instruct - Language(s): English (
en) - License: MIT
- Repository: GitHub — SanatanSinghVishen/Sift-1B
- DPO Aligned Model:
SanatanSinghVishen/sift-1b-dpo - GGUF Quantized:
SanatanSinghVishen/sift-1b-gguf
Model Details
Overview
General-purpose Large Language Models (LLMs) often suffer from latency, token cost, and conversational "fluff" when used merely to route user intents or extract structured parameters. Sift-1B-SFT addresses this by providing a lightweight, low-latency model optimized specifically for:
- Deterministic Function Calling: Extracting structured JSON arguments adhering to strict schemas.
- Multi-Agent Intent Routing: Identifying user intent and generating standard route tags in sub-50ms inference windows.
- Local Edge Deployment: Operating efficiently within 4 GB VRAM budgets (RTX 3050, Apple Silicon, or CPU edge hardware).
Intended Uses
Direct Use
- Structured Data Extraction: Converting unstructured user prompts into ChatML tool calls.
- Local API Middleware: Acting as an intent classification and parameter extraction backend for local-first applications.
Out-of-Scope Use
- General conversational chat, creative writing, or open-ended Q&A.
- Complex multi-step mathematical reasoning without tool assistance.
How to Get Started with the Model
You can load and run Sift-1B-SFT using Hugging Face transformers and peft:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_name = "Qwen/Qwen2.5-1.5B-Instruct"
adapter_name = "SanatanSinghVishen/sift-1b-sft"
# 1. Load Tokenizer & Base Model
tokenizer = AutoTokenizer.from_pretrained(base_model_name, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# 2. Load SFT LoRA Adapter
model = PeftModel.from_pretrained(base_model, adapter_name)
model.eval()
# 3. Format Input Query with ChatML
messages = [
{
"role": "system",
"content": "You are a function calling agent. Output only valid JSON tool calls."
},
{
"role": "user",
"content": "Schedule a team sync with Alex tomorrow at 10:00 AM."
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
# 4. Generate Structured JSON Response
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=128, temperature=0.1)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
- Downloads last month
- -