tuneweights

Documentation

Everything you need to fine-tune a model on Tuneweights.

Dataset format

Upload a JSONL file with one example per line, in the chat format:

{"messages": [{"role": "system", "content": "Classify the message."}, {"role": "user", "content": "My debit card was charged twice."}, {"role": "assistant", "content": "duplicate_transaction"}]}

Or prompt and completion pairs:

{"prompt": "My debit card was charged twice.", "completion": "duplicate_transaction"}

Or a CSV file with input and output columns, and an optional system column.

The model learns the last assistant message of each example. Everything before it is the input. Download the sample dataset, or check your file in the browser.

We hold back 10% of your examples to compare the base and fine-tuned models. The split is fixed by the content of each example, so the same file always splits the same way and copies of an example stay together. You can upload your own evaluation file instead.

Training settings

The defaults work for most classification and extraction tasks. Change them only if you have a reason to.

SettingDefaultWhat it does
MethodLoRALoRA trains small extra matrices next to the frozen model. QLoRA does the same but keeps the frozen model in 4-bit to save GPU memory.
Rank (r)16Size of the extra matrices: 8, 16, 32 or 64. Higher can learn more and costs more.
Alpha32How strongly the adapter changes the model. The change is scaled by alpha / rank, shown next to the setting.
Learning rate0.0002How big each update is. Too high and training becomes unstable; too low and it learns slowly.
Max sequence length2048Longest example, in tokens. Longer examples are rejected before training, not cut.
Epochs3How many times training goes over your data. More epochs can overfit a small dataset.

We set batch size, gradient accumulation and memory settings for you. Thinking mode is off for Qwen3, in training and in evaluation.

Evaluation

When training ends, the base model and your fine-tuned model answer the held-out examples with the same settings (temperature 0), on vLLM, the engine Portweights serves adapters on. You see exact-match accuracy, valid JSON where your answers are JSON, the average answer length, and every answer next to the expected one.

Exact match suits classification and structured output. For free-form text, read the examples rather than the score.

What you download

Use your adapter

With PEFT:

from transformers import AutoModelForCausalLM
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "./my-adapter")

With vLLM:

vllm serve Qwen/Qwen3-8B --enable-lora --lora-modules my-adapter=./my-adapter --max-lora-rank 64

Or deploy it to Portweights for a private, OpenAI-compatible API with no GPU to manage.