+
Skip to content

alexewerlof/local-browser-ai

Repository files navigation

Chrome Web Store Microsoft Edge Add-on MIT License

logo

Local Browser AI

This is the source code for Local Browser AI.

👉 Read the announcement here.

Metrics

Inference timestamps:

  • TStart: timestamp of starting the inference
  • TFirstTok: timestamp of receiving the first token (when not streaming, it's equal to TD)
  • TEnd: timestamp of ending the inference (including if it was interrupted)

Inference durations:

Duration Streaming Not Streaming Description
TD TD = TEnd - TStart TD = TEnd - TStart Total duration of inference.
TTFT TTFT = TFirstTok - TStart TD Time to first token.
ID TEnd - TFirstTok TD The total time it took to generate tokens.
TPS T / ID T / ID Tokens per second (during ID, not TD).

Install

Hardware requirements

  • A graphic card with at least 4GB VRAM.
  • Windows, Linux, Mac, or Chrome OS.
  • At least 20GB storage and a good enough internet.
  • See the full requirements.

Build

We lightly use esbuild for absolute minimum (packaging).

npm run build

Tests

We use the Node.js native testing framework.

npm test

Dependency management

We use npm as a package manager but since we don't want to build the entire code base (currently at least), the packages are exported to the vendors directory and updated using [update-vendors.js].

It's a bit unconventional, I know, but it's my code base and I'm experimenting with tooling.

The idea is for the main application code to go to the browser as is without any transformation. We'll see where we end up. 🙂

References




Swedish Flag Made in Sweden by Alex Ewerlöf
logo

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载