Instructions to use nitrai-research/Polaris-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nitrai-research/Polaris-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nitrai-research/Polaris-V1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nitrai-research/Polaris-V1") model = AutoModelForCausalLM.from_pretrained("nitrai-research/Polaris-V1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use nitrai-research/Polaris-V1 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 nitrai-research/Polaris-V1:Q4_K_M # Run inference directly in the terminal: llama cli -hf nitrai-research/Polaris-V1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf nitrai-research/Polaris-V1:Q4_K_M # Run inference directly in the terminal: llama cli -hf nitrai-research/Polaris-V1: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 nitrai-research/Polaris-V1:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf nitrai-research/Polaris-V1: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 nitrai-research/Polaris-V1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf nitrai-research/Polaris-V1:Q4_K_M
Use Docker
docker model run hf.co/nitrai-research/Polaris-V1:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use nitrai-research/Polaris-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nitrai-research/Polaris-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nitrai-research/Polaris-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nitrai-research/Polaris-V1:Q4_K_M
- SGLang
How to use nitrai-research/Polaris-V1 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 "nitrai-research/Polaris-V1" \ --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": "nitrai-research/Polaris-V1", "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 "nitrai-research/Polaris-V1" \ --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": "nitrai-research/Polaris-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nitrai-research/Polaris-V1 with Ollama:
ollama run hf.co/nitrai-research/Polaris-V1:Q4_K_M
- Unsloth Studio
How to use nitrai-research/Polaris-V1 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 nitrai-research/Polaris-V1 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 nitrai-research/Polaris-V1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nitrai-research/Polaris-V1 to start chatting
- Pi
How to use nitrai-research/Polaris-V1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nitrai-research/Polaris-V1: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": "nitrai-research/Polaris-V1:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use nitrai-research/Polaris-V1 with Docker Model Runner:
docker model run hf.co/nitrai-research/Polaris-V1:Q4_K_M
- Lemonade
How to use nitrai-research/Polaris-V1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nitrai-research/Polaris-V1:Q4_K_M
Run and chat with the model
lemonade run user.Polaris-V1-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use nitrai-research/Polaris-V1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nitrai-research/Polaris-V1: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 nitrai-research/Polaris-V1:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nitrai-research/Polaris-V1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nitrai-research/Polaris-V1: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 "nitrai-research/Polaris-V1: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"
Overview
Polaris-V1 is an efficient 4-billion parameter open-weights reasoning model developed by NitrAI Research. It is aligned through reinforcement learning with multi-file code synthesis and theorem-verification rewards, engineered specifically to execute on consumer-grade hardware (3.2 GB VRAM) with a 1.59M token YaRN context window.
📊 Comprehensive Model Benchmark Comparison
The following table compares Polaris-V1 (4B RL) against open-weights edge & distilled architectures (inclusionAI/Ling-3.0-tiny, empero-ai/Qwen3.8-9B), as well as closed frontier ceiling models (Claude Opus 5, Kimi K3).
| Model | Model Tier / Type | Active Params | SWE-bench Verified (Pass@1) | WildClawBench (Agentic Traj.) | DeepSWE (Pass@1) | SWE-bench Pro (Pass@1) | Context Window | Min VRAM / Hardware |
|---|---|---|---|---|---|---|---|---|
| Claude Opus 5 | Frontier Cloud (Ideal) | Unknown | 96.8% | 94.5% | 89.2% | 87.4% | 2,000,000+ | Datacenter Pod |
| Kimi K3 | Frontier Reasoning (Ideal) | 2.8T MoE | 93.4% | 88.2% | 81.6% | 79.5% | 2,000,000 | 8× H100 Cluster |
| empero-ai/Qwen3.8-9B | Open Distilled (9B) | 9.0B | 37.8% | 42.1% | 32.0% | 34.5% | 1,000,000 | ~6.5 GB (Q4) |
| Polaris-V1 (Ours) | Local Open Weights (4B RL) | 4.0B | 31.4% | 38.5% | 26.8% | 28.0% | 1,592,638 | 3.2 GB (Q4) |
| inclusionAI/Ling-3.0-tiny | Edge MoE (7.9B) | 1.3B | 24.2% | 29.0% | 21.5% | 19.4% | 256,000 | ~4.8 GB (FP8) |
Key Takeaway: Polaris-V1 achieves 31.4% on SWE-bench Verified and 28.0% on SWE-bench Pro at only 4B parameters. While frontier cloud systems (Claude Opus 5 / Kimi K3) set the absolute performance ceiling for datacenter clusters, Polaris-V1 provides an industry-leading capability-per-watt ratio, running locally on 3.2 GB VRAM consumer GPUs and Apple Silicon with full 1.59M YaRN context retrieval.
⚡ Hardware & Execution Specifications
- Architecture: 4B dense causal LM + Multi-Turn RL Alignment.
- VRAM Requirements:
3.2 GB(Q4_K_M) /4.5 GB(Q8_0) /8.4 GB(FP16). - Supported Context Window:
1,592,638 Tokens (1.59M)with YaRN RoPE scaling. - Speculative Decoding:
540–720 tok/son consumer GPUs when paired withQwen3.5-0.8B-Draft.
🚀 Quickstart
1. Ollama (One-Line Launch)
ollama run nitrai-research/polaris-v1
2. Hugging Face Transformers (Python)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "nitrai-research/Polaris-V1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "Analyze race conditions in Redis cluster partition recovery logic:"
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer(tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True), return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.2)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
3. llama.cpp / GGUF
./llama-cli -hf nitrai-research/Polaris-V1:polaris-v1-merged-fp16.Q4_K_M.gguf -p "<|im_start|>user\nWrite a unified diff for issue #12907 in astropy.<|im_end|>\n<|im_start|>assistant\n" -c 32768
📜 License
Polaris-V1 is released under the Apache 2.0 License.
Developed with ❤️ by NitrAI Lab.
- Downloads last month
- -
Model tree for nitrai-research/Polaris-V1
Collection including nitrai-research/Polaris-V1
Evaluation results
- Pass@1 on SWE-bench Verifiedself-reported31.400
- Task Completion Rate on WildClawBenchself-reported38.500
- Pass@1 on DeepSWEself-reported26.800