Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b923e55
Windows: a platform layer and host builds that pass
BobClawblaw Oct 12, 2026
60c6892
Windows: CUDA kernels, the native server and the GPU suites on sm_89
BobClawblaw Oct 12, 2026
9c36621
Windows: pull into the hub cache, HOME, and the whole test step
BobClawblaw Oct 12, 2026
2f626e1
Windows: build notes, strip before install, formatting
BobClawblaw Oct 12, 2026
ec0ddc5
Default port 8888
BobClawblaw Oct 12, 2026
3c57c14
qwen3_5: serve Qwen3.5-2B on CUDA
BobClawblaw Oct 13, 2026
84c58d3
qwen3_5: serve Qwen3.8-27B on CUDA, one arena for a model's device me…
BobClawblaw Oct 14, 2026
a087521
qwen3_5: replay each decode shape as a CUDA graph
BobClawblaw Oct 14, 2026
c3861d3
qwen3_5: DFlash2 drafts for Qwen3.8-27B on CUDA
BobClawblaw Oct 14, 2026
9b8d4af
qwen3_5: tree drafts on CUDA, the kept path replayed from a log
BobClawblaw Oct 14, 2026
b5b5c4b
docs: the Qwen hybrids on CUDA in the Windows page and the README
BobClawblaw Oct 14, 2026
cf2cdf1
qwen3_5, platform: comments on one line
BobClawblaw Oct 14, 2026
221c2b5
Windows: checkpoint reads skip the page cache
BobClawblaw Oct 14, 2026
522d17d
Windows: the signal handler type allows address 1, for aarch64
BobClawblaw Oct 14, 2026
d1ea47f
docs: Windows as a target in the README and the Windows page
BobClawblaw Oct 14, 2026
95f879e
CI: the host unit tests on Windows
BobClawblaw Oct 14, 2026
7efc823
qwen3_5: the drafter reads TF_TIMING through the platform layer
BobClawblaw Oct 14, 2026
85bb88d
qwen3_5: the drafter takes a prompt longer than its tap ring
BobClawblaw Oct 14, 2026
e01d423
qwen3_5 cuda: prompt chunks past 32 rows see the right keys, and tree…
BobClawblaw Oct 14, 2026
0baccf3
Windows: the server goldens and the Cortheon fuzz step on Windows hosts
BobClawblaw Oct 14, 2026
40159f8
cuda: cuBLASLt opens by its Windows DLL name
BobClawblaw Oct 14, 2026
cdb735b
Windows: writes on an O_APPEND descriptor land at the end whole
BobClawblaw Oct 14, 2026
a63ec9b
golden check: a request-log mismatch names the first differing line
BobClawblaw Oct 14, 2026
d7fb12f
golden check: the request log compares with LF endings on either side
BobClawblaw Oct 14, 2026
02d3e2e
qwen3_5: attention chunks follow each row's own keys, not the forward…
BobClawblaw Oct 15, 2026
e7744bc
qwen3_5: the DFlash2 config's divisors must be positive, and staging …
BobClawblaw Oct 15, 2026
48dcc42
Windows: 1.0.12's new code through the platform layer
BobClawblaw Oct 16, 2026
1d0a11f
docs: 1.0.12's new pages at the default port, 8888
BobClawblaw Oct 16, 2026
26e9b68
lanes recorder: a stream's new file is never made through a link ther…
BobClawblaw Oct 16, 2026
59be20e
qwen3_5 cuda: mixed-width MLX checkpoints, 2 to 8 bits in groups of 64
BobClawblaw Oct 14, 2026
d7e44b5
qwen3_5 cuda: mixed-width comments on one line each
BobClawblaw Oct 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Default port 8888
8080 and 8000 are taken by too many other servers; serve listens on 8888
unless --port says otherwise, and the docs and bench scripts follow.
  • Loading branch information
BobClawblaw committed Oct 16, 2026
commit ec0ddc5021b54115980577d9e62360ca5fe10cb3
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ Record pass, fail and skip counts and explain any unrun platform or feature.
For served decode, the existing standard-library client needs Python 3.11 or newer:

```sh
python3 tools/bench_openai.py http://127.0.0.1:8080 local-model \
python3 tools/bench_openai.py http://127.0.0.1:8888 local-model \
--tokens 256 --reps 3 --temperatures 0 --label candidate --output decode.json
python3 tools/bench_concurrent.py http://127.0.0.1:8080 local-model \
python3 tools/bench_concurrent.py http://127.0.0.1:8888 local-model \
--tokens 256 --reps 3 --temperatures 0 --levels 1,4 --alone --serial --output concurrent.json
```

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ On Windows with an NVIDIA GPU, build `tensorfold-native.exe` from source as [doc
Use `tensorfold-native --help` or `-h`, and `tensorfold-native capabilities --json`, to inspect the installed binary.
Model weights have separate downloads and licenses.

The API listens at `http://127.0.0.1:8080/v1` by default.
The API listens at `http://127.0.0.1:8888/v1` by default.
It serves OpenAI chat completions, completions and Responses, plus Anthropic Messages.
Use the model ID returned by `/v1/models`, or set one with `--name`.

```sh
curl -fsS http://127.0.0.1:8080/v1/chat/completions \
curl -fsS http://127.0.0.1:8888/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"local-model","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_tokens":128,"temperature":0}'
```
Expand All @@ -50,12 +50,12 @@ src=$(ls -d ~/.cache/huggingface/hub/models--TensorFold--NVIDIA-Nemotron-3.5-Lig
mkdir -p ~/models && cp -cRL "$src" ~/models/nemotron-living # always teach a copy
(umask 077; openssl rand -hex 24 > ~/models/slide-key) # --slide starts only with a key
tensorfold serve ~/models/nemotron-living --slide --api-key-file ~/models/slide-key
curl -N http://127.0.0.1:8080/v1/slide/learn -H "Authorization: Bearer $(cat ~/models/slide-key)" \
curl -N http://127.0.0.1:8888/v1/slide/learn -H "Authorization: Bearer $(cat ~/models/slide-key)" \
-H 'Content-Type: application/json' -d '{"text": "I like blue."}'
```

Send it a document instead and it finds the facts in it and learns them one by one. Open
`http://127.0.0.1:8080/slide` to watch in 3D: the facts, the neurons each one took in the model's layers, the shard
`http://127.0.0.1:8888/slide` to watch in 3D: the facts, the neurons each one took in the model's layers, the shard
files that hold them, and the lesson running now.

Learning runs on Apple-silicon Macs and on an NVIDIA GB10 (DGX Spark), and a folder that learned on one serves on the
Expand Down Expand Up @@ -179,7 +179,7 @@ The binary's `capabilities --json` response lists its supported flags and platfo

| Flag | Meaning |
| --- | --- |
| `--host HOST`, `--port PORT` | Listen address and port, default `127.0.0.1:8080`. |
| `--host HOST`, `--port PORT` | Listen address and port, default `127.0.0.1:8888`. |
| `--name NAME` | Model ID advertised to clients. |
| `--alias NAME` | Another accepted model ID; repeat for multiple aliases. |
| `--api-key KEY` | Require a bearer key; repeat for multiple keys. |
Expand Down
8 changes: 4 additions & 4 deletions RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ bin/tensorfold-native serve "$HOME/models/nemotron-lightning" \
Leave the server running and check it from another terminal:

```sh
curl -fsS http://127.0.0.1:8080/health
curl -fsS http://127.0.0.1:8080/v1/models
curl -fsS http://127.0.0.1:8080/v1/chat/completions \
curl -fsS http://127.0.0.1:8888/health
curl -fsS http://127.0.0.1:8888/v1/models
curl -fsS http://127.0.0.1:8888/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"local-model","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_tokens":128,"temperature":0}'
```

Use `http://127.0.0.1:8080/v1` as the OpenAI client base URL.
Use `http://127.0.0.1:8888/v1` as the OpenAI client base URL.
For streaming, add `"stream": true` to the request.
The native server also has `/v1/responses` and Anthropic `/v1/messages` routes.
Serve flags and request overrides are described in [README.md](README.md#serve-flags).
Expand Down
2 changes: 1 addition & 1 deletion docs/WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tensorfold-native models
tensorfold-native serve <model path> --name local-model --parallel 1 --context 8192 --temperature 0 --no-thinking
```

The server listens on `http://127.0.0.1:8080/v1`. Ctrl+C (or closing the console) stops it cleanly.
The server listens on `http://127.0.0.1:8888/v1`. Ctrl+C (or closing the console) stops it cleanly.

## How the port works

Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compatible APIs

The base URL is `http://127.0.0.1:8080/v1` with the default server settings.
The base URL is `http://127.0.0.1:8888/v1` with the default server settings.

## Native chat template override

Expand Down Expand Up @@ -586,5 +586,5 @@ redacted thinking and other context edits return HTTP 400.
Connect Claude Code using the ID from `/v1/models`:

```bash
ANTHROPIC_BASE_URL=http://127.0.0.1:8080 ANTHROPIC_API_KEY=local claude --model local-model
ANTHROPIC_BASE_URL=http://127.0.0.1:8888 ANTHROPIC_API_KEY=local claude --model local-model
```
4 changes: 2 additions & 2 deletions docs/cache-benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The standard-library-only cache client runs one first request, identical repeate
concurrent group using the same prompt, greedy temperature, seed and reply limit. There is no warm-up:

```sh
python3 tools/bench_cache.py http://127.0.0.1:8080 MODEL \
python3 tools/bench_cache.py http://127.0.0.1:8888 MODEL \
--tokens 64 --repeats 2 --streams 4 --require-cold --output cache.json
```

Expand All @@ -36,7 +36,7 @@ prefix retention (`--prompt-cache-gib 0`, where supported) for independent cold-
For exact 2K/8K/32K/64K raw prefill, supply a JSON array of IDs from the checkpoint's own tokenizer:

```sh
python3 tools/bench_cache.py http://127.0.0.1:8080 MODEL \
python3 tools/bench_cache.py http://127.0.0.1:8888 MODEL \
--prompt-file public-8192-tokens.json --expected-prompt-tokens 8192 \
--tokens 64 --require-cold --output cache-8192.json
```
Expand Down
2 changes: 1 addition & 1 deletion docs/control.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The error from `tensorfold tui` prints that command with the venv's Python. `ric
```bash
tensorfold tui
tensorfold tui --profile code
tensorfold tui --url http://127.0.0.1:8080/v1
tensorfold tui --url http://127.0.0.1:8888/v1
tensorfold tui --url https://spark.example.invalid --token-env TENSORFOLD_API_KEY
tensorfold tui --demo
tensorfold tui --demo --snapshot preview.svg
Expand Down
4 changes: 2 additions & 2 deletions docs/cortheon.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ tensorfold serve TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit --cor
```

```bash
curl -s http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' \
curl -s http://127.0.0.1:8888/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"messages": [{"role": "user", "content": "What changed in the latest Zig release?"}]}'
```

Point any OpenAI-compatible client at `http://127.0.0.1:8080/v1` as before.
Point any OpenAI-compatible client at `http://127.0.0.1:8888/v1` as before.
14 changes: 7 additions & 7 deletions docs/living-weights.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ there is no key, when the key file is missing, empty or readable by other users
space in it. Every request then sends the key, as the commands below do; [API keys](api.md#api-keys) has the rest.

`--slide-graph` keeps the list of learned facts in a file, so it survives a restart; without it the list lives in
memory, though the weights keep what they learned either way. The server listens on `http://127.0.0.1:8080` unless you
memory, though the weights keep what they learned either way. The server listens on `http://127.0.0.1:8888` unless you
pass `--host` or `--port`.

### 4. Teach it a fact

```sh
curl -N http://127.0.0.1:8080/v1/slide/learn \
curl -N http://127.0.0.1:8888/v1/slide/learn \
-H "Authorization: Bearer $(cat ~/models/slide-key)" \
-H 'Content-Type: application/json' \
-d '{"text": "I like blue."}'
Expand All @@ -93,7 +93,7 @@ few seconds on a Mac.
Use the normal chat API, from any client:

```sh
curl http://127.0.0.1:8080/v1/chat/completions -H "Authorization: Bearer $(cat ~/models/slide-key)" \
curl http://127.0.0.1:8888/v1/chat/completions -H "Authorization: Bearer $(cat ~/models/slide-key)" \
-H 'Content-Type: application/json' -d '{"messages": [{"role": "user", "content": "What colour do I like?"}]}'
```

Expand Down Expand Up @@ -125,7 +125,7 @@ nothing behind. An earlier fact's neuron that the new lesson would disturb is re
- A file: send its contents as the text, for example:

```sh
jq -Rs '{text: .}' notes.md | curl -N http://127.0.0.1:8080/v1/slide/learn \
jq -Rs '{text: .}' notes.md | curl -N http://127.0.0.1:8888/v1/slide/learn \
-H "Authorization: Bearer $(cat ~/models/slide-key)" -H 'Content-Type: application/json' -d @-
```

Expand Down Expand Up @@ -153,7 +153,7 @@ A panel shows each fact as queued, learning, learned or missed.

## See what it learned

Open `http://127.0.0.1:8080/slide` in a browser while the server runs. It draws the model in 3D and updates live:
Open `http://127.0.0.1:8888/slide` in a browser while the server runs. It draws the model in 3D and updates live:

- The model as a tower of its 52 layers. Each MoE layer is a ring carrying its 64 pocket neurons, and a neuron glows in
the colour of the fact that owns it.
Expand All @@ -167,7 +167,7 @@ Drag to turn, scroll or pinch to zoom, and click a fact for its neurons, the que
rounds. Phones get a bottom sheet. Without WebGL2, or with `/slide?flat`, the page draws a flat graph from the same
data. The page asks for the server's key once and keeps it for that browser tab.

- `curl -H "Authorization: Bearer $(cat ~/models/slide-key)" http://127.0.0.1:8080/v1/slide/graph`
- `curl -H "Authorization: Bearer $(cat ~/models/slide-key)" http://127.0.0.1:8888/v1/slide/graph`
returns the same data as JSON: each fact's state, neurons (layer, index and key), questions and rounds, and the
model's layers, pocket and shards.
- The same with `-X DELETE` clears the graph. The weights keep what they learned. To take one fact out of the weights,
Expand All @@ -176,7 +176,7 @@ data. The page asks for the server's key once and keeps it for that browser tab.
## Delete one fact

```sh
curl -N -X DELETE http://127.0.0.1:8080/v1/slide/fact/2 \
curl -N -X DELETE http://127.0.0.1:8888/v1/slide/fact/2 \
-H "Authorization: Bearer $(cat ~/models/slide-key)" \
-H 'Content-Type: application/json' -d '{"reason": "my sister changed her name"}'
```
Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ how matrix multiplication uses a GPU. The chat fixture disables thinking. After
`--name bench`, run from the repository root:

```bash
python3 tools/bench_openai.py http://127.0.0.1:8080 bench \
python3 tools/bench_openai.py http://127.0.0.1:8888 bench \
--tokens 64 --reps 5 --temperatures 1.0,0 --output bench.json
```

Expand Down
4 changes: 2 additions & 2 deletions docs/recipes/qwen3.8-27b.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ input is qualified on this checkpoint.

```bash
tensorfold pull nvidia/Qwen3.8-27B-NVFP4 z-lab/Qwen3.8-27B-DFlash2
tensorfold serve nvidia/Qwen3.8-27B-NVFP4 --host 0.0.0.0 --port 8080
tensorfold serve nvidia/Qwen3.8-27B-NVFP4 --host 0.0.0.0 --port 8888
```

Prompts take bf16 rows on a prompt GEMM that reads the stored bytes: each FP8 byte and each NVFP4 code times its
Expand Down Expand Up @@ -122,7 +122,7 @@ serve the folder:
```bash
python -c "from huggingface_hub import snapshot_download as d; d('turboderp/Qwen3.8-27B-exl3', revision='3.00bpw', local_dir='qwen27b-exl3-3.00bpw')"
tensorfold pull z-lab/Qwen3.8-27B-DFlash2
tensorfold serve qwen27b-exl3-3.00bpw --host 0.0.0.0 --port 8080
tensorfold serve qwen27b-exl3-3.00bpw --host 0.0.0.0 --port 8888
```

Verify windows use the row-invariant EXL3 linear, so drafted replies equal `"draft": false` ones; prompts use the
Expand Down
4 changes: 2 additions & 2 deletions docs/recipes/qwen3.8-flash-next.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ local-inference-lab's.
ship, MTP head included, on one GPU:

```bash
tensorfold serve local-inference-lab/Qwen3.8-Flash-Next-NVFP4 --host 0.0.0.0 --port 8080
tensorfold serve local-inference-lab/Qwen3.8-Flash-Next-NVFP4 --host 0.0.0.0 --port 8888
```

| Checkpoint (revision) | Routed experts | DeltaNet, attention, shared expert | n-gram table |
Expand Down Expand Up @@ -169,7 +169,7 @@ Download that branch, then serve the folder:
```bash
python -c "from huggingface_hub import snapshot_download as d; d('turboderp/Qwen3.8-Flash-Next-exl3', revision='3.05bpw_h5_ng5', local_dir='flashnext-exl3-3.05bpw')"
python -m tensorfold.cuda.exl3.inspect flashnext-exl3-3.05bpw # bits per tensor, from the headers
tensorfold serve flashnext-exl3-3.05bpw --host 0.0.0.0 --port 8080
tensorfold serve flashnext-exl3-3.05bpw --host 0.0.0.0 --port 8888
```

A pack maps its n-gram table from its own file and runs on one GPU: `--tp 2` and `--ple-on-ssd` are for the MLX
Expand Down
2 changes: 1 addition & 1 deletion docs/speed-up-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Flags that change decoding, such as `--no-drafts` or `--no-thinking`, go on both

### 6. Connect a client

Point any OpenAI-compatible client at `http://RANK0:8080/v1` with the model name `flash-next`, where RANK0 is rank 0's
Point any OpenAI-compatible client at `http://RANK0:8888/v1` with the model name `flash-next`, where RANK0 is rank 0's
address. Send requests only to rank 0, since rank 1 refuses its own.

## Measured speeds
Expand Down
2 changes: 1 addition & 1 deletion docs/vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ body = {
'max_tokens': 128,
'stream': False,
}
request = Request('http://127.0.0.1:8080/v1/chat/completions',
request = Request('http://127.0.0.1:8888/v1/chat/completions',
data=json.dumps(body).encode(),
headers={'Content-Type': 'application/json'})
with urlopen(request) as response:
Expand Down
2 changes: 1 addition & 1 deletion tools/bench_concurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
server with a small listen backlog resets simultaneous connections; those resets are reported, not hidden).
Standard library only.

python3 tools/bench_concurrent.py http://127.0.0.1:8080 MODEL --levels 1,2,4,8 --alone --output out.json
python3 tools/bench_concurrent.py http://127.0.0.1:8888 MODEL --levels 1,2,4,8 --alone --output out.json
"""

import argparse
Expand Down
2 changes: 1 addition & 1 deletion tools/bench_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
CUDA engine's bench times (the first sampled token excluded). Standard library only, so it runs on
a bare host.

python3 tools/bench_openai.py http://127.0.0.1:8080 MODEL --tokens 64 --reps 5 --output out.json
python3 tools/bench_openai.py http://127.0.0.1:8888 MODEL --tokens 64 --reps 5 --output out.json
"""

import argparse
Expand Down
2 changes: 1 addition & 1 deletion zig/src/server/cli.zig
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub const env = [_][]const u8{ "TENSORFOLD_API_KEY", "TENSORFOLD_NO_LIVE", "TENS
pub const Args = struct {
model: []const u8 = "",
host: []const u8 = "127.0.0.1",
port: u16 = 8080,
port: u16 = 8888,
name: []const u8 = "",
chat_template: ?[]const u8 = null,
alias: []const []const u8 = &.{},
Expand Down