WebInfer

🧠

Local Models (WebGPU)

Downloaded models running locally with WebGPU

Free
Local & Self-Hosted
Local

Configure Local Models (WebGPU)

Enable Local Models (WebGPU) in Settings

Go to Settings
About Local Models (WebGPU)

Run downloaded Transformers.js models locally in your browser with WebGPU acceleration. Models are cached for offline use and all inference happens on your device.

Key Features
  • Fully offline after model download
  • WebGPU acceleration
  • No API keys or cloud dependency
  • Privacy-first: data never leaves your device
  • Automatic model caching
Capabilities
chat
local
browser
webgpu
offline
Configuration Schema
Required and optional fields for configuring this provider
FieldTypeRequired
modelId
text
Optional
CLI Usage
For users running the daemon server locally or a self-hosted gateway

Add provider:

npx webinfer provider add local

Test connection:

npx webinfer provider test local
Programmatic Usage
Use Local Models (WebGPU) in your code with WebInfer

Basic usage:

import { generateText } from "webinfer"

// WebInfer automatically routes to the best available provider
const result = await generateText({
  prompt: "Write a haiku about programming"
})

console.log(result.text)

Specify Local Models (WebGPU) explicitly:

import { generateText } from "webinfer"

const result = await generateText({
  prompt: "Write a haiku about programming",
  provider: "local"
})

console.log(result.text)
console.log("Provider:", result.provider)
console.log("Model:", result.model)

Streaming:

import { streamText } from "webinfer"

const { textStream } = await streamText({
  prompt: "Write a story about AI",
  provider: "local"
})

for await (const chunk of textStream) {
  process.stdout.write(chunk)
}
Pricing
Free
Completely free. All computation happens locally.