Skip to content

armgit / janas

Public Imported from GitHub
0

37 tok/s from Qwen3-Next-80B (48 GB) on a 32 GB laptop, 24 without drafts vs 2.8 for llama.cpp; reading 62 vs 16 tok/s. Faster than llama.cpp on all 13 models compared in Q4_K_M. LLMs bigger than your RAM, pure C, CPU or GPU.

Develop 2026-10-14 (2): janas-try's answers match again on every machine (issue #23), and a GPU without the subgroup operations the shaders use is turned down, naming them

camauri8417b8c056fe
diff --git a/ChangeLog.md b/ChangeLog.md
index 13f1853..8592b5d 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -2,6 +2,12 @@
> Curated, user-facing summary of completed work, newest first.
+## [2026-10-14] - janas-try's answers, and the GPU's subgroup operations
+
+- **janas-try's answers match again, on every machine** (issue #23, reported by clethbridgedaniel): since 1 October janas-chat starts Janas's own services and writes their catalog into the system message, even with `--system ""`, and janas-try asked its fixed question that way, while the expected fingerprints date from 25 September: no level could match, on any machine. The engine was right to the bit. Built from clethbridgedaniel's commit, here on an Intel Core Ultra 9 185H with AVX-VNNI and GCC 14, CPU only, Qwen3-Next-80B answers with `f393d4bfb674402f`, the fingerprint the report gave from a Ryzen 9 5900HX with AVX2 and GCC 16 - the same without the MTP drafts and with the AVX2 kernels forced - and with `4aae064b918a0e75`, the expected one, without the services; Qwen3-4B likewise gives its expected `c08f0f936eeba5cb` without them. janas-try now asks without MCP servers and without the machine's measure (`--no-mcp --no-tune`), in configuration, cache and data directories of its own, so that neither settings saved with `/save-config` nor a system message kept from an earlier chat can change the answer. The medium level expects `e49b0016cedf6c50` now: Qwen3.6-35B-A3B's Q8_0 tensors take the activations with a scale per 32 since 27 September (the fix that brought Gemma-4-26B from 147 to 156 of 200 against an exact float64 pass), and janas-try still expected the answer from before. All four levels give their fingerprints here, with the GPU and without it.
+- **A GPU without the subgroup operations the shaders use is turned down, and the reason names them** (`no clustered, shuffle subgroup operations in compute shaders`): besides ballot, 13 shaders use subgroup arithmetic, clustered reductions or shuffles, and the engine checked only ballot, so a driver without them would have been handed shaders it cannot build. `vkcheck` gives the same decision, where it used to warn that the engine did not check them yet.
+
+
## [2026-10-13] - A ceiling on the reasoning
- **The reasoning can be given a ceiling**: `max_reasoning` in the library's chat parameters, `--reasoning-budget` and `reasoning_budget_tokens` (or `thinking_budget_tokens`, the names llama.cpp takes) on the server, `--think N` and `/think N` in the chat. A model still reasoning there has its reasoning closed for it, a sentence ("I have thought enough; now I give the answer.") and the closing mark written as if it had written them, and goes on with its answer; with no ceiling nothing changes, the replies identical to the bit. The sentence is what makes a small model answer: cut at 32 tokens with janas-chat's system message, Qwen3.5-0.8B, Qwen3.5-2B and Qwen3-4B ended 20 of 36 replies themselves given the mark alone, the small ones going on reasoning in their answer and mostly looping to its end, and 35 of 36 given the sentence, the replies a third as long (96 tokens on average against 265); Qwen3-4B answered either way.
diff --git a/src/llm/gpu.c b/src/llm/gpu.c
index 4f6d9e3..857e393 100644
--- a/src/llm/gpu.c
+++ b/src/llm/gpu.c
@@ -169,7 +169,7 @@ static int pick_device(struct janas_gpu *g, uint32_t *family, char *err,
const char *want_dev = getenv("JANAS_GPU_DEVICE");
/* the first device turned down and why, for the message: a tester
with a GPU the engine does not take has to be able to tell why */
- char why[160] = "";
+ char why[192] = "";
#define REJECT(what) \
{ \
if (!why[0]) \
@@ -214,6 +214,27 @@ static int pick_device(struct janas_gpu *g, uint32_t *family, char *err,
!(p11.subgroupSupportedOperations &
VK_SUBGROUP_FEATURE_BALLOT_BIT))
REJECT("no buffer addresses, integer dot product or ballot")
+ /* besides ballot, 13 shaders use subgroup arithmetic, clustered
+ reductions or shuffles (expert_act, the DeltaNet steps,
+ attention, norms, RoPE, the subgroup-per-row products), all in
+ compute shaders: a device without one of them cannot build them
+ (vkcheck says the same) */
+ VkSubgroupFeatureFlags sg_ops =
+ (p11.subgroupSupportedStages & VK_SHADER_STAGE_COMPUTE_BIT)
+ ? p11.subgroupSupportedOperations
+ : 0;
+ char sg_miss[48] = "", sg_why[96];
+ if (!(sg_ops & VK_SUBGROUP_FEATURE_ARITHMETIC_BIT))
+ strcat(sg_miss, ", arithmetic");
+ if (!(sg_ops & VK_SUBGROUP_FEATURE_CLUSTERED_BIT))
+ strcat(sg_miss, ", clustered");
+ if (!(sg_ops & VK_SUBGROUP_FEATURE_SHUFFLE_BIT))
+ strcat(sg_miss, ", shuffle");
+ snprintf(sg_why, sizeof(sg_why),
+ "no %s subgroup operations in compute shaders",
+ sg_miss + 2);
+ if (sg_miss[0])
+ REJECT(sg_why)
/* sharing host memory: needed by an integrated GPU (it reads the
weights where they are), optional for a discrete one (it gets a
copy in its own memory) */
diff --git a/tools/janas-try.sh b/tools/janas-try.sh
index 5866680..9adb06f 100755
--- a/tools/janas-try.sh
+++ b/tools/janas-try.sh
@@ -130,13 +130,17 @@ one 5476083302 11811160064 8" ;;
# (checked here: the same with the defaults, AVX2 kernels forced, 4 CPUs,
# no GPU, no drafts). What the engine would choose by the memory is fixed:
# all six bits of the down matrix, all the experts, exact attention - or a
-# machine with less memory would compute other numbers, rightly.
+# machine with less memory would compute other numbers, rightly. And so is
+# the prompt: no MCP servers, no saved settings (see level()).
FP_PROMPT="Write a short paragraph about the island of Sardinia, its history and its landscape."
+# medium's since 27 Sep 2026: its Q8_0 tensors take the activations with a
+# scale per 32 since then (13e2f198c270b826 before), checked again on 14 Oct
+# with the GPU, without it and with the AVX2 kernels forced
fp_expected()
{
case "$1" in
quick) echo "c08f0f936eeba5cb" ;;
- medium) echo "13e2f198c270b826" ;;
+ medium) echo "e49b0016cedf6c50" ;;
full) echo "4aae064b918a0e75" ;;
gemma) echo "b2c01def5ff6bd5c" ;;
esac
@@ -314,12 +318,20 @@ level()
[ "$lv" = full ] && line="$line; with the MTP block \`$mtpn\`, made by hf2jns_mtp from the original checkpoint"
grep -qF "$line" "$WORK/models" 2>/dev/null || echo "$line" >> "$WORK/models"
- # the answers: the same text as on every other machine
+ # the answers: the same text as on every other machine. Asked without
+ # the MCP servers, whose catalog goes into the system message (from 1
+ # Oct 2026 Janas's services did, and no answer matched: issue #23), and
+ # in directories of their own: no settings saved by /save-config, no
+ # system message kept by an earlier chat, no tuning of the machine
note "checking the answers (temperature 0)"
- local text sum want
+ local text sum want x="$WORK/answer-home"
+ rm -rf "$x" && mkdir -p "$x/config" "$x/cache" "$x/data"
text=$(printf '/experts 0\n%s\n' "$FP_PROMPT" |
- "$BIN/janas-chat" "$jns" "${mtp[@]}" --bits 6 --attention exact \
- --temp 0 --max 64 --system "" --no-preload --ctx 4096 2>>"$LOG")
+ XDG_CONFIG_HOME="$x/config" XDG_CACHE_HOME="$x/cache" \
+ XDG_DATA_HOME="$x/data" "$BIN/janas-chat" "$jns" "${mtp[@]}" \
+ --bits 6 --attention exact --temp 0 --max 64 --system "" \
+ --no-preload --ctx 4096 --no-mcp --no-tune 2>>"$LOG")
+ rm -rf "$x"
sum=$(printf '%s\n' "$text" | sha256sum | cut -c1-16) # as printed
want=$(fp_expected "$lv")
if [ "${want#@}" != "$want" ]; then
diff --git a/tools/vkcheck.c b/tools/vkcheck.c
index 806dfd6..3631b99 100644
--- a/tools/vkcheck.c
+++ b/tools/vkcheck.c
@@ -305,7 +305,18 @@ static void examine(VkPhysicalDevice pd, int index, struct dev *d)
if (!d->bda || !d->idp || !d->ballot)
snprintf(d->why, sizeof(d->why),
"no buffer addresses, integer dot product or ballot");
- else if (!discrete && !d->host_import)
+ else if (!d->arith || !d->clustered || !d->shuffle) {
+ /* as the engine says it (gpu.c) */
+ char miss[48] = "";
+ if (!d->arith)
+ strcat(miss, ", arithmetic");
+ if (!d->clustered)
+ strcat(miss, ", clustered");
+ if (!d->shuffle)
+ strcat(miss, ", shuffle");
+ snprintf(d->why, sizeof(d->why),
+ "no %s subgroup operations in compute shaders", miss + 2);
+ } else if (!discrete && !d->host_import)
snprintf(d->why, sizeof(d->why),
"integrated, without VK_EXT_external_memory_host");
else if (d->family == UINT32_MAX)
@@ -331,10 +342,6 @@ static void examine(VkPhysicalDevice pd, int index, struct dev *d)
discrete ? "with its own memory, the weights copied there"
: "reading the host's memory in place",
d->sg);
- if (!d->arith || !d->clustered || !d->shuffle)
- printf(" but the shaders that need arithmetic, clustered or shuffle "
- "subgroup operations would fail: the engine does not check "
- "them yet\n");
}
/* The device opened for the tests, and one compute pipeline per shader. */