How it works
Tunewerk is a pure browser application. The website only delivers the program code. Everything else happens on your device.
1. Computing on your GPU (WebGPU)
Through your browser’s WebGPU interface, Tunewerk uses your graphics card directly. The model is implemented as a transformer decoder in TensorFlow.js and runs in its own web worker, so the interface stays responsive. Without WebGPU, Tunewerk falls back to WebGL or the CPU. That works, but it is much slower.
2. QLoRA & LoRA – efficient fine-tuning
Instead of updating every weight, Tunewerk trains small low-rank matrices (LoRA) that are added to the projections of the attention and MLP layers. Usually only a few percent of the parameters are trainable, which cuts memory use sharply and leaves the base model untouched. By default Tunewerk uses QLoRA: the frozen weights are quantized to 4-bit NormalFloat (blocks of 64 with one scale each) and dequantized on the fly by a custom WebGPU shader, which cuts the memory for the base model by about 8×. Optimization uses Adam, learning-rate warmup, a cosine or linear schedule, gradient accumulation and gradient clipping; the cross-entropy is computed in vocabulary chunks so even 250k-token vocabularies fit. QLoRA vs. LoRA explained.
3. Datasets
Supported inputs:
- Hugging Face datasets – loaded via the public Dataset Viewer API (up to 10,000 rows).
- Your own files – .jsonl, .json, .csv, .tsv or .txt.
- Formats – Alpaca (instruction/input/output), prompt/completion, question/answer, chat (messages or conversations) and plain text.
{"instruction": "Summarize: ...", "output": "..."}
{"messages": [{"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi!"}]}
{"text": "Any free text for continued pretraining"}4. Export
- LoRA adapter (PEFT) –
adapter_model.safetensors+adapter_config.json, only a few MB. - Merged model – the adapter is merged into the original full-precision checkpoint (same shards, names and dtype), ready for
transformers, vLLM or GGUF conversion. - Hugging Face Hub – upload to a (private) repository with your own access token, including a model card.
System requirements
- Chrome or Edge 113 or later (desktop), Safari 26+, or Firefox with WebGPU enabled.
- With QLoRA: models up to 1B parameters run with about 2–4 GB of GPU memory, 2–4B models need about 6–8 GB.
- Enough RAM and browser storage (models are cached locally).