leehack commited on
Commit
a0c4e75
·
verified ·
1 Parent(s): 4b0abbb

chore: deploy Laya Tetris c2eb1a8

Browse files
deploy-sha.txt CHANGED
@@ -1 +1 @@
1
- 523ab63a3b9bacfaf931fdcee52e061a3ffc8c58
 
1
+ c2eb1a822d9dfd9cb902afe789dabe69e451ad96
flutter_bootstrap.js CHANGED
@@ -42,6 +42,6 @@ _flutter.buildConfig = {"engineRevision":"5d531788691ec3404cac0cee66ead4007b1773
42
 
43
  _flutter.loader.load({
44
  serviceWorkerSettings: {
45
- serviceWorkerVersion: "3544709619" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
46
  }
47
  });
 
42
 
43
  _flutter.loader.load({
44
  serviceWorkerSettings: {
45
+ serviceWorkerVersion: "1346589549" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
46
  }
47
  });
main.dart.js CHANGED
The diff for this file is too large to render. See raw diff
 
webgpu_bridge/llama_webgpu_bridge.d.ts CHANGED
@@ -241,7 +241,7 @@ export type GrammarTrigger =
241
  | { type: 'word' | 'pattern' | 'pattern-full'; value: string }
242
  | { type: 'token'; token: number };
243
 
244
- /** llama.cpp's reasoning budget: after `maxTokens` tokens inside a reasoning block, plus any that finish a UTF-8 character, the sampler forces `forcedMessage` and `endTag`. A grammar pauses after `startTag` until `endTag` completes. */
245
  export interface ThinkingBudgetOptions {
246
  /** Integer from 0 to 2147483647. 0 forces the end as soon as a block opens, or at once when the prompt ends inside one. */
247
  maxTokens: number;
@@ -251,6 +251,8 @@ export interface ThinkingBudgetOptions {
251
  endTag: string;
252
  /** Text forced before `endTag` when the budget runs out; empty by default. */
253
  forcedMessage?: string;
 
 
254
  }
255
 
256
  /** Completion options the loaded core applies. Every flag is false until a model load initializes the core. */
@@ -261,6 +263,8 @@ export interface CompletionCapabilities {
261
  minP: boolean;
262
  /** `CompletionOptions.thinkingBudget` is applied. */
263
  thinkingBudget: boolean;
 
 
264
  /** The penalties count the prompt, and `CompletionOptions.penaltyPromptTokens` is applied. A core without it never counts the prompt, so `penaltyPromptTokens: false` holds there too. */
265
  penaltyPromptTokens: boolean;
266
  /** The loaded core applies CompletionOptions.penaltyPromptTokensWithGrammar. Only literal true permits the opt-in. */
 
241
  | { type: 'word' | 'pattern' | 'pattern-full'; value: string }
242
  | { type: 'token'; token: number };
243
 
244
+ /** llama.cpp's reasoning budget: after `maxTokens` tokens inside a reasoning block, plus any that finish a UTF-8 character, the sampler forces `forcedMessage` and `endTag`. A grammar pauses after `startTag` until `endTag` completes, unless `pauseGrammar` is false. */
245
  export interface ThinkingBudgetOptions {
246
  /** Integer from 0 to 2147483647. 0 forces the end as soon as a block opens, or at once when the prompt ends inside one. */
247
  maxTokens: number;
 
251
  endTag: string;
252
  /** Text forced before `endTag` when the budget runs out; empty by default. */
253
  forcedMessage?: string;
254
+ /** `false` keeps `grammar` applied inside a reasoning block, for a grammar that takes the block and `endTag` itself, such as one written for a prompt that ends inside the block; paused, it would resume at its start and take the reply as reasoning. It must accept `forcedMessage` and `endTag` wherever the budget can run out. Omitted, null or true pauses the grammar. Needs the `thinkingBudgetPauseGrammar` capability. */
255
+ pauseGrammar?: boolean | null;
256
  }
257
 
258
  /** Completion options the loaded core applies. Every flag is false until a model load initializes the core. */
 
263
  minP: boolean;
264
  /** `CompletionOptions.thinkingBudget` is applied. */
265
  thinkingBudget: boolean;
266
+ /** `CompletionOptions.thinkingBudget.pauseGrammar` is applied. A core without it pauses every grammar inside a reasoning block. */
267
+ thinkingBudgetPauseGrammar: boolean;
268
  /** The penalties count the prompt, and `CompletionOptions.penaltyPromptTokens` is applied. A core without it never counts the prompt, so `penaltyPromptTokens: false` holds there too. */
269
  penaltyPromptTokens: boolean;
270
  /** The loaded core applies CompletionOptions.penaltyPromptTokensWithGrammar. Only literal true permits the opt-in. */
webgpu_bridge/llama_webgpu_bridge.js CHANGED
@@ -239,6 +239,7 @@ var NO_COMPLETION_CAPABILITIES = Object.freeze({
239
  presencePenalty: false,
240
  minP: false,
241
  thinkingBudget: false,
 
242
  penaltyPromptTokens: false,
243
  penaltyPromptTokensWithGrammar: false,
244
  lazyGrammar: false,
@@ -284,10 +285,16 @@ function thinkingBudget(value, hasMediaParts) {
284
  throw new TypeError("CompletionOptions.thinkingBudget.forcedMessage must be a string.");
285
  }
286
  withoutNul(forcedMessage, "CompletionOptions.thinkingBudget.forcedMessage");
 
 
 
 
 
 
287
  if (hasMediaParts) {
288
  throw new Error("CompletionOptions.thinkingBudget supports text-only prompts; remove the media parts.");
289
  }
290
- return { maxTokens, startTag, endTag, forcedMessage };
291
  }
292
  function speculativeInteger(config, name, min, max) {
293
  const value = config[name];
@@ -545,6 +552,7 @@ function completionCapabilitiesFrom(raw) {
545
  presencePenalty: parsed?.presencePenalty === true,
546
  minP: parsed?.minP === true,
547
  thinkingBudget: parsed?.thinkingBudget === true,
 
548
  penaltyPromptTokens: parsed?.penaltyPromptTokens === true,
549
  penaltyPromptTokensWithGrammar: parsed?.penaltyPromptTokensWithGrammar === true,
550
  lazyGrammar: parsed?.lazyGrammar === true,
@@ -557,6 +565,7 @@ function requireCompletionCapabilities(sampling, capabilities) {
557
  sampling.minP !== 0 && !capabilities.minP ? "minP" : null,
558
  sampling.presencePenalty !== 0 && !capabilities.presencePenalty ? "presencePenalty" : null,
559
  sampling.thinkingBudget != null && !capabilities.thinkingBudget ? "thinkingBudget" : null,
 
560
  sampling.grammarOptions?.lazy === true && !capabilities.lazyGrammar ? "grammarLazy" : null,
561
  sampling.grammarOptions != null && sampling.grammarOptions.root !== "root" && !capabilities.lazyGrammar ? "grammarRoot" : null,
562
  sampling.speculative != null && !Object.values(capabilities.speculativeDecoding).includes(true) ? "speculativeDecoding" : null
@@ -4570,6 +4579,9 @@ var LlamaWebGpuBridgeRuntime = class {
4570
  if (sampling.grammarOptions) {
4571
  this._setNextGrammar(sampling.grammarOptions);
4572
  }
 
 
 
4573
  const beginRc = Number(
4574
  await this._core.ccall(
4575
  input.exportName,
@@ -6885,7 +6897,7 @@ var LlamaWebGpuBridge = class {
6885
  }
6886
  async _createCompletionUnlocked(prompt, options = {}) {
6887
  const sampling = resolveCompletionSamplingOptions(options);
6888
- if (sampling.penaltyPromptTokensWithGrammar) {
6889
  requireCompletionCapabilities(sampling, await this._getCompletionCapabilitiesUnlocked());
6890
  }
6891
  const isWarmup = options?.warmup === true;
 
239
  presencePenalty: false,
240
  minP: false,
241
  thinkingBudget: false,
242
+ thinkingBudgetPauseGrammar: false,
243
  penaltyPromptTokens: false,
244
  penaltyPromptTokensWithGrammar: false,
245
  lazyGrammar: false,
 
285
  throw new TypeError("CompletionOptions.thinkingBudget.forcedMessage must be a string.");
286
  }
287
  withoutNul(forcedMessage, "CompletionOptions.thinkingBudget.forcedMessage");
288
+ const pauseGrammar = budget.pauseGrammar ?? true;
289
+ if (typeof pauseGrammar !== "boolean") {
290
+ throw new TypeError(
291
+ `CompletionOptions.thinkingBudget.pauseGrammar must be a boolean; got ${String(pauseGrammar)}.`
292
+ );
293
+ }
294
  if (hasMediaParts) {
295
  throw new Error("CompletionOptions.thinkingBudget supports text-only prompts; remove the media parts.");
296
  }
297
+ return { maxTokens, startTag, endTag, forcedMessage, pauseGrammar };
298
  }
299
  function speculativeInteger(config, name, min, max) {
300
  const value = config[name];
 
552
  presencePenalty: parsed?.presencePenalty === true,
553
  minP: parsed?.minP === true,
554
  thinkingBudget: parsed?.thinkingBudget === true,
555
+ thinkingBudgetPauseGrammar: parsed?.thinkingBudgetPauseGrammar === true,
556
  penaltyPromptTokens: parsed?.penaltyPromptTokens === true,
557
  penaltyPromptTokensWithGrammar: parsed?.penaltyPromptTokensWithGrammar === true,
558
  lazyGrammar: parsed?.lazyGrammar === true,
 
565
  sampling.minP !== 0 && !capabilities.minP ? "minP" : null,
566
  sampling.presencePenalty !== 0 && !capabilities.presencePenalty ? "presencePenalty" : null,
567
  sampling.thinkingBudget != null && !capabilities.thinkingBudget ? "thinkingBudget" : null,
568
+ sampling.thinkingBudget?.pauseGrammar === false && !capabilities.thinkingBudgetPauseGrammar ? "thinkingBudget.pauseGrammar" : null,
569
  sampling.grammarOptions?.lazy === true && !capabilities.lazyGrammar ? "grammarLazy" : null,
570
  sampling.grammarOptions != null && sampling.grammarOptions.root !== "root" && !capabilities.lazyGrammar ? "grammarRoot" : null,
571
  sampling.speculative != null && !Object.values(capabilities.speculativeDecoding).includes(true) ? "speculativeDecoding" : null
 
4579
  if (sampling.grammarOptions) {
4580
  this._setNextGrammar(sampling.grammarOptions);
4581
  }
4582
+ if (sampling.thinkingBudget?.pauseGrammar === false) {
4583
+ this._core.ccall("llamadart_webgpu_set_next_grammar_reasoning_pause", null, ["number"], [0]);
4584
+ }
4585
  const beginRc = Number(
4586
  await this._core.ccall(
4587
  input.exportName,
 
6897
  }
6898
  async _createCompletionUnlocked(prompt, options = {}) {
6899
  const sampling = resolveCompletionSamplingOptions(options);
6900
+ if (sampling.penaltyPromptTokensWithGrammar || sampling.thinkingBudget?.pauseGrammar === false) {
6901
  requireCompletionCapabilities(sampling, await this._getCompletionCapabilitiesUnlocked());
6902
  }
6903
  const isWarmup = options?.warmup === true;
webgpu_bridge/llama_webgpu_core.js CHANGED
The diff for this file is too large to render. See raw diff
 
webgpu_bridge/llama_webgpu_core.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd
3
- size 11099140
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e17fac640d50a33a2277036a891b2939f023c4864652b9866236092ac2cb6ee
3
+ size 11099356
webgpu_bridge/llama_webgpu_core_mem64.js CHANGED
The diff for this file is too large to render. See raw diff
 
webgpu_bridge/llama_webgpu_core_mem64.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a
3
- size 11390403
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:249ab51961555ccf42139b7cb1c05cbd83f62ce3d181aad45671cfc83bb94501
3
+ size 11390643
webgpu_bridge/manifest.json CHANGED
@@ -1,37 +1,37 @@
1
  {
2
  "artifacts": {
3
  "llama_webgpu_bridge.d.ts": {
4
- "sha256": "8a5095c3b5fc62f10612cc6cf3326bc3065529103ad657857f4e1a9fe58dc6ed",
5
- "size_bytes": 22479
6
  },
7
  "llama_webgpu_bridge.js": {
8
- "sha256": "eaefb36f0d535ac7f76cadecfe97c66c416fc49cb05a4f87144f84499368d79c",
9
- "size_bytes": 316712
10
  },
11
  "llama_webgpu_bridge_worker.js": {
12
  "sha256": "47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca",
13
  "size_bytes": 257
14
  },
15
  "llama_webgpu_core.js": {
16
- "sha256": "58b74b403eabfde0703e1f53cdbb9fd34e5eee480bcd0443b32cf97ba48448c0",
17
- "size_bytes": 123402
18
  },
19
  "llama_webgpu_core.wasm": {
20
- "sha256": "f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd",
21
- "size_bytes": 11099140
22
  },
23
  "llama_webgpu_core_mem64.js": {
24
- "sha256": "282d0934ec2090b13f527e1f01d5740374bdfcc1e75c1f46f9148e7007976a0b",
25
- "size_bytes": 147159
26
  },
27
  "llama_webgpu_core_mem64.wasm": {
28
- "sha256": "c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a",
29
- "size_bytes": 11390403
30
  }
31
  },
32
  "assets_repository": "leehack/llama-web-bridge-assets",
33
- "bridge_assets_tag": "v0.1.83",
34
- "bridge_commit": "cb6383fbe7e903764a89f5c80c7f81c219f99769",
35
  "bridge_repository": "leehack/llama-web-bridge",
36
  "capabilities": {
37
  "memory64": true,
@@ -62,43 +62,43 @@
62
  "emscripten_version": "6.0.8",
63
  "files": {
64
  "llama_webgpu_bridge.d.ts": {
65
- "sha256": "8a5095c3b5fc62f10612cc6cf3326bc3065529103ad657857f4e1a9fe58dc6ed",
66
- "size_bytes": 22479
67
  },
68
  "llama_webgpu_bridge.js": {
69
- "sha256": "eaefb36f0d535ac7f76cadecfe97c66c416fc49cb05a4f87144f84499368d79c",
70
- "size_bytes": 316712
71
  },
72
  "llama_webgpu_bridge_worker.js": {
73
  "sha256": "47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca",
74
  "size_bytes": 257
75
  },
76
  "llama_webgpu_core.js": {
77
- "sha256": "58b74b403eabfde0703e1f53cdbb9fd34e5eee480bcd0443b32cf97ba48448c0",
78
- "size_bytes": 123402
79
  },
80
  "llama_webgpu_core.wasm": {
81
- "sha256": "f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd",
82
- "size_bytes": 11099140
83
  },
84
  "llama_webgpu_core_mem64.js": {
85
- "sha256": "282d0934ec2090b13f527e1f01d5740374bdfcc1e75c1f46f9148e7007976a0b",
86
- "size_bytes": 147159
87
  },
88
  "llama_webgpu_core_mem64.wasm": {
89
- "sha256": "c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a",
90
- "size_bytes": 11390403
91
  }
92
  },
93
- "github_run_id": "42479331139",
94
- "github_run_url": "https://github.com/leehack/llama-web-bridge/actions/runs/42479331139",
95
  "llama_cpp_commit": "cd959bae99ff4bed22bef2604f45241c09bbb8c8",
96
  "llama_cpp_tag": "v0.9.0",
97
  "native_commit": "a604639131105c42a25a3e7384ca10314d385f80",
98
  "native_manifest_sha256": "0d2119cdcf34d347a96a996423094498de3393026efb6ad1a96ba286b621c39e",
99
  "native_release_tag": "v0.9.0",
100
  "native_repository": "leehack/llamadart-native",
101
- "orchestrator_correlation_id": "manual-v0.1.83",
102
  "qualification_gates": {
103
  "multimodal": "passed",
104
  "speech_to_text": "required-automated-qualification",
@@ -107,9 +107,9 @@
107
  },
108
  "release_channel": "stable",
109
  "release_rebuild": 0,
110
- "release_tag": "v0.1.83",
111
  "schema_version": 2,
112
- "source_commit": "cb6383fbe7e903764a89f5c80c7f81c219f99769",
113
  "source_repository": "leehack/llama-web-bridge",
114
  "unproven_capabilities": {
115
  "hardware_gpu_acceleration": "unavailable-on-hosted-runners",
 
1
  {
2
  "artifacts": {
3
  "llama_webgpu_bridge.d.ts": {
4
+ "sha256": "766adcfe0b48c07c26c478a7c9b9dc72bff9386ff297c532baae709ff6367db4",
5
+ "size_bytes": 23141
6
  },
7
  "llama_webgpu_bridge.js": {
8
+ "sha256": "0ecc0ebb7a0f752f48a95de7cefe1e8f2f6b4e955e8a4674f09d49e03dbcb06e",
9
+ "size_bytes": 317431
10
  },
11
  "llama_webgpu_bridge_worker.js": {
12
  "sha256": "47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca",
13
  "size_bytes": 257
14
  },
15
  "llama_webgpu_core.js": {
16
+ "sha256": "f34ad08e95cf6dd1bddd7df31794383ceb6e350553f4487746f54210f8fd9c18",
17
+ "size_bytes": 123583
18
  },
19
  "llama_webgpu_core.wasm": {
20
+ "sha256": "7e17fac640d50a33a2277036a891b2939f023c4864652b9866236092ac2cb6ee",
21
+ "size_bytes": 11099356
22
  },
23
  "llama_webgpu_core_mem64.js": {
24
+ "sha256": "32b4689944aa4e3a940bddaf31928ab3476e57b9963b918cb38c1281e5688297",
25
+ "size_bytes": 147340
26
  },
27
  "llama_webgpu_core_mem64.wasm": {
28
+ "sha256": "249ab51961555ccf42139b7cb1c05cbd83f62ce3d181aad45671cfc83bb94501",
29
+ "size_bytes": 11390643
30
  }
31
  },
32
  "assets_repository": "leehack/llama-web-bridge-assets",
33
+ "bridge_assets_tag": "v0.1.84",
34
+ "bridge_commit": "dc359398bc6445ec15878ddb873555295f957f85",
35
  "bridge_repository": "leehack/llama-web-bridge",
36
  "capabilities": {
37
  "memory64": true,
 
62
  "emscripten_version": "6.0.8",
63
  "files": {
64
  "llama_webgpu_bridge.d.ts": {
65
+ "sha256": "766adcfe0b48c07c26c478a7c9b9dc72bff9386ff297c532baae709ff6367db4",
66
+ "size_bytes": 23141
67
  },
68
  "llama_webgpu_bridge.js": {
69
+ "sha256": "0ecc0ebb7a0f752f48a95de7cefe1e8f2f6b4e955e8a4674f09d49e03dbcb06e",
70
+ "size_bytes": 317431
71
  },
72
  "llama_webgpu_bridge_worker.js": {
73
  "sha256": "47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca",
74
  "size_bytes": 257
75
  },
76
  "llama_webgpu_core.js": {
77
+ "sha256": "f34ad08e95cf6dd1bddd7df31794383ceb6e350553f4487746f54210f8fd9c18",
78
+ "size_bytes": 123583
79
  },
80
  "llama_webgpu_core.wasm": {
81
+ "sha256": "7e17fac640d50a33a2277036a891b2939f023c4864652b9866236092ac2cb6ee",
82
+ "size_bytes": 11099356
83
  },
84
  "llama_webgpu_core_mem64.js": {
85
+ "sha256": "32b4689944aa4e3a940bddaf31928ab3476e57b9963b918cb38c1281e5688297",
86
+ "size_bytes": 147340
87
  },
88
  "llama_webgpu_core_mem64.wasm": {
89
+ "sha256": "249ab51961555ccf42139b7cb1c05cbd83f62ce3d181aad45671cfc83bb94501",
90
+ "size_bytes": 11390643
91
  }
92
  },
93
+ "github_run_id": "43272135497",
94
+ "github_run_url": "https://github.com/leehack/llama-web-bridge/actions/runs/43272135497",
95
  "llama_cpp_commit": "cd959bae99ff4bed22bef2604f45241c09bbb8c8",
96
  "llama_cpp_tag": "v0.9.0",
97
  "native_commit": "a604639131105c42a25a3e7384ca10314d385f80",
98
  "native_manifest_sha256": "0d2119cdcf34d347a96a996423094498de3393026efb6ad1a96ba286b621c39e",
99
  "native_release_tag": "v0.9.0",
100
  "native_repository": "leehack/llamadart-native",
101
+ "orchestrator_correlation_id": "manual-v0.1.84",
102
  "qualification_gates": {
103
  "multimodal": "passed",
104
  "speech_to_text": "required-automated-qualification",
 
107
  },
108
  "release_channel": "stable",
109
  "release_rebuild": 0,
110
+ "release_tag": "v0.1.84",
111
  "schema_version": 2,
112
+ "source_commit": "dc359398bc6445ec15878ddb873555295f957f85",
113
  "source_repository": "leehack/llama-web-bridge",
114
  "unproven_capabilities": {
115
  "hardware_gpu_acceleration": "unavailable-on-hosted-runners",
webgpu_bridge/sha256sums.txt CHANGED
@@ -1,7 +1,7 @@
1
- eaefb36f0d535ac7f76cadecfe97c66c416fc49cb05a4f87144f84499368d79c llama_webgpu_bridge.js
2
- 58b74b403eabfde0703e1f53cdbb9fd34e5eee480bcd0443b32cf97ba48448c0 llama_webgpu_core.js
3
- f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd llama_webgpu_core.wasm
4
  47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca llama_webgpu_bridge_worker.js
5
- 8a5095c3b5fc62f10612cc6cf3326bc3065529103ad657857f4e1a9fe58dc6ed llama_webgpu_bridge.d.ts
6
- 282d0934ec2090b13f527e1f01d5740374bdfcc1e75c1f46f9148e7007976a0b llama_webgpu_core_mem64.js
7
- c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a llama_webgpu_core_mem64.wasm
 
1
+ 0ecc0ebb7a0f752f48a95de7cefe1e8f2f6b4e955e8a4674f09d49e03dbcb06e llama_webgpu_bridge.js
2
+ f34ad08e95cf6dd1bddd7df31794383ceb6e350553f4487746f54210f8fd9c18 llama_webgpu_core.js
3
+ 7e17fac640d50a33a2277036a891b2939f023c4864652b9866236092ac2cb6ee llama_webgpu_core.wasm
4
  47bbfa0fe897e708455b9497e9aa41d2e94489c329300c33b12936fb3169deca llama_webgpu_bridge_worker.js
5
+ 766adcfe0b48c07c26c478a7c9b9dc72bff9386ff297c532baae709ff6367db4 llama_webgpu_bridge.d.ts
6
+ 32b4689944aa4e3a940bddaf31928ab3476e57b9963b918cb38c1281e5688297 llama_webgpu_core_mem64.js
7
+ 249ab51961555ccf42139b7cb1c05cbd83f62ce3d181aad45671cfc83bb94501 llama_webgpu_core_mem64.wasm