MCPcopy
hub / github.com/Standard-Intelligence/hertz-dev

github.com/Standard-Intelligence/hertz-dev @main sqlite

repository ↗ · DeepWiki ↗
215 symbols 548 edges 11 files 25 documented · 12%
README

hertz-dev

Hertz-dev is an open-source, first-of-its-kind base model for full-duplex conversational audio.

See our blog post for more details: https://si.inc/hertz-dev/

Setup

Inference is known to work on Python 3.10 and CUDA 12.1. Other versions have not been tested as thoroughly. If you want to use CUDA 12.1, you'll need to install torch with pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 before running pip install -r requirements.txt.

On Ubuntu you may need to install libportaudio: sudo apt-get install libportaudio2

All three scripts will automatically download the models to the ./ckpt directory, and checkpoints are also accessible at https://ckpt.si.inc/hertz-dev/index.txt

Usage

We recommend starting by using inference.ipynb to generate one- or two-channel completions from a prompt.

Then, you can use inference_client.py and inference_server.py to talk to the model live through your microphone. These are currently experimental, and have primarily been tested with Ubuntu on the server and MacOS on the client.

Alternatively, you can use inference_client_webrtc.py, which is built on streamlit + streamlit-webrtc and runs in a browser:

# Install additional requirements
pip install -r requirements_webrtc.txt
# Run the client
streamlit run inference_client_webrtc.py

Then, access the client at http://localhost:8501.

Note: If you host the streamlit client anywhere other than localhost you will need to connect with https to avoid errors (see here for more info). An easy workaround is to ssh from the client into the server with port forwarding ssh -L 127.0.0.1:8501:remote-host:8501 user@remote-host, after which you can access the client at http://localhost:8501 as usual. If serving from a remote host with https, you may need to use a STUN server to establish the connection. You can do this by passing the --use_ice_servers flag: streamlit run inference_client_webrtc.py -- --use_ice_servers.

Core symbols most depended-on inside this repo

exists
called by 25
utils/blocks.py
print_colored
called by 13
utils/interp.py
output
called by 7
ioblocks.py
input
called by 6
ioblocks.py
default
called by 6
utils/blocks.py
decode
called by 5
tokenizer.py
load_ckpt
called by 5
utils/dist.py
Conv1d1x1
called by 4
tokenizer.py

Shape

Method 131
Function 42
Class 41
Route 1

Languages

Python100%

Modules by API surface

tokenizer.py56 symbols
transformer.py41 symbols
ioblocks.py32 symbols
model.py24 symbols
utils/blocks.py15 symbols
inference_client_webrtc.py12 symbols
utils/interp.py9 symbols
utils/dist.py9 symbols
inference_server.py9 symbols
inference_client.py8 symbols

Dependencies from manifests, versioned

IProgress0.4 · 1×
einops0.8.0 · 1×
fastapi0.115.4 · 1×
ipython8.18.1 · 1×
matplotlib3.9.2 · 1×
numpy1.26.3 · 1×
requests2.32.3 · 1×
sounddevice0.5.1 · 1×
soundfile0.12.1 · 1×
streamlit1.33.0 · 1×
streamlit-webrtc0.47.9 · 1×
torch2.5.1 · 1×

For agents

$ claude mcp add hertz-dev \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact