A PyQt6 desktop GUI for running local BitNet LLM models. It wraps the
llama-cli binary with a model picker, inference settings panel, embedded
chat view, Windows Terminal launch, an integrated model downloader, and a
guided installation manager.
[ screenshot placeholder ]
- Model discovery — scans a configurable models directory for
.gguffiles - Inference settings — threads, context window, temperature, max tokens, and system prompt, all validated with DbC
- Embedded chat — persistent
llama-clisubprocess with state-machine I/O; streams responses token by token - Terminal launch — opens a new Windows Terminal tab running the selected model interactively
- Model downloader — HuggingFace catalog browser (all 16 BitNet-compatible
models) with tag/name filtering and background download via
setup_env.py - Installation manager — git clone, pip install, and cmake build, all driven from inside the app with streaming log output
- Python 3.10+
- PyQt6 >= 6.6
- A BitNet checkout at a known path or use the built-in Setup dialog to install one from scratch
Optional (for the model downloader):
pip install "bitnet-launcher[hub]"
git clone <this-repo> Bitnet_Launcher
cd Bitnet_Launcher
pip install -e ".[dev]"
python3 -m bitnet_launcher.appOpen the app, verify the default BitNet root points to your checkout, select a model, and press Chat Here or Launch in Terminal.
pip install -e ".[dev,hub]"
python3 -m bitnet_launcher.app- Click Setup in the toolbar.
- Set the BitNet root to the desired install location.
- Click Install BitNet (git clone + pip) — wait for it to complete.
- Click Build BitNet (cmake) — this compiles
llama-cli(~10 min). - Close the Setup dialog; the model list will update automatically.
- Click Models to browse and download a model from HuggingFace.
- Select a model from the list on the left.
- Adjust inference settings on the right (threads, context size, temperature).
- Click Chat Here.
- Type a message and press Enter or click Send.
- Click Stop to terminate the session.
Select a model and click Launch in Terminal. A new Windows Terminal tab
opens with llama-cli running interactively. The shell remains open after the
model exits so you can inspect output or re-run.
Click Models to open the download dialog.
- Use the tag filter (
All,official,reference,falcon,instruct, …) or the search box to narrow the list. - Click a row to see the description and size.
- Click Download Selected — progress is streamed to the log pane.
- Already-installed models show a green "Installed" status and cannot be re-downloaded.
Click Setup to open the installation dialog. Status indicators show which components are present:
| Indicator | Meaning |
|---|---|
| BitNet directory found | bitnet_root exists |
| llama-cli binary built | build/bin/llama-cli present |
| Models directory exists | models/ present |
| Python deps (huggingface_hub) | importable |
| setup_env.py present | download script present |
Use Browse to point to an existing checkout or a new empty directory, then run Install (git clone) followed by Build (cmake).
| Module | Responsibility |
|---|---|
config.py |
BitnetConfig and InferenceConfig dataclasses with DbC |
models.py |
ModelInfo dataclass and discover_models() scanner |
chat_session.py |
llama-cli stdout state machine (Qt-free) |
terminal.py |
Command building and Windows Terminal launch |
theme.py |
Catppuccin Mocha palette and Qt stylesheet |
hub.py |
HubModel catalog (16 models) and download_model() |
installer.py |
InstallStatus, check_installation(), install_bitnet(), build_bitnet() |
gui/launcher_window.py |
Top-level QMainWindow — wires all panels |
gui/model_panel.py |
Scrollable model list with selection signal |
gui/settings_panel.py |
Inference hyperparameter spinboxes |
gui/chat_panel.py |
Chat display and user-input row |
gui/hub_dialog.py |
Model catalog browser and download dialog |
gui/setup_dialog.py |
Installation status and action dialog |
# Install in editable mode with all dev and hub extras
pip install -e ".[dev,hub]"
# Lint
python3 -m ruff check src/ tests/
# Format
python3 -m ruff format src/ tests/
# Type-check
python3 -m mypy src/
# Test
python3 -m pytest tests/unit/ -q
# Run the GUI
python3 -m bitnet_launcher.app- Branch from
main; usefeat/,fix/, orchore/prefixes. - All code must pass
ruff check,ruff format --check, andpytest tests/unit/. - No
print()insrc/— uselogging. - Public functions require type annotations and DbC guards (
TypeError/ValueError) on all parameters. - GUI files (
gui/) contain only display logic; subprocess and validation logic lives in non-Qt modules. - Open a PR against
main; CI must be green before merging.