• Stars
    star
    477
  • Rank 92,112 (Top 2 %)
  • Language
    JavaScript
  • Created about 1 year ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple "Be My Eyes" web app with a llama.cpp/llava backend

LLaVaVision

Screenshot

A simple "Be My Eyes" web app with a llama.cpp/llava backend created in about an hour using ChatGPT, Copilot, and some minor help from me, @lxe. It describes what it sees using SkunkworksAI BakLLaVA-1 model via llama.cpp and narrates the text using Web Speech API.

Inspired by Fuzzy-Search/realtime-bakllava.

Getting Started

You will need a machine with about ~5 GB of RAM/VRAM for the q4_k version.

Set up the llama.cpp server

(Optional) Install the CUDA toolkit:

sudo apt install nvidia-cuda-toolkit

Build llama.cpp (build instructions for various platforms at llama.cpp build):

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build
cd build
cmake .. -DLLAMA_CUBLAS=ON # Remove the flag if CUDA is unavailable
cmake --build . --config Release

Download the models from ggml_bakllava-1:

wget https://huggingface.co/mys/ggml_bakllava-1/resolve/main/mmproj-model-f16.gguf
wget https://huggingface.co/mys/ggml_bakllava-1/resolve/main/ggml-model-q4_k.gguf # Choose another quant if preferred

Start the server (server options detailed here):

./bin/server -m ggml-model-q4_k.gguf --mmproj mmproj-model-f16.gguf -ngl 35 -ts 100,0 # For GPU-only, single GPU
# ./bin/server -m ggml-model-q4_k.gguf --mmproj mmproj-model-f16.gguf # For CPU

Launch LLaVaVision

Clone and set up the environment:

git clone https://github.com/lxe/llavavision
cd llavavision
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt

Create dummy certificates and start the server. HTTPS is required for mobile video functionality:

openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out cert.pem -keyout key.pem
flask run --host=0.0.0.0 --key key.pem --cert cert.pem --debug

Access https://your-machine-ip:5000 from your mobile device. Optionally, start a local tunnel with ngrok or localtunnel:

npx localtunnel --local-https --allow-invalid-cert --port 5000

Acknowledgements and Inspiration

More Repositories

1

simple-llm-finetuner

Simple UI for LLM Model Finetuning
Jupyter Notebook
2,043
star
2

require-navigator

A Google Chrome extension for navigating Node.js `require()`s in Github.
JavaScript
118
star
3

cerebras-lora-alpaca

LoRA weights for Cerebras-GPT-2.7b finetuned on Alpaca dataset with shorter prompt
Jupyter Notebook
62
star
4

llama-tune

LLaMa Tuning with Stanford Alpaca Dataset using Deepspeed and Transformers
Python
52
star
5

no-bugs

Comprehensive JavaScript test framework for perfect code
JavaScript
39
star
6

llm-companion

Mobile web app for audio "push-to-talk" + TTS chat interface with OpenAI-like APIs
JavaScript
34
star
7

tts-server

A simple TTS server for generating speech using StyleTTS2
Python
22
star
8

supermoon

Caching "npm install" replacement.
JavaScript
13
star
9

array-to-object-with-property-names-that-map-to-array-values-and-property-values-that-are-objects-wi

Convert an array to an object whose property names map to the array items, and whose values are objects whose properties in turn you can specify, and those property values are also mapped to the current array item.
JavaScript
13
star
10

stream-replace

Replace text in a stream
JavaScript
11
star
11

reglite

A web-scale enterprise private npm registry.
JavaScript
9
star
12

nodemagic

Install and use npm and node versions from package.json/engines.
Shell
9
star
13

stackflow

Generate a software stack that markets itself!
JavaScript
7
star
14

yet-another-session-module

We need another session module! Onwards toward 10,000 session modules on npm!
JavaScript
7
star
15

whatsup

Continously log what callbacks a node process is waiting for
JavaScript
6
star
16

io.coffee

Evented IO for V8 CoffeeScript
CoffeeScript
5
star
17

node-objhash

Retrieve a node.js object's v8 identity hash.
JavaScript
3
star
18

tagcheck

Check whether your git+ssh:// dependencies are up to date
JavaScript
3
star
19

uber-api-express-sample

Simple and basic web app skeleton utilizing node.js, express, and the Uber API.
JavaScript
3
star
20

clickbin

Clickb.in application
CSS
3
star
21

unstream

buffer, transform, and re-stream
JavaScript
3
star
22

tunnelify

Spawns whatever `ssh` client/command is available on your system and opens a tunnel to (from?) a remote host and port(s).
JavaScript
3
star
23

simple-llm-chatbot

Playground LLM chatbot app using stable-lm (but you can use any model)
Python
3
star
24

onehundred

Extremely optimistic code coverage tool
JavaScript
3
star
25

onerror-remote-origin

Demonstrates the difference in window.onerror behavior across local and remote scripts
HTML
2
star
26

photoservo

JavaScript
2
star
27

tailwind-demo

Created with CodeSandbox
HTML
1
star
28

lxe.github.io

HTML
1
star
29

qr

Hastily-made client-only browser-based QR code scanner.
JavaScript
1
star
30

usb

C
1
star
31

shattered

Demonstration of SHA1 collision outlined in http://shattered.io/static/shattered.pdf
JavaScript
1
star
32

cprf

Asynchronously, recursively copy directories and files.
JavaScript
1
star
33

fusion-redux-example

fusion-redux-example
JavaScript
1
star
34

fusionjs-hello-world

Created with CodeSandbox
JavaScript
1
star
35

fusion-typescript-example

Using https://fusionjs.com/ and https://baseweb.design/ with TypeScript
TypeScript
1
star