Instructions to use unsloth/Jan-nano-128k-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use unsloth/Jan-nano-128k-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/Jan-nano-128k-GGUF", filename="Jan-nano-128k-BF16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use unsloth/Jan-nano-128k-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
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 unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
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 unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/Jan-nano-128k-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Jan-nano-128k-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": "unsloth/Jan-nano-128k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
- Ollama
How to use unsloth/Jan-nano-128k-GGUF with Ollama:
ollama run hf.co/unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
- Unsloth Studio new
How to use unsloth/Jan-nano-128k-GGUF 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 unsloth/Jan-nano-128k-GGUF 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 unsloth/Jan-nano-128k-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/Jan-nano-128k-GGUF to start chatting
- Pi new
How to use unsloth/Jan-nano-128k-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
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": "unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use unsloth/Jan-nano-128k-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
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 unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Docker Model Runner
How to use unsloth/Jan-nano-128k-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Jan-nano-128k-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Jan-nano-128k-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Jan-nano-128k-GGUF-UD-Q4_K_XL
List all available models
lemonade list
Unsloth Dynamic 2.0 achieves superior accuracy & outperforms other leading quants.
Jan-Nano-128k: Empowering deeper research through extended context understanding.
Authors: Alan Dao, Bach Vu Dinh, Thinh Le
Overview
Jan-Nano-128k represents a significant advancement in compact language models for research applications. Building upon the success of Jan-Nano, this enhanced version features a native 128k context window that enables deeper, more comprehensive research capabilities without the performance degradation typically associated with context extension methods.
Key Improvements:
- 🔍 Research Deeper: Extended context allows for processing entire research papers, lengthy documents, and complex multi-turn conversations
- ⚡ Native 128k Window: Built from the ground up to handle long contexts efficiently, maintaining performance across the full context range
- 📈 Enhanced Performance: Unlike traditional context extension methods, Jan-Nano-128k shows improved performance with longer contexts
This model maintains full compatibility with Model Context Protocol (MCP) servers while dramatically expanding the scope of research tasks it can handle in a single session.
Evaluation
Jan-Nano-128k has been rigorously evaluated on the SimpleQA benchmark using our MCP-based methodology, demonstrating superior performance compared to its predecessor:
Why Jan-Nano-128k?
Traditional approaches to extending context length, such as YaRN (Yet another RoPE extensioN), often result in performance degradation as context length increases. Jan-Nano-128k breaks this paradigm:
This fundamental difference makes Jan-Nano-128k ideal for research applications requiring deep document analysis, multi-document synthesis, and complex reasoning over large information sets.
🖥️ How to Run Locally
Jan-Nano-128k is fully supported by Jan - beta build, providing a seamless local AI experience with complete privacy and control.
For additional tutorials and community guidance, visit our Discussion Forums.
VLLM Deployment
vllm serve Menlo/Jan-nano-128k \
--host 0.0.0.0 \
--port 1234 \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--rope-scaling '{"rope_type":"yarn","factor":3.2,"original_max_position_embeddings":40960}' --max-model-len 131072
Note: The chat template is included in the tokenizer. For troubleshooting, download the Non-think chat template.
Recommended Sampling Parameters
Temperature: 0.7
Top-p: 0.8
Top-k: 20
Min-p: 0.0
🤝 Community & Support
- Discussions: HuggingFace Community
- Issues: GitHub Repository
- Documentation: Official Docs
📄 Citation
@model{jan-nano-128k,
title={Jan-Nano-128k: Deep Research with Extended Context},
author={Dao, Alan and Dinh, Bach Vu and Le Thinh},
year={2024},
url={https://huggingface.co/Menlo/Jan-nano-128k}
}
Jan-Nano-128k: Empowering deeper research through extended context understanding.
- Downloads last month
- 527
1-bit
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for unsloth/Jan-nano-128k-GGUF
Base model
Qwen/Qwen3-4B-Base

