Instructions to use cloudnathan5/Dory1.0-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cloudnathan5/Dory1.0-4B-GGUF 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 cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf cloudnathan5/Dory1.0-4B-GGUF: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 cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use cloudnathan5/Dory1.0-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cloudnathan5/Dory1.0-4B-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": "cloudnathan5/Dory1.0-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
- Ollama
How to use cloudnathan5/Dory1.0-4B-GGUF with Ollama:
ollama run hf.co/cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use cloudnathan5/Dory1.0-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cloudnathan5/Dory1.0-4B-GGUF: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use cloudnathan5/Dory1.0-4B-GGUF with Docker Model Runner:
docker model run hf.co/cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
- Lemonade
How to use cloudnathan5/Dory1.0-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Dory1.0-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use cloudnathan5/Dory1.0-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cloudnathan5/Dory1.0-4B-GGUF: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:9931/v1 hermes config set model.default cloudnathan5/Dory1.0-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use cloudnathan5/Dory1.0-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cloudnathan5/Dory1.0-4B-GGUF: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:9931/v1 \ --custom-model-id "cloudnathan5/Dory1.0-4B-GGUF: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"
Download tools/dequant_modelopt_nvfp4.py from cloudnathan5/Dory1.0-4B-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 4.27 kB
-
https://huggingface.co/cloudnathan5/Dory1.0-4B-GGUF/resolve/main/tools/dequant_modelopt_nvfp4.py
- Command line
-
hf download hf://cloudnathan5/Dory1.0-4B-GGUF/tools/dequant_modelopt_nvfp4.py
-
curl -L -o dequant_modelopt_nvfp4.py https://huggingface.co/cloudnathan5/Dory1.0-4B-GGUF/resolve/main/tools/dequant_modelopt_nvfp4.py
4.27 kB
| """Dequantize NVIDIA's ModelOpt NVFP4 Dory checkpoint into a plain HF checkpoint the GGUF converter can read. | |
| ModelOpt NVFP4 (W4A16) stores each quantized Linear as | |
| weight uint8 [out, in/2] two E2M1 codes per byte | |
| weight_scale e4m3fn [out, in/16] per-16 block scale | |
| weight_scale_2 f32 [] per-tensor scale | |
| so W = e2m1(code) * weight_scale * weight_scale_2. Every product e2m1 * e4m3 is exact in F16; the per-tensor | |
| multiply rounds at 2^-11 relative, far below 4-bit error. Linear weights are written as F16, everything else is | |
| copied unchanged. Dequantized linears are checked against the BF16 release (relative error should be ~4-bit level). | |
| usage: python tools/dequant_modelopt_nvfp4.py models/ref/NVFP4 models/hf/Dory1.0-4B-BF16 models/hf/Dory1.0-4B-NVFP4-dequant | |
| """ | |
| import json | |
| import os | |
| import sys | |
| from pathlib import Path | |
| import torch | |
| from safetensors import safe_open | |
| from safetensors.torch import save_file | |
| src, bf16_dir, dst = map(Path, sys.argv[1:4]) | |
| dst.mkdir(parents=True, exist_ok=True) | |
| E2M1 = torch.tensor([0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, -0.0, -0.5, -1.0, -1.5, -2.0, -3.0, -4.0, -6.0]) | |
| def unpack(packed, low_first): | |
| lo, hi = (packed & 0x0F).long(), (packed >> 4).long() | |
| pair = (lo, hi) if low_first else (hi, lo) | |
| return torch.stack(pair, dim=-1).reshape(packed.shape[0], -1) | |
| def dequant(packed, scale, scale2, low_first=True): | |
| codes = unpack(packed, low_first) | |
| w = E2M1[codes].reshape(codes.shape[0], -1, 16) * scale.float().unsqueeze(-1) | |
| return (w.reshape(codes.shape[0], -1) * scale2.float()).to(torch.float16) | |
| def rel_err(a, b): | |
| a, b = a.float(), b.float() | |
| return ((a - b).pow(2).mean() / b.pow(2).mean()).item() | |
| files = sorted(src.glob("*.safetensors")) | |
| ref = safe_open(next(bf16_dir.glob("*.safetensors")), "pt") | |
| ref_names = set(ref.keys()) | |
| out, stats, low_first = {}, [], None | |
| for f in files: | |
| with safe_open(f, "pt") as h: | |
| names = list(h.keys()) | |
| for n in names: | |
| if n.endswith((".weight_scale", ".weight_scale_2", ".input_scale")): | |
| continue | |
| t = h.get_tensor(n) | |
| if t.dtype == torch.uint8 and n.endswith(".weight"): | |
| base = n[: -len(".weight")] | |
| s, s2 = h.get_tensor(base + ".weight_scale"), h.get_tensor(base + ".weight_scale_2") | |
| r = ref.get_tensor(n) | |
| if low_first is None: # settle nibble order once, against the BF16 release | |
| errs = {lf: rel_err(dequant(t, s, s2, lf), r) for lf in (True, False)} | |
| low_first = min(errs, key=errs.get) | |
| print(f"nibble order: {'low' if low_first else 'high'} first (rel-MSE {errs})") | |
| w = dequant(t, s, s2, low_first) | |
| assert w.shape == r.shape, (n, w.shape, r.shape) | |
| stats.append((n, rel_err(w, r))) | |
| out[n] = w | |
| else: | |
| out[n] = t | |
| if n in ref_names: | |
| stats.append((n + " [copied]", rel_err(t, ref.get_tensor(n)))) | |
| missing = ref_names - set(out) | |
| extra = set(out) - ref_names | |
| assert not missing and not extra, (sorted(missing)[:5], sorted(extra)[:5]) | |
| q = [e for n, e in stats if "[copied]" not in n] | |
| c = [(n, e) for n, e in stats if "[copied]" in n] | |
| print(f"{len(q)} dequantized linears, rel-MSE vs BF16: min {min(q):.4f} mean {sum(q)/len(q):.4f} max {max(q):.4f}") | |
| print(f"{len(c)} copied tensors, max rel-MSE vs BF16: {max(e for _, e in c):.2e} ({max(c, key=lambda x: x[1])[0]})") | |
| save_file(out, dst / "model.safetensors", metadata={"format": "pt"}) | |
| # Config/tokenizer come from the BF16 release (the NVFP4 config only adds quantization_config). | |
| for p in bf16_dir.iterdir(): | |
| if p.name != "model.safetensors" and not p.name.startswith(".") and p.is_file(): | |
| (dst / p.name).unlink(missing_ok=True) | |
| os.symlink(p.resolve(), dst / p.name) | |
| cfg_q = json.loads((src / "config.json").read_text()) | |
| cfg_b = json.loads((bf16_dir / "config.json").read_text()) | |
| cfg_q.pop("quantization_config", None) | |
| diff = {k for k in cfg_q.keys() | cfg_b.keys() if cfg_q.get(k) != cfg_b.get(k)} | |
| print("config keys differing from BF16 release (besides quantization_config):", sorted(diff) or "none") | |
| print("wrote", dst) | |