Spaces:
Running on Zero
Running on Zero
Commit History
19 days ago
-
Fix what a check of the Space found (615cffb) Running
Verified signature54d246f -
Show only the demo (c121aed)
Verified signature13047a3
20 days ago
-
Fix what a review of the Space found (f9c3fbc)
Verified signature4cbd96b -
Record the Space's GPU against the CPU recording
Verified signature43db8a9 -
Move the whole demo onto the Space (5266490)
Verified signature6b01bf1
30 days ago
-
Send depth, token limit and contrast continuations; keep live takeaways neutral
Haoran Wang +1: Claude Fable 5.1The payload now carries the model's depth, the generation cap and the twelve contrast continuations the direction was averaged over, so the page can say "layer 7 of 24" and list what defined the direction next to a live result. A live run no longer carries the recorded takeaway: the authored sentences quote the recorded Qwen run's tokens and percentages, and another model or another card need not reproduce them. Live payloads get a sentence about what they are instead. Custom prompts are described more precisely: the direction is re-derived from the same contrast continuations, appended to the visitor's prompt and prefix, which they were not written for. Also: candidate ids can no longer collide with the content table's column names, and the README lists both served models and all the endpoints. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>b55b594
-
Reject the last decoder block as a steering layer
Haoran Wanghidden_states[i] is the output of decoder_layers[i - 1] for every block but the last; the final entry is taken after the closing norm. A hook on the last block would add a direction to a different tensor than the one it was measured on. Measured on Qwen2.5-0.5B: layers 1-23 agree exactly, layer 24 differs by 1.7e+02. check_layer refuses it and tuning_for clamps below the model's depth.c1f8f96 -
Report the GPU it ran on, and take the softmax on the CPU in float64
Haoran WangThe device comparison could not say what it compared against: ZeroGPU allocates a card per call and the Space never asked which one it got. _measure now records torch.cuda.get_device_name so the comparison names measured hardware instead of the hardware tier. The softmax moves to the CPU as float64 rather than being cast in place. MPS has no float64 at all, so the in-place cast made the offline pipeline's --device mps fail before a single state was measured; only this one vector moves, and the values are unchanged (the shipped CPU data regenerates byte-identical). identity_check no longer proves what it assumes: it goes through measure_states and carries a positive control that must be detected.7b44016
-
Record the CPU/GPU comparison result in the module docstrings
Haoran Wange4a4515 -
Read probabilities from the full softmax, and report the revision
Haoran WangBrings the Space in line with the site after a source-code audit. probability_of() looked a displayed candidate up in a retained top-k list, by decoded string, and returned 0 when it missed; to_payload() then rounded to one decimal and derived "Other" from the already-rounded percentages. The displayed candidates are chosen only after all nine states are measured, so a token that wins at one end of the slider is routinely outside the top-k at the other, and was reported there as zero. A live run was returning 0.0 for values the model had really assigned. Candidates are now tracked by token id and read out of the full float64 softmax row at every state, "Other" comes from those unrounded values, and results are stored at six significant figures. The payload also carries the model revision, the candidate token ids and the selected index, so the page can name the weights it ran and cannot mistake two identically-decoding tokens for one. Also picks up the softened scenario takeaways the…e4bb56c -
Serve several models, and a visitor's own prompt
Haoran Wang +1: Claude Opus 5 (1M context)run_model picks from an allowlist of small models, each with its own tuned layer and coefficient - the same direction lands at a different depth in a different network. run_custom measures a visitor's own prompt and prefix along an existing scenario's direction, re-deriving the direction in the context of that prompt rather than reusing one fitted elsewhere. Inputs are capped and whitespace-normalised, and the cache is keyed by their content so a repeat costs nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>f8e184d -
Cache deterministic results so a visitor costs no GPU quota
Haoran Wang +1: Claude Opus 5 (1M context)Greedy decoding over fixed prompts and a fixed alpha grid is deterministic: every run produced byte-identical output. Recomputing it per visitor spent ZeroGPU quota - charged to the visitor's own daily allowance - to learn nothing. Results are now cached in-process for 15 minutes. Only the measurement itself is GPU-decorated, so a cache hit allocates nothing at all (7.4s -> 0.07s locally). If a fresh run fails, a stale cached result is served instead of an error, because the numbers would have been the same. run_scenario_fresh forces a real run for anyone who wants to watch it happen, and the declared duration drops 90s -> 40s to improve queue priority. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>ef7f344 -
Deploy steering showcase API
Haoran Wang +1: Claude Opus 5 (1M context)Gradio app that runs real representation steering on ZeroGPU. One call returns all nine alpha states for a scenario: the measured next-token distribution after the fixed prefix, plus the continuation the steered model actually generates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>aa82c42 -
initial commit
Verified signaturec4ef557