Instructions to use yummyfiles/Bob with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use yummyfiles/Bob with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'yummyfiles/Bob');
PROJECT: BOB
Local-first, serverless, tool-calling AI running entirely in your browser via WebAssembly.
What is Bob?
Bob is a personal AI assistant that runs 100% locally in your browser. No servers, no cloud, no tracking, no API keys required after initial model download (~600MB). Built with Transformers.js and Gorilla OpenFunctions.
Key Features
- π Zero Server β Runs entirely client-side via WebAssembly
- π Tool Calling β Native function calling:
get_crypto_price,multiply_numbers - π Offline-Capable β Works after first load (model cached in IndexedDB)
- β‘ Instant Deploy β Static files on GitHub Pages
- π¨ Stark UI β Pure black/white high-contrast interface
Live Demo
https://yummyfiles.github.io/Project-Bob/
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BROWSER (Client) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β index.html β app.js β @xenova/transformers (WASM) β
β β β
β ββββββββββββββββββββ β
β β Gorilla-3B-4bit β β Cached in β
β β (ONNX quantized)β β IndexedDB β
β ββββββββββ¬ββββββββββ β
β β β
β <call_tool> detection β
β β β
β ββββββββββββββββ΄βββββββββββββββ β
β βΌ βΌ β
β get_crypto_price() multiply_numbers() β
β (CoinGecko API) (local JS math) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Quick Start
Use Online (No Setup)
Visit https://yummyfiles.github.io/Project-Bob/ β loads model on first visit.
Run Locally
git clone https://github.com/yummyfiles/Project-Bob
cd Project-Bob
npx serve # or python -m http.server 8000
# Open http://localhost:3000
Model
| Component | Details |
|---|---|
| Base | gorilla-llm/gorilla-openfunctions-v2 (3B params) |
| Format | ONNX INT4 quantized via Optimum |
| Runtime | Transformers.js (ONNX Runtime Web + WebAssembly) |
| Size | ~600MB download, cached after first load |
| Capabilities | Function calling, chat, reasoning |
Why Gorilla?
- Trained specifically for function calling (API interaction)
- Open-source, Apache 2.0 license
- Works well quantized to 4-bit
- Small enough for browser inference
Tool System
Bob detects <call_tool> tags in model output and executes matching JavaScript functions.
Built-in Tools
| Tool | Description | Example |
|---|---|---|
get_crypto_price(symbol) |
Fetches live crypto price from CoinGecko | "BTC" β "$67,420" |
multiply_numbers(a, b) |
Multiplies two numbers locally | 144, 37 β 5328 |
Adding Tools
// In app.js, extend customTools object:
const customTools = {
get_crypto_price: async (symbol) => { ... },
multiply_numbers: (a, b) => a * b,
// Add yours here:
my_custom_tool: async (arg1, arg2) => { ... }
};
Model prompt includes tool schemas β it learns to call them automatically.
Project Structure
Project-Bob/
βββ index.html # Stark black/white UI
βββ app.js # Transformers.js runtime + tool engine
βββ dataset.jsonl # Fine-tuning examples (QLoRA format)
βββ colab_training_notebook.py # Google Colab training script
βββ push_assets.py # Deploy to GitHub Pages + HF Hub
βββ README.md # This file
Fine-Tuning Your Own Bob
Train a specialized version on your data:
- Open Colab: Upload
colab_training_notebook.ipynb - GPU Runtime: Runtime β Change runtime type β T4 GPU
- Secrets: Add
HF_TOKEN(write access) - Run All: ~15 minutes on T4
- Result: Trained LoRA + ONNX 4-bit pushed to
yummyfiles/Bob
Dataset Format (dataset.jsonl)
{"text": "<|begin_of_text|><|start_header_id|>user<|end_header_id|>What is the current price of Bitcoin?<|eot_id|><|start_header_id|>assistant<|end_header_id|><call_tool>get_crypto_price({\"symbol\": \"BTC\"})</call_tool><|eot_id|>"}
{"text": "<|begin_of_text|><|start_header_id|>user<|end_header_id|>Multiply 42 by 58 for me.<|eot_id|><|start_header_id|>assistant<|end_header_id|><call_tool>multiply_numbers({\"a\": 42, \"b\": 58})</call_tool><|eot_id|>"}
Deployment
GitHub Pages (Frontend)
python push_assets.py
# Pushes index.html, app.js β yummyfiles/Project-Bob (main branch)
# Enable Pages in repo settings: Source = main branch
Hugging Face Hub (Model)
python push_assets.py
# Uploads model artifacts β yummyfiles/Bob
Tech Stack
| Layer | Technology |
|---|---|
| ML Runtime | Transformers.js 2.17+ (ONNX Runtime Web + WASM) |
| Model | Gorilla OpenFunctions v2 (3B, INT4) |
| Tools | Native JS async functions |
| Frontend | Vanilla HTML/CSS/JS (ES Modules) |
| Hosting | GitHub Pages (static) |
| Model Hub | Hugging Face Hub |
Browser Support
| Browser | Support |
|---|---|
| Chrome 94+ | β Full |
| Firefox 93+ | β Full |
| Safari 15.4+ | β Full |
| Edge 94+ | β Full |
Requires: SharedArrayBuffer, WebAssembly, WebGL/WebGPU
Privacy
- No telemetry
- No external requests except:
- Model download (once, from HF CDN)
get_crypto_priceβ CoinGecko public API
- All inference local β your prompts never leave your device
License
MIT β Free for any use.
Credits
- Transformers.js by Xenova
- Gorilla OpenFunctions by Gorilla LLM team
- Optimum for ONNX export
- CoinGecko for crypto prices
Built for local-first AI. No cloud required.