Commit 99216a5
[Web-SDK] [Web-Example] Web SDK fixes (#433)
* Refactor audio and video infrastructure in the RunAnywhere Web SDK
- Updated imports in `speak.ts`, `transcribe.ts`, `vision.ts`, and `voice.ts` to use the new core package for audio and video functionalities.
- Introduced new `AudioCapture`, `AudioPlayback`, and `VideoCapture` classes to handle audio and video processing more efficiently.
- Added backend-agnostic types for STT, TTS, LLM, and VLM in the core types module.
- Implemented streaming capabilities for model downloads in `ModelDownloader`.
- Enhanced the overall structure for better modularity and maintainability.
* minor fixes
* Upgrade llama.cpp to b8179 and fix WASM VLM build for new mtmd model sources
- Bump LLAMACPP_VERSION from b8011 to b8179 for Vulkan/WebGPU precision
fixes and FlashAttention improvements
- Adapt LoRA adapter API calls in llamacpp_backend.cpp to the new
llama_set_adapters_lora() batch API (replaces removed per-adapter functions)
- Add nemotron-v2-vl.cpp and paddleocr.cpp to CMakeLists.txt for new
clip_graph_* model types introduced in b8179
- Document Qwen2-VL CPU fallback performance (~1 tok/s) caused by
M-RoPE NaN logits on WebGPU in rac_vlm_llamacpp.cpp,
VLMWorkerBridge.ts, and model-manager.ts
* addressed code rabbit comments
* minor fixes
* bumped up the version
* Refactor VLM model type resolution and system prompt handling
- Updated the logic for determining the effective system prompt to handle empty strings.
- Introduced a new function to resolve the effective VLM model type based on options, simplifying the code in `rac_vlm_llamacpp_process`.
- Improved download progress tracking in `ModelDownloader` by using cumulative byte counts for better accuracy.
- Enhanced type exports in `llamacpp` and `onnx` packages for better compatibility and clarity.
- Adjusted regex for identifying Qwen VL models to ensure more accurate matching.
---------
Co-authored-by: Shubham Malhotra <shubham.malhotra28@gmail.com>45 files changed
Lines changed: 854 additions & 297 deletions
File tree
- examples/web/RunAnywhereAI/src
- services
- views
- sdk
- runanywhere-commons/src/backends/llamacpp
- runanywhere-web/packages
- core
- src
- Infrastructure
- Public/Extensions
- types
- llamacpp
- src
- Extensions
- Foundation
- Infrastructure
- onnx
- src
- Extensions
- Foundation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | | - | |
| 416 | + | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
832 | | - | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
934 | | - | |
935 | 933 | | |
936 | 934 | | |
937 | 935 | | |
| |||
0 commit comments