--- title: Salience Chat emoji: 🌿 colorFrom: yellow colorTo: red sdk: gradio sdk_version: 5.38.0 app_file: app.py pinned: false license: apache-2.0 models: - vectionlabs/Salience-27B-R5 short_description: Salience 27B R5 — reasoning that stops when done --- # Salience Chat A minimal chat interface for [vectionlabs/Salience-27B-R5](https://huggingface.co/vectionlabs/Salience-27B-R5), loaded in **NF4** on **ZeroGPU**. - **Model**: Salience 27B R5 — 27.8B dense, every parameter active on every token, 1,048,576-token context, Apache-2.0 - **Reasoning**: **native**. The effort dial sends the model's own `reasoning_effort` template parameter, not prompt text - **Stack**: React (Vite) frontend served as static files; a Gradio app mounted at `/gradio` provides the streaming API consumed via `@gradio/client` ## What changed moving from 9B to 27B **NF4, not bfloat16.** At 27.8B, bf16 would be 51.7 GiB and no ZeroGPU tier holds it. NF4 quantises the body to ~11.8 GiB and leaves the embedding and output head in bf16 — bitsandbytes skips `nn.Embedding` and `lm_head` by design — landing around 16.5 GiB. **The prompt scaffolding is gone.** The 9B build forced reasoning by pasting instructions into a system prompt (*"reason step by step"*, *"write a rough draft, check it"*) and prefilling an opening `` tag, because that model's template had no thinking support. R5's does. It takes a real `reasoning_effort` parameter and emits the opening tag itself, so all of that text was deleted rather than adapted. Keeping it would have been actively harmful: instructing a natively-reasoning model to reason makes it *perform* reasoning for the reader instead of doing it, and the two compound into narrated pseudo-thought. ## The effort dial R5's template accepts exactly three values. The UI ships four pills, so High and xHigh both send `xhigh` and differ only in how long they may run — inventing a fourth setting that does nothing would be theatre. | pill | sends | token budget | |---|---|---| | Low | `reasoning_effort: low` | 2,048 | | Medium | `reasoning_effort: medium` — the model's own default | 4,096 | | High | `reasoning_effort: xhigh` | 8,192 | | xHigh | `reasoning_effort: xhigh` | 16,384 | `medium` injects no deliberation instruction at all: the model decides. That is R5's headline behaviour and it is what this Space is on by default. ## The `` trap, handled server-side The chat template emits the **opening** `` as part of the generation prompt. With `skip_prompt=True` the stream therefore starts *inside* the block and the completion carries only the closing tag. Any client looking for a matching pair finds none, reports zero thinking, and renders the whole chain of thought as the answer. `app.py` re-adds the opening tag to the stream so the frontend's parser sees a well-formed pair. ## Why Gradio SDK and not Static ZeroGPU is only available on Gradio-SDK Spaces. A Static (React template) Space cannot run a local model. This repo keeps the React frontend but ships it as a pre-built bundle (`static/`) served by the same process that hosts the ZeroGPU-backed Gradio API. ## Local frontend development ```bash cd frontend npm install npm run dev # dev server, proxies /gradio to a running app.py npm run build # emits ../static — commit this ```