How to use from
OpenClaw
Start the llama.cpp server
# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf janhq/Jan-code-4b-gguf:
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 "janhq/Jan-code-4b-gguf:" \
  --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"
Quick Links

Jan-Code-4B: a small code-tuned model

GitHub License Jan App

image

Overview

Jan-Code-4B is a code-tuned model built on top of Jan-v3-4B-base-instruct. Itโ€™s designed to be a practical coding model you can run locally and iterate on quicklyโ€”useful for everyday code tasks and as a lightweight โ€œworkerโ€ model in agentic workflows.

Compared to larger coding models, Jan-Code focuses on handling well-scoped subtasks reliably while keeping latency and compute requirements small.

Intended Use

  • Lightweight coding assistant for generation, editing, refactoring, and debugging
  • A small, fast worker model for agent setups (e.g., as a sub-agent that produces patches/tests while a larger model plans)
  • Replace Haiku model in Claude Code setup

Quick Start

Integration with Jan Apps

Jan-code is optimized for direct integration with Jan Desktop, select the model in the app to start using it.

Local Deployment

Using vLLM:

vllm serve janhq/Jan-code-4b \
    --host 0.0.0.0 \
    --port 1234 \
    --enable-auto-tool-choice \
    --tool-call-parser hermes 
    

Using llama.cpp:

llama-server --model Jan-code-4b-Q8_0.gguf \
    --host 0.0.0.0 \
    --port 1234 \
    --jinja \
    --no-context-shift

Recommended Parameters

For optimal performance in agentic and general tasks, we recommend the following inference parameters:

temperature: 0.7
top_p: 0.8
top_k: 20

๐Ÿค Community & Support

๐Ÿ“„ Citation

Updated Soon
Downloads last month
13,980
GGUF
Model size
4B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for janhq/Jan-code-4b-gguf

Quantized
(12)
this model

Space using janhq/Jan-code-4b-gguf 1

Collection including janhq/Jan-code-4b-gguf