File size: 1,590 Bytes
083d5dc
15ade26
 
 
 
083d5dc
15ade26
083d5dc
15ade26
 
 
 
 
 
 
083d5dc
 
15ade26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: 1650-Elo Browser Chess
emoji: ♟️
colorFrom: blue
colorTo: indigo
sdk: static
app_file: index.html
pinned: false
short_description: Grafted BT4 to Qwen3-1.7B chess, self-playing on WebGPU
custom_headers:
  # credentialless (not require-corp) so the cross-origin model weights fetched from the
  # HF model repo load under cross-origin isolation WITHOUT needing a CORP header on them.
  # Still enables SharedArrayBuffer / crossOriginIsolated, which WebGPU + threaded WASM need.
  cross-origin-embedder-policy: credentialless
  cross-origin-opener-policy: same-origin
---

# 1650-Elo browser chess — Latent Grafting

A frozen **Lc0 BT4** chess trunk is grafted into **Qwen3-1.7B** as soft-prompt tokens; the
LLM reads the graft and plays. Everything — the BT4 trunk, the graft stem, and the quantized
LLM — runs **entirely client-side on WebGPU** via onnxruntime-web. No server inference.

Three games self-play simultaneously (batched on the GPU), each streaming the model's
`<think>` reasoning and its stated win probability per move.

## How it's served

This is a **static** Space. The `custom_headers` block above sets COOP/COEP so the browser
grants `SharedArrayBuffer` (required by ORT-web's threaded WASM + WebGPU). The pre-built
front-end and the ~1.6 GB of model weights are committed under `dist/` (weights via Git LFS)
and served as-is; `app_file` points at `dist/index.html`.

## Requirements (for visitors)

A WebGPU browser (Chrome/Edge 113+, Safari 18+) and a ~1.6 GB one-time download (cached after
first load). Click **Load model**, then **Self-play**.