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.
| Setting | Default | What it does |
|---|---|---|
| Method | LoRA | LoRA 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) | 16 | Size of the extra matrices: 8, 16, 32 or 64. Higher can learn more and costs more. |
| Alpha | 32 | How strongly the adapter changes the model. The change is scaled by alpha / rank, shown next to the setting. |
| Learning rate | 0.0002 | How big each update is. Too high and training becomes unstable; too low and it learns slowly. |
| Max sequence length | 2048 | Longest example, in tokens. Longer examples are rejected before training, not cut. |
| Epochs | 3 | How 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
adapter_model.safetensors: the trained adapter weightsadapter_config.json: the adapter configurationtraining_config.json: every setting needed to repeat the runevaluation_results.csv: base and fine-tuned answers for each held-out exampleREADME.md: how to load and use the adapter
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.