Instructions to use sinhaankur/helmsman-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sinhaankur/helmsman-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sinhaankur/helmsman-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sinhaankur/helmsman-4b") model = AutoModelForCausalLM.from_pretrained("sinhaankur/helmsman-4b", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sinhaankur/helmsman-4b 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 sinhaankur/helmsman-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf sinhaankur/helmsman-4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sinhaankur/helmsman-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf sinhaankur/helmsman-4b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf sinhaankur/helmsman-4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf sinhaankur/helmsman-4b:Q4_K_M
Use Docker
docker model run hf.co/sinhaankur/helmsman-4b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use sinhaankur/helmsman-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sinhaankur/helmsman-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sinhaankur/helmsman-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sinhaankur/helmsman-4b:Q4_K_M
- SGLang
How to use sinhaankur/helmsman-4b 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 "sinhaankur/helmsman-4b" \ --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": "sinhaankur/helmsman-4b", "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 "sinhaankur/helmsman-4b" \ --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": "sinhaankur/helmsman-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use sinhaankur/helmsman-4b with Ollama:
ollama run hf.co/sinhaankur/helmsman-4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use sinhaankur/helmsman-4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sinhaankur/helmsman-4b: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": "sinhaankur/helmsman-4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sinhaankur/helmsman-4b with Docker Model Runner:
docker model run hf.co/sinhaankur/helmsman-4b:Q4_K_M
- Lemonade
How to use sinhaankur/helmsman-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sinhaankur/helmsman-4b:Q4_K_M
Run and chat with the model
lemonade run user.helmsman-4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use sinhaankur/helmsman-4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sinhaankur/helmsman-4b: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 sinhaankur/helmsman-4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sinhaankur/helmsman-4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sinhaankur/helmsman-4b: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 "sinhaankur/helmsman-4b: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"
helmsman-4b
A merged, fine-tuned 4B model built on Qwen/Qwen3-4B-Instruct-2507, distilled
to answer questions grounded in a small document set (a specialist for the
Unhosted local-inference daemon). Trained with
QLoRA, then merged into the base weights and shipped as a standalone model
(full safetensors + a Q4_K_M GGUF) โ no adapter needed at load time.
Honesty note (2026-09-26): an earlier version of this card described the repo as a LoRA adapter. It is not โ the LoRA was merged and this repo ships the full merged model (
model.safetensors, ~8 GB) and a quantized GGUF.library_nameand the load examples below reflect that.
TL;DR
- Base:
Qwen/Qwen3-4B-Instruct-2507(4B params, 262K context) - Method: QLoRA (r=16, ฮฑ=32) SFT โ merged into the base (this repo is the merge)
- Formats:
model.safetensors(fp16, transformers) ยทhelmsman-4b-Q4_K_M.gguf(llama.cpp / Ollama) - Training data: 305 synthetic (prompt, response) pairs, teacher = Claude (Opus-class)
- Hardware / time: Apple Silicon, bf16, ~30 min/run
- License: AGPL-3.0-or-later (inherits the base model's terms + the daemon's)
What it's good at
Answering questions grounded in the document set it was distilled on โ a focused, on-device specialist that runs fast in 4-bit on a laptop.
What it's NOT for
- Open-ended chat unrelated to the training documents โ here it is no better than the base model.
- Tool use / function calling โ it was not trained for it.
- Anything safety-critical. This is a distillation: the teacher's failure modes and any defects in its outputs carry through.
Use it
Transformers (fp16 safetensors):
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
mid = "sinhaankur/helmsman-4b"
tok = AutoTokenizer.from_pretrained(mid)
model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype=torch.float16, device_map="auto")
msgs = [{"role": "user", "content": "Summarise the key points of the document."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=512, temperature=0.7, top_p=0.8, top_k=20)
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))
Ollama (Q4_K_M GGUF, ~2.5 GB โ runs on a laptop):
# Modelfile
printf 'FROM ./helmsman-4b-Q4_K_M.gguf\nPARAMETER temperature 0.7\nPARAMETER top_p 0.8\nPARAMETER top_k 20\n' > Modelfile
ollama create helmsman-4b -f Modelfile
ollama run helmsman-4b "Summarise the key points of the document."
llama.cpp:
llama-cli -hf sinhaankur/helmsman-4b:Q4_K_M -p "Summarise the key points of the document."
Training recipe (how it was made)
- Synthetic data โ
gen_data.pygenerated 305 (prompt, response) pairs against a Claude (Opus-class) teacher, one chat-completion per source document. - SFT โ 3 epochs, lr 2e-4, effective batch 16, cosine schedule, 5% warmup.
- QLoRA โ base in 4-bit NF4, compute dtype bf16, double quantization; LoRA on all attention + MLP projections; then merged into the base and exported to GGUF.
- Seed
42for reproducibility.
The
gen_data.py/train.pyrecipe lives in the Unhosted distillation project (unhosted-ai); the rawtrain.jsonlis not shipped in this repo (an earlier card claimed it was โ corrected here).
Evaluation
| Metric | This model |
|---|---|
| LLM-as-judge (0โ46) | 32.5 / 46 |
| Normalized | 71% |
Eval set: 46 held-out prompts generated with a different seed than training, so the trainer never saw them. This measures in-distribution grounded QA only โ see "What it's NOT for" for the honest limits.
- Downloads last month
- 11
Model tree for sinhaankur/helmsman-4b
Base model
Qwen/Qwen3-4B-Instruct-2507