MCPcopy Index your code
hub / github.com/abi/secret-llama

github.com/abi/secret-llama @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
24 symbols 68 edges 22 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Secret Llama

secret llama

Entirely-in-browser, fully private LLM chatbot supporting Llama 3, Mistral and other open source models.

  • Fully private = No conversation data ever leaves your computer
  • Runs in the browser = No server needed and no install needed!
  • Works offline
  • Easy-to-use interface on par with ChatGPT, but for open source LLMs

Big thanks to the inference engine provided by webllm.

Join us on Discord

https://discord.gg/QkVzykMc9V

System Requirements

To run this, you need a modern browser with support for WebGPU. According to caniuse, WebGPU is supported on:

  • Google Chrome
  • Microsoft Edge

It's also available in Firefox, but it needs to be enabled manually through the dom.webgpu.enabled flag. Safari on MacOS also has experimental support for WebGPU which can be enabled through the WebGPU experimental feature.

In addition to WebGPU support, various models might have specific RAM requirements.

Try it out

You can try it here.

To compile the React code yourself, download the repo and then, run

yarn
yarn build-and-preview

If you're looking to make changes, run the development environment with live reload:

yarn
yarn dev

Supported models

Model Model Size
TinyLlama-1.1B-Chat-v0.4-q4f32_1-1k 600MB
Llama-3-8B-Instruct-q4f16_1 ⭐ 4.3GB
Phi1.5-q4f16_1-1k 1.2GB
Mistral-7B-Instruct-v0.2-q4f16_1 ⭐ 4GB

Looking for contributors

We would love contributions to improve the interface, support more models, speed up initial model loading time and fix bugs.

Other Projects by Author

Check out screenshot to code and Pico - AI-powered app builder

Extension points exported contracts — how you extend this code

InputProps (Interface)
(no doc)
src/components/ui/input.tsx
State (Interface)
(no doc)
src/hooks/useChatStore.ts
ButtonProps (Interface)
(no doc)
src/components/ui/button.tsx

Core symbols most depended-on inside this repo

cn
called by 10
src/lib/utils.ts
loadEngine
called by 1
src/App.tsx
onSend
called by 1
src/App.tsx
resetEngineAndChatHistory
called by 1
src/App.tsx
updateModelStatus
called by 1
src/components/ModelsDropdown.tsx
copyTextToClipboard
called by 1
src/lib/utils.ts
useTimedToggle
called by 1
src/hooks/useTimedToggle.ts
App
called by 0
src/App.tsx

Shape

Function 20
Interface 3
Enum 1

Languages

TypeScript100%

Modules by API surface

src/App.tsx7 symbols
src/lib/utils.ts2 symbols
src/components/ModelsDropdown.tsx2 symbols
src/components/MessageList.tsx2 symbols
src/components/Message.tsx2 symbols
src/models.ts1 symbols
src/hooks/useTimedToggle.ts1 symbols
src/hooks/useChatStore.ts1 symbols
src/components/ui/input.tsx1 symbols
src/components/ui/button.tsx1 symbols
src/components/UserInput.tsx1 symbols
src/components/ResetChatButton.tsx1 symbols

For agents

$ claude mcp add secret-llama \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact