In active development: interfaces change without notice, and it is not meant for production.
A web page for X-Forge: pick a model, press Start, and watch X-Forge find the kernels the model spends its time in, optimize them and prove the speed-up in the model, on an Intel GPU or on the CPU.
1. Install (Python 3.11 or newer):
git clone https://github.com/IntelLabs/X-Forge-UI.git
cd X-Forge-UI
python3 -m venv .venv && source .venv/bin/activate
pip install -e .2. See it work, no GPU needed:
python -m xe_forge_ui.mockOpen the link it prints (http://127.0.0.1:8766/api/login?token=...). Then:
- Click Optimize a model.
- Under What it is, pick Image / video model and type
Wan-AI/Wan2.2-TI2V-5B-Diffusersas the model. - Press Start. Every step plays out in about 30 seconds.
- Click Look at them to see the video before and after the patches.
Nothing is measured or run for real, and no agent is called; everything stays under /tmp. (On a remote machine, tunnel port 8766 as shown below.)
3. Run it for real. You need three things:
- An X-Forge checkout:
git clone https://github.com/IntelLabs/X-Forge.git - Claude Code (the
claudecommand), which X-Forge's agents run in, and your API key in~/.xe_forge_ui/secrets.env(ANTHROPIC_API_KEY=..., thenchmod 600it) - An Intel GPU, or a CPU, on this machine or through Slurm
xe-forge-ui --x-forge-root ../X-Forge --saveOpen the link it prints, click Optimize a model, type a model (for example Qwen/Qwen2.5-0.5B-Instruct), choose where it runs, and press Start. Before you can start, the page checks everything a run needs and says what to fix. The first run also installs X-Forge's own environment and the serving framework, which can take a while; later runs reuse them.
On a remote machine or cluster, keep the UI on localhost (it starts jobs as you) and tunnel to it:
ssh -L 8765:127.0.0.1:8765 <host> # then open the printed link on your own machine- Optimize a whole model. Text models on vLLM, SGLang, llama.cpp, OpenVINO, or the native engine X-Forge writes for the model. Image and video models on vLLM-Omni: start from an image, or from a frame you pick in a video you upload, and compare the output with and without the patches side by side. Robot policies (RLDX-1). Stop a run at any time and continue it later.
- Run on an Intel GPU or on the CPU. A CPU run is profiled with perf, pinned to the cores you choose (one socket, the whole machine, or your own
numactl/taskset), and sized against the machine's memory. - Optimize a single kernel. Pick one by name, start from a template, point at existing files or paste code.
- Watch runs live. Steps, kernels, trial tree, speed-up chart, profiles, the agents' sessions and the kernel sources.
- Browse kernels and templates your X-Forge checkout knows about, and the best result each kernel reached.
The UI only reads the files X-Forge writes and starts python -m x_forge.cli. It never imports X-Forge, so it can live in its own environment.
xe-forge-ui --x-forge-root /path/to/X-Forge --save # or: python -m xe_forge_ui ...The link it prints carries a sign-in token that is new each time the UI starts, so other users of a shared machine cannot drive your UI.
| Flag | Default | Meaning |
|---|---|---|
--x-forge-root (or --xe-forge-root) |
saved setting, then $X_FORGE_ROOT, then the current directory |
The X-Forge checkout |
--save |
off | Remember the root so later starts can omit it |
--host |
127.0.0.1 |
Bind address. Keep it on localhost and use an SSH tunnel |
--port |
8765 |
Port |
Optional: Slurm (sbatch, squeue, sinfo) on PATH to run jobs through Slurm; Node.js 20 or newer only to rebuild the page (it ships built). An X-Forge checkout from before its rename from Xe-Forge is refused: update it.
python -m xe_forge_ui.mock serves the UI against a stand-in for X-Forge: every stage of a run (framework patch, capture, naming, analysis, optimization with trials and profiles, prove, outputs) plays out in a few seconds, with made-up numbers in X-Forge's file formats. Your own settings and runs are not touched. It installs the real Metrics Library into its own directory when it can (that needs git, cmake, g++ and the network). With an X-Forge checkout beside this one, every command line a job runs is first parsed by X-Forge's own argument parser, so what the mock accepts, X-Forge accepts. The GIF above was recorded from it.
Settings are stored in ~/.xe_forge_ui/config.yaml. Set $X_FORGE_UI_HOME to use a different directory ($XE_FORGE_UI_HOME is still read, but never passed to a job: X-Forge refuses to start while any XE_FORGE_* variable is set). Saved settings that mention $XE_FORGE_ROOT or $XE_FORGE_DSL are read as $X_FORGE_ROOT and $X_FORGE_DSL. You can edit everything on the Settings page, and anything that applies to more than one run belongs there:
python: the interpreter that runs X-Forgeruns_dir: where every run launched from the UI is stored (default~/.xe_forge_ui/runs)cache_dir: X-Forge's cache of calibrations and converted modelsframeworks: the serving stacks a model can be profiled in, each a ready-made environment (python, optionalreference_python,calibration,env_setup)kernel_repos_dir: one directory holding the kernel repositories;kernel_repos: named repositories for single-kernel runstools:claude_bin,unitrace_bintargets: where jobs run, each with ascheduler(noneorslurm), cards or partition, time limit and#SBATCHdirectivesenv_setup: shell lines sourced before every job (venv, oneAPI, device selector). Each target and framework can add its own.agent: turn limits and timeouts; empty leaves X-Forge's defaultshuggingface: the search endpoint (a mirror works), result count and task filterdefaults: what a run uses when you say nothing (target, framework, batch, token counts, how many kernels, fuse, prove, ...)scan_roots: other directories to show runs from; the Import button on the Runs page adds to it
Credentials stay out of all of this. Put them (ANTHROPIC_*, HF_TOKEN, ...) in the file env_file names (default ~/.xe_forge_ui/secrets.env, chmod 600). Each job script sources it; its contents never reach the config or a run directory.
A site's toolchain goes in env_setup, for example:
set +u
[ -f "$X_FORGE_ROOT/.venv/bin/activate" ] && source "$X_FORGE_ROOT/.venv/bin/activate"
source /path/to/intel_gpu_vars.sh
set -u
export ONEAPI_DEVICE_SELECTOR=level_zero:gpu<runs_dir>/<id>/
job.json what was asked for, and one entry per attempt
workspace/ X-Forge's output
repos/ a model run's own checkouts of the kernel repositories
attempts/NN/ launch.sh, stdout.log, markers, and the logs and results an attempt replaced
Continue starts a new attempt in the same directory, using the commands X-Forge already has:
- Finished capture and naming are kept. With a finished manifest, only the kernels that are left run (
xe-forge optimize). - A step that was interrupted starts that step over; X-Forge cannot pick up inside an agent session.
- With fusion or prove on,
xe-forge runis needed and it asks the inputs agent again, so a finished kernel may run again if the agent picks other shapes. The UI says so before you confirm. - Fusion and prove steps that did not finish are repeated.
Frontend (React + Vite + Tailwind, in frontend/):
cd frontend
npm install
npm run dev # dev server on :5173, proxies /api to a running xe-forge-ui on :8765
# sign in by opening the printed link with :5173 as the port
npm run build # writes the bundle into ../xe_forge_ui/staticTests:
pip install -e ".[test]"
pytestThe tests replace X-Forge with a fake interpreter, so they need neither a GPU nor X-Forge.
The API docs are served at http://127.0.0.1:8765/api/docs.
See CONTRIBUTING.md: contributions are welcome, signed off under the Developer Certificate of Origin. Please report security issues as SECURITY.md describes.
X-Forge-UI is licensed under the Apache License 2.0.


