FoolDev commited on
Commit
6973bea
Β·
1 Parent(s): 84d3da6

Lowercase Q3_K_S filename so HF picks Q4_K_M as the default Ollama tag

Browse files

HF's Ollama bridge picks the alphabetically-first GGUF in the repo as
the default :latest tag (verified empirically β€” see CHANGELOG entry).
The previous filenames sorted byte-order as

Janus-27B.Q3_K_S.gguf < Janus-27B.Q4_K_M.gguf

(uppercase Q in both, then '3' < '4'), so the bare
'ollama run hf.co/FoolDev/janus-27b' pulled the 12 GB Q3_K_S blob β€”
not the 17 GB Q4_K_M as the README claimed it should.

Renaming the Q3 file to use a lowercase quant suffix
(Janus-27B.q3_k_s.gguf) flips the byte-order: uppercase 'Q' (0x51) <
lowercase 'q' (0x71), so 'Janus-27B.Q4_K_M.gguf' now sorts first and
wins HF's default-pick. The Ollama tag itself remains case-insensitive
per https://huggingface.co/docs/hub/en/ollama so '%Q3_K_S' still
resolves correctly to the renamed file.

Updated:
- Modelfile: comment now mentions the lowercase quant suffix is
intentional and explains why
- README: removed the 'pin the explicit :Q4_K_M tag' warnings; the
bare form now resolves correctly
- examples/README.md, examples/ollama_chat.py: same warning removal
- CHANGELOG: full forensic entry under [Unreleased] / Fixed

Verified bridge sync still passes (check_bridge_sync.py). Will verify
HF API + ollama pull behavior post-push.

CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ and documentation**, not the underlying base model.
7
 
8
  ## [Unreleased]
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ### Added
11
  - `scripts/smoke_test.sh` opt-in tool-call round-trip (gated by
12
  `TOOLS_TEST=1`). The previous smoke test only verified the `tools`
 
7
 
8
  ## [Unreleased]
9
 
10
+ ### Fixed
11
+ - `Janus-27B.Q3_K_S.gguf` renamed to `Janus-27B.q3_k_s.gguf`
12
+ (lowercase quant suffix). HF's Ollama bridge picks the
13
+ alphabetically-first GGUF in the repo as the default `:latest` tag,
14
+ and the previous filenames sorted as
15
+ `Janus-27B.Q3_K_S.gguf` < `Janus-27B.Q4_K_M.gguf`
16
+ in byte-order (uppercase 'Q' is 0x51, decimal 51 < 52 between
17
+ `3` and `4`), so the bare `ollama run hf.co/FoolDev/janus-27b`
18
+ pulled the 12 GB Q3_K_S blob, not the 17 GB Q4_K_M as the README
19
+ claimed it should. Lowercasing the Q3 file's quant suffix flips
20
+ the byte-order: uppercase 'Q' (0x51) < lowercase 'q' (0x71), so
21
+ `Janus-27B.Q4_K_M.gguf` now sorts first and wins the default
22
+ selection. The Ollama tag itself remains case-insensitive (per
23
+ https://huggingface.co/docs/hub/en/ollama), so users typing the
24
+ conventional `:Q3_K_S` still hit the lowercased file.
25
+
26
+ This is a workaround for an undocumented HF quirk; if HF's GGUF
27
+ picker switches to a different heuristic in future, this hack may
28
+ stop being load-bearing. The previous "Changed" entry that
29
+ recommended the explicit `:Q4_K_M` tag is now obsolete: bare
30
+ `ollama run hf.co/FoolDev/janus-27b` resolves to Q4_K_M
31
+ unambiguously after this rename.
32
+
33
  ### Added
34
  - `scripts/smoke_test.sh` opt-in tool-call round-trip (gated by
35
  `TOOLS_TEST=1`). The previous smoke test only verified the `tools`
Janus-27B.Q3_K_S.gguf β†’ Janus-27B.q3_k_s.gguf RENAMED
File without changes
Modelfile CHANGED
@@ -6,13 +6,15 @@
6
  # input, or wait for the fix. See the Vision section in README.md.
7
  #
8
  # This repo bundles two GGUFs: Janus-27B.Q4_K_M.gguf (~17 GB, default)
9
- # and Janus-27B.Q3_K_S.gguf (~12 GB, smaller-footprint option). The FROM
 
 
10
  # line below points at the bundled Q4_K_M, so a fresh clone (with LFS
11
  # smudge enabled) supports the no-script path:
12
  #
13
  # ollama create janus-27b -f Modelfile && ollama run janus-27b
14
  #
15
- # To use the smaller quant, edit FROM to ./Janus-27B.Q3_K_S.gguf, or run
16
  # `make build QUANT=Q3_K_S` which patches FROM in a temp Modelfile copy.
17
  #
18
  # Other GGUF sources (use with `make build GGUF_PATH=...`):
 
6
  # input, or wait for the fix. See the Vision section in README.md.
7
  #
8
  # This repo bundles two GGUFs: Janus-27B.Q4_K_M.gguf (~17 GB, default)
9
+ # and Janus-27B.q3_k_s.gguf (~12 GB, smaller-footprint option; lowercase
10
+ # quant suffix is intentional β€” keeps it alphabetically after Q4_K_M so
11
+ # HF's Ollama bridge picks Q4_K_M for the bare `:latest` tag). The FROM
12
  # line below points at the bundled Q4_K_M, so a fresh clone (with LFS
13
  # smudge enabled) supports the no-script path:
14
  #
15
  # ollama create janus-27b -f Modelfile && ollama run janus-27b
16
  #
17
+ # To use the smaller quant, edit FROM to ./Janus-27B.q3_k_s.gguf, or run
18
  # `make build QUANT=Q3_K_S` which patches FROM in a temp Modelfile copy.
19
  #
20
  # Other GGUF sources (use with `make build GGUF_PATH=...`):
README.md CHANGED
@@ -68,16 +68,11 @@ template β€” HF's Ollama bridge ingests those three files, not
68
  `Modelfile`):
69
 
70
  ```bash
71
- ollama run hf.co/FoolDev/janus-27b:Q4_K_M # ~17 GB, recommended
 
72
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # ~12 GB, smaller-footprint
73
  ```
74
 
75
- > **Use the explicit `:Q4_K_M` tag.** HF's Ollama bridge currently picks
76
- > `Janus-27B.Q3_K_S.gguf` (the alphabetically-first GGUF in the repo) as
77
- > the default for the bare `ollama run hf.co/FoolDev/janus-27b` form,
78
- > *not* Q4_K_M. If you don't pin a quant tag explicitly you'll get the
79
- > 12 GB Q3_K_S blob.
80
-
81
  Or build locally (uses this repo's `Modelfile`, kept in sync with the
82
  three bridge files) for any quant:
83
 
@@ -133,19 +128,20 @@ The 27B is **dense**: every parameter participates in every forward pass. It's s
133
  | `README.md` | This file |
134
 
135
  This repo ships two GGUFs to back the HF/Ollama "Use this model"
136
- widget β€” `Janus-27B.Q4_K_M.gguf` (~17 GB, recommended) and
137
- `Janus-27B.Q3_K_S.gguf` (~12 GB, smaller-footprint option for 16 GB
138
  GPUs / unified-memory laptops):
139
 
140
  ```bash
141
- ollama run hf.co/FoolDev/janus-27b:Q4_K_M # 17 GB, recommended
142
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
143
  ```
144
 
145
- The bare `ollama run hf.co/FoolDev/janus-27b` form (no quant tag)
146
- currently resolves to the alphabetically-first GGUF in the repo β€”
147
- `Janus-27B.Q3_K_S.gguf` β€” *not* Q4_K_M. Pin the tag explicitly to get
148
- the recommended Q4_K_M quant.
 
149
 
150
  For other quants or local builds, pull from
151
  [`unsloth/Qwen3.6-27B-GGUF`](https://huggingface.co/unsloth/Qwen3.6-27B-GGUF)
@@ -178,11 +174,9 @@ Two paths:
178
 
179
  ```bash
180
  # A. Pull straight from HF (uses the bundled GGUF + root-level
181
- # template / system / params files; pin a quant tag explicitly):
182
- ollama run hf.co/FoolDev/janus-27b:Q4_K_M # 17 GB, recommended
183
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
184
- # (Bare `ollama run hf.co/FoolDev/janus-27b` resolves to Q3_K_S, not
185
- # Q4_K_M β€” HF picks the alphabetically-first GGUF when no tag pinned.)
186
 
187
  # B. Build locally (lets you pick the quant):
188
  make build # Q4_K_M -> janus-27b
@@ -214,8 +208,8 @@ local app β€” point it at this repo and pick a quant.
214
 
215
  | App | How to load this model |
216
  |---|---|
217
- | **Ollama** | `ollama run hf.co/FoolDev/janus-27b:Q4_K_M` (or `:Q3_K_S`). Pulls the GGUF + the root-level `template` / `system` / `params` files in one step (HF's Ollama bridge ingests these three files; it does **not** read `Modelfile`). For local builds, `make build` uses `Modelfile`, which is kept in sync. **Pin the quant tag** β€” bare `hf.co/FoolDev/janus-27b` resolves to Q3_K_S, not Q4_K_M. |
218
- | **LM Studio** | Search β†’ `FoolDev/janus-27b` β†’ pick `Janus-27B.Q4_K_M.gguf` or `Janus-27B.Q3_K_S.gguf`. Uses the GGUF's embedded jinja chat template (Qwen 3.6 ChatML); set the system prompt manually from the `SYSTEM` block in this repo's `Modelfile`. |
219
  | **Jan** | Hub β†’ "Import from Hugging Face" β†’ `FoolDev/janus-27b`. Same template behavior as LM Studio. |
220
  | **llama.cpp** | `hf download FoolDev/janus-27b Janus-27B.Q4_K_M.gguf --local-dir .` then `llama-server -m Janus-27B.Q4_K_M.gguf` (or `llama-cli`, `llama-mtmd-cli` for vision via the upstream `mmproj-F16.gguf`). |
221
  | **llama-cpp-python** | See `examples/llama_cpp_quickstart.py` (text) and `examples/llama_cpp_vision.py` (image input). |
 
68
  `Modelfile`):
69
 
70
  ```bash
71
+ ollama run hf.co/FoolDev/janus-27b # default, ~17 GB Q4_K_M
72
+ ollama run hf.co/FoolDev/janus-27b:Q4_K_M # explicit, same blob
73
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # ~12 GB, smaller-footprint
74
  ```
75
 
 
 
 
 
 
 
76
  Or build locally (uses this repo's `Modelfile`, kept in sync with the
77
  three bridge files) for any quant:
78
 
 
128
  | `README.md` | This file |
129
 
130
  This repo ships two GGUFs to back the HF/Ollama "Use this model"
131
+ widget β€” `Janus-27B.Q4_K_M.gguf` (~17 GB, default) and
132
+ `Janus-27B.q3_k_s.gguf` (~12 GB, smaller-footprint option for 16 GB
133
  GPUs / unified-memory laptops):
134
 
135
  ```bash
136
+ ollama run hf.co/FoolDev/janus-27b # default, ~17 GB Q4_K_M
137
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
138
  ```
139
 
140
+ The Q3 file is named `q3_k_s` (lowercase) so it sorts alphabetically
141
+ after `Janus-27B.Q4_K_M.gguf`, which is what HF's Ollama bridge picks
142
+ as the default `:latest` tag. The Ollama tag itself is case-insensitive
143
+ (per [HF docs](https://huggingface.co/docs/hub/en/ollama)) so
144
+ `:Q3_K_S` still resolves correctly.
145
 
146
  For other quants or local builds, pull from
147
  [`unsloth/Qwen3.6-27B-GGUF`](https://huggingface.co/unsloth/Qwen3.6-27B-GGUF)
 
174
 
175
  ```bash
176
  # A. Pull straight from HF (uses the bundled GGUF + root-level
177
+ # template / system / params files):
178
+ ollama run hf.co/FoolDev/janus-27b # default, ~17 GB Q4_K_M
179
  ollama run hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
 
 
180
 
181
  # B. Build locally (lets you pick the quant):
182
  make build # Q4_K_M -> janus-27b
 
208
 
209
  | App | How to load this model |
210
  |---|---|
211
+ | **Ollama** | `ollama run hf.co/FoolDev/janus-27b` (default Q4_K_M) or `:Q3_K_S` for the smaller quant. Pulls the GGUF + the root-level `template` / `system` / `params` files in one step (HF's Ollama bridge ingests these three files; it does **not** read `Modelfile`). For local builds, `make build` uses `Modelfile`, which is kept in sync. |
212
+ | **LM Studio** | Search β†’ `FoolDev/janus-27b` β†’ pick `Janus-27B.Q4_K_M.gguf` or `Janus-27B.q3_k_s.gguf`. Uses the GGUF's embedded jinja chat template (Qwen 3.6 ChatML); set the system prompt manually from the `SYSTEM` block in this repo's `Modelfile`. |
213
  | **Jan** | Hub β†’ "Import from Hugging Face" β†’ `FoolDev/janus-27b`. Same template behavior as LM Studio. |
214
  | **llama.cpp** | `hf download FoolDev/janus-27b Janus-27B.Q4_K_M.gguf --local-dir .` then `llama-server -m Janus-27B.Q4_K_M.gguf` (or `llama-cli`, `llama-mtmd-cli` for vision via the upstream `mmproj-F16.gguf`). |
215
  | **llama-cpp-python** | See `examples/llama_cpp_quickstart.py` (text) and `examples/llama_cpp_vision.py` (image input). |
examples/README.md CHANGED
@@ -21,17 +21,13 @@ Easiest path β€” pull straight from HF (gets the bundled Q4_K_M GGUF +
21
  this repo's Modelfile in one step):
22
 
23
  ```bash
24
- ollama pull hf.co/FoolDev/janus-27b:Q4_K_M # 17 GB, recommended
25
  # or:
26
  ollama pull hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
27
  pip install requests
28
- MODEL=hf.co/FoolDev/janus-27b:Q4_K_M python ollama_chat.py
29
  ```
30
 
31
- > Pin the quant tag explicitly. Bare `ollama pull hf.co/FoolDev/janus-27b`
32
- > resolves to Q3_K_S (HF picks the alphabetically-first GGUF in the
33
- > repo), not Q4_K_M.
34
-
35
  Or build locally from this repo (uses the bundled `Janus-27B.Q4_K_M.gguf`,
36
  no edits required):
37
 
 
21
  this repo's Modelfile in one step):
22
 
23
  ```bash
24
+ ollama pull hf.co/FoolDev/janus-27b # default, 17 GB Q4_K_M
25
  # or:
26
  ollama pull hf.co/FoolDev/janus-27b:Q3_K_S # 12 GB, smaller-footprint
27
  pip install requests
28
+ MODEL=hf.co/FoolDev/janus-27b python ollama_chat.py
29
  ```
30
 
 
 
 
 
31
  Or build locally from this repo (uses the bundled `Janus-27B.Q4_K_M.gguf`,
32
  no edits required):
33
 
examples/ollama_chat.py CHANGED
@@ -9,10 +9,9 @@ Prerequisites (pick one):
9
  # or:
10
  $ ollama create janus-27b -f ../Modelfile
11
 
12
- B. Pull straight from HF (pin the quant tag explicitly β€” bare
13
- `hf.co/FoolDev/janus-27b` resolves to Q3_K_S, not Q4_K_M):
14
- $ ollama run hf.co/FoolDev/janus-27b:Q4_K_M
15
- # then set MODEL=hf.co/FoolDev/janus-27b:Q4_K_M below
16
 
17
  Then:
18
  $ ollama serve # usually already running
 
9
  # or:
10
  $ ollama create janus-27b -f ../Modelfile
11
 
12
+ B. Pull straight from HF (default tag is Q4_K_M, ~17 GB):
13
+ $ ollama run hf.co/FoolDev/janus-27b
14
+ # then set MODEL=hf.co/FoolDev/janus-27b below
 
15
 
16
  Then:
17
  $ ollama serve # usually already running