feat: Add local LLM support with ONNX models#12
Open
orfeomorello wants to merge 1 commit intosachaa:masterfrom
Open
feat: Add local LLM support with ONNX models#12orfeomorello wants to merge 1 commit intosachaa:masterfrom
orfeomorello wants to merge 1 commit intosachaa:masterfrom
Conversation
- Add ONNX provider with WebGPU acceleration - Add streaming response for local models - Add stop button to abort generation - Add model selection in settings - Support Gemma 3 1B and Qwen 3.5 0.8B - Chat-only mode for local models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Add Local LLM Support (ONNX)
Overview
This PR adds support for local LLM inference using ONNX models that run entirely in the browser. The implementation uses
@huggingface/transformersfor WebGPU-accelerated inference.Key Changes
1. New Provider System (
src/providers/)2. Orchestrator Updates (
src/orchestrator.ts)3. UI Updates (
src/components/)4. Configuration (
src/config.ts)LLM_PROVIDER_TYPEconfig keyLOCAL_MODEL_IDconfig keyArchitecture Decision: No Tool Calling for Local Models
After extensive testing, we determined that small local models (1B parameters) cannot reliably perform tool calling. The implementation now:
This is clearly communicated to users in the UI with different prompt examples and a message explaining the limitations.
Supported Local Models
Requirements
Installation
Usage
Testing
Files Changed
Known Limitations