bitgpu 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -211,11 +211,22 @@ interface GenerateOptions {
211
211
  /** Top-k sampling cutoff (candidate count). Default `20` when sampling; clamped to `[1, vocab]`
212
212
  * (the GPU reduces the logits to this many candidates, so `0` cannot mean "disabled"). */
213
213
  topK?: number;
214
- /** Top-p (nucleus) cutoff. Accepted for API compatibility but not applied (a no-op, matching transformers.js v4.2.0). */
214
+ /** Top-p (nucleus) cutoff, applied over the top-K candidates when sampling: keeps the shortest
215
+ * leading run whose cumulative probability reaches `topP`. Default `1` (off). Only affects
216
+ * sampling (greedy takes the penalized argmax regardless). */
215
217
  topP?: number;
218
+ /** Min-p cutoff, applied over the top-K candidates when sampling: keeps tokens whose probability
219
+ * is at least `minP` * (the top token's probability), so the pool tightens when the model is
220
+ * confident and widens when it is not. Default `0` (off). Robust for low-precision models. Only
221
+ * affects sampling. */
222
+ minP?: number;
216
223
  /** Repetition penalty over the deduped prompt+generated id set (`logit<0 ? *p : /p`). Default `1`
217
224
  * (off). Applied under greedy decoding too (the penalized argmax), matching transformers.js. */
218
225
  repetitionPenalty?: number;
226
+ /** Presence penalty: subtracts this flat amount from the logit of every token seen so far (the
227
+ * additive anti-repetition knob the Qwen3.5 family recommends, applied after `repetitionPenalty`).
228
+ * Default `0` (off). Applied on the full vocab before top-k, under greedy decoding too. */
229
+ presencePenalty?: number;
219
230
  /** Block any n-gram of this size from repeating. Default `0` (off). Applied under greedy decoding
220
231
  * too, matching transformers.js. */
221
232
  noRepeatNgramSize?: number;
@@ -424,4 +435,4 @@ interface Engine {
424
435
  }
425
436
  //#endregion
426
437
  export { ForwardResult as a, KvSnapshot as c, ManifestArch as d, ManifestRef as f, EngineOptions as i, LoadProgress as l, TokenLogprobs as m, Engine as n, GenerateOptions as o, ManifestTensor as p, EngineCapabilities as r, GenerateResult as s, DeviceLostInfo as t, Manifest as u };
427
- //# sourceMappingURL=types-Wg8VrdrL.d.ts.map
438
+ //# sourceMappingURL=types-BkfIJ42d.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitgpu",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Fast WebGPU runtime for 1-bit (binary-weight) LLMs in the browser. Bit-exact, zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "license": "MIT",