RhinoWithAcape commited on
Commit
cfe9f1c
·
verified ·
1 Parent(s): b3e7a7b

RUNNING.md — every step executed

Browse files
Files changed (1) hide show
  1. RUNNING.md +99 -0
RUNNING.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Running Qwen3.5-4B-Instruct (Hob Forge Edition) — zero to first tool call
2
+
3
+ Every step below was executed on real hardware before this shipped. Two paths: **A** for
4
+ any machine with ollama (easiest), **B** for llama.cpp directly (most control). Numbers
5
+ in the card's tables were measured with path B on a 12GB RTX 5070; an 8GB card runs
6
+ everything here — see the memory table in the card.
7
+
8
+ ---
9
+
10
+ ## Path A — ollama (any OS, 5 minutes)
11
+
12
+ 1. Install ollama: https://ollama.com/download (one installer, all platforms).
13
+ 2. Pull and run this edition directly from HF:
14
+ ```bash
15
+ ollama run hf.co/Hob-forge/Qwen3.5-4B-Instruct-GGUF:Q4_K_M
16
+ ```
17
+ First run downloads 2.6GB. You're chatting when the `>>>` appears.
18
+ 3. **Thinking mode**: the model reasons out loud by default. For clean answers via the API:
19
+ ```bash
20
+ curl http://localhost:11434/api/chat -d '{
21
+ "model": "hf.co/Hob-forge/Qwen3.5-4B-Instruct-GGUF:Q4_K_M",
22
+ "messages": [{"role":"user","content":"Why is the sky blue? One sentence."}],
23
+ "think": false, "stream": false
24
+ }'
25
+ ```
26
+ Note `think` sits at the **top level** of the body — not inside `options`. (Scar #1:
27
+ we lost an afternoon to that once.)
28
+ 4. Context size: ollama defaults small. For the long context this arch is great at:
29
+ `ollama run … ` then `/set parameter num_ctx 16384` — or bake it into a Modelfile.
30
+ Check what you actually got: the server log prints the KV allocation.
31
+
32
+ ## Path B — llama.cpp (measured-numbers path)
33
+
34
+ 1. Get a **2026 build** — this is a hybrid-attention architecture; builds older than
35
+ ~March 2026 will fail with unknown-architecture errors (Scar #2: a December build
36
+ converted this model into a file that crashed *newer* runtimes — toolchain vintage
37
+ matters in both directions):
38
+ ```bash
39
+ git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
40
+ cmake -B build -DGGML_CUDA=ON && cmake --build build -j # drop -DGGML_CUDA=ON for CPU
41
+ ```
42
+ 2. Download a quant (Q4_K_M recommended — see the card's which-file table):
43
+ ```bash
44
+ hf download Hob-forge/Qwen3.5-4B-Instruct-GGUF Qwen3.5-4B-Instruct-Q4_K_M.gguf --local-dir .
45
+ ```
46
+ 3. Chat, single-turn, GPU:
47
+ ```bash
48
+ ./build/bin/llama-cli -m Qwen3.5-4B-Instruct-Q4_K_M.gguf \
49
+ -st -p "Explain mmap in one paragraph." -ngl 99 -c 8192
50
+ ```
51
+ - `-st` (single-turn) matters: without it llama-cli may enter interactive conversation
52
+ mode and appear to "hang" waiting at a `>` prompt (Scar #3 — we watched a script wait
53
+ four hours for someone to type).
54
+ - 8GB card: this fits whole (`-ngl 99`). If you're sharing the GPU, `-ngl 20` splits
55
+ layers to CPU gracefully.
56
+ 4. Serve an OpenAI-compatible API:
57
+ ```bash
58
+ ./build/bin/llama-server -m Qwen3.5-4B-Instruct-Q4_K_M.gguf -ngl 99 -c 16384 --port 8080
59
+ ```
60
+
61
+ ## First tool call (the part most cards skip)
62
+
63
+ The template supports native tool calling. Against llama-server:
64
+
65
+ ```bash
66
+ curl http://localhost:8080/v1/chat/completions -d '{
67
+ "model": "qwen3.5-4b",
68
+ "messages": [{"role":"user","content":"What is 37.2% of 8412? Use the calculator."}],
69
+ "tools": [{"type":"function","function":{"name":"calculator",
70
+ "description":"Evaluate a math expression",
71
+ "parameters":{"type":"object","properties":{"expression":{"type":"string"}},
72
+ "required":["expression"]}}}]
73
+ }'
74
+ ```
75
+
76
+ Expected: a `tool_calls` entry with `{"expression":"8412*0.372"}`-style arguments. We ran
77
+ exactly this before shipping. If you get prose instead of a tool call, your runtime is too
78
+ old to render this template's tool block — see step B1.
79
+
80
+ ## Sampling that works (verified)
81
+
82
+ | Mode | temp | top_p | top_k |
83
+ |---|---|---|---|
84
+ | Thinking (default) | 0.6 | 0.95 | 20 |
85
+ | Non-thinking | 0.7 | 0.8 | 20 |
86
+
87
+ ## Troubleshooting (our scars, your shortcuts)
88
+
89
+ | Symptom | Cause & fix |
90
+ |---|---|
91
+ | `unknown architecture` / load error | llama.cpp too old — build ≥ March 2026 (B1). |
92
+ | `blk.32 … not found` on a self-converted file | You converted with a text-only load that dropped the MTP block — convert from the full snapshot, or use our files. |
93
+ | Appears to hang at a `>` | Interactive mode — add `-st`, give `-p`. |
94
+ | Painfully slow on CPU-only | The hybrid DeltaNet layers' CPU path is immature; this model *wants* a GPU. CPU works for testing, not serving. |
95
+ | `<think>` text in answers | By design. `think:false` (ollama, top-level) / `enable_thinking=False` (transformers) / parse it out. |
96
+ | IQ4_XS slower than Q4_K_M despite being smaller | Correct and measured (45 vs 138 t/s on RTX) — i-quant dequant cost. Use Q4_K_M unless the 200MB matters. |
97
+ | Garbled/endless output | Check eos: template expects `<|im_end|>` — custom Modelfiles must include it as a stop. |
98
+
99
+ *Something not covered? Open a discussion on the repo — we actually answer. — Hob Forge*