This project now supports a public one-click button in the UI:
⚡ Add Qwen2.5 8k Preset (Hosted)
It injects a hosted custom model record and adds it to the registry automatically.
The preset is wired to:
- Model root:
https://huggingface.co/Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192 - Model lib:
https://huggingface.co/Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192/resolve/main/Qwen2.5-1.5B-Instruct-q4f16_1-ctx8192_cs1024-webgpu.wasm
- Create a local virtualenv and install uploader dependency:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade huggingface_hub- Set token (write access to your model repo):
export HF_TOKEN=hf_xxx- Dry-run validation:
source .venv/bin/activate
python scripts/upload_ctx8192_model_to_hf.py --dry-run- Upload:
source .venv/bin/activate
python scripts/upload_ctx8192_model_to_hf.py \
--repo-id Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192- On Hugging Face, set the model repo visibility to Public (required for anonymous browser users).
If you press Ctrl+C during upload, no problem. Just rerun with the resumable CLI flow:
source .venv/bin/activate
export HF_HUB_DISABLE_XET=1
# Upload model folder (resumable)
hf upload-large-folder \
Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192 \
local-model-host/qwen2.5-1.5b-ctx8192-local/resolve/main \
--repo-type model \
--num-workers 4
# Upload wasm artifact
hf upload \
Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192 \
jobtracker-mlc-lab-worktree/.mlc-build/artifacts/Qwen2.5-1.5B-Instruct-q4f16_1-ctx8192_cs1024-webgpu-src-tvm.wasm \
Qwen2.5-1.5B-Instruct-q4f16_1-ctx8192_cs1024-webgpu.wasm \
--repo-type modelVerify with:
curl -I https://huggingface.co/Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192/resolve/main/mlc-chat-config.json
curl -I https://huggingface.co/Ar5en1c/Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192/resolve/main/Qwen2.5-1.5B-Instruct-q4f16_1-ctx8192_cs1024-webgpu.wasmBoth should return HTTP/2 200.
You can override the preset without editing JS by defining window.WEBLLM_BENCH_PRESETS before loading bench.js.
Add this near the bottom of bench.html (before <script src="bench.js"></script>):
<script>
window.WEBLLM_BENCH_PRESETS = {
qwen25_15b_ctx8192_hf: {
model: "https://huggingface.co/<owner>/<repo>",
model_id: "Qwen2.5-1.5B-Instruct-q4f16_1-MLC-ctx8192-<owner>",
model_lib: "https://huggingface.co/<owner>/<repo>/resolve/main/Qwen2.5-1.5B-Instruct-q4f16_1-ctx8192_cs1024-webgpu.wasm",
overrides: { context_window_size: 8192, prefill_chunk_size: 1024 },
vram_required_MB: 2000
}
};
</script>After upload, users can:
- Open the app.
- Expand
Add Custom Model. - Click
⚡ Add Qwen2.5 8k Preset (Hosted). - Use that model directly in Bench/Chat/Compare.