Views
No views yet
config/mcp_config.json).Yhyu13/Qwen3.5-2B-UE5-LoRA
and Yhyu13/Qwen3.5-4B-UE5-LoRA.
The training tooling, data and benchmark live in the parent project:
Yhyu13/UE5_Training_MCP.| Item | Value |
|---|---|
| Base model | Qwen/Qwen3.5-4B |
| PEFT type | LoRA (rank 16, α 32, dropout 0.05) |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Task | CAUSAL_LM (tool-call text generation) |
| Training data | data/splits/train.jsonl of Yhyu13/UE5_Training_MCP (a small UE5 corpus bundled with the training repo; not published as a separate HF dataset) (108 examples) |
| Eval data | data/splits/val.jsonl (13 examples) |
| Max seq length | 512 |
| Epochs | 3 |
| Effective batch size | 8 (per_device 4 × grad_accum 2) |
| Learning rate | 3e-4 |
| Wall-clock training | 592.3s on 1×CUDA 12.1 |
| Train framework | PEFT 0.19.1 · Transformers 5.14.1 · TRL 0.26.2 · Torch 2.5.1+cu121 |
| Adapter size | 81.0 MB (adapter_model.safetensors) |
| Eval loss (val) | 0.5216 |
peft + transformers. From the base model + adapter:1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5BASE = "Qwen/Qwen3.5-4B"
6ADAPTER = "Yhyu13/Qwen3.5-4B-UE5-LoRA"
7
8tok = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
9model = AutoModelForCausalLM.from_pretrained(
10 BASE, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
11)
12model = PeftModel.from_pretrained(model, ADAPTER)
13model.eval()
14
15# See Yhyu13/UE5_Training_MCP/eval/benchmark_questions.jsonl for prompt format.
16prompt = open("eval/example_prompt.txt").read()
17inputs = tok(prompt, return_tensors="pt").to(model.device)
18out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
19print(tok.decode(out[0], skip_special_tokens=True))1ADAPTER = "Yhyu13/Qwen3.5-4B-UE5-LoRA"
2tok = AutoTokenizer.from_pretrained(ADAPTER, trust_remote_code=True)
3print(tok.chat_template[:200], "...") # matches the adapter's training chat templateYhyu13/UE5_Training_MCP:1git clone https://huggingface.co/Yhyu13/UE5_Training_MCP
2cd UE5_Training_MCP
3python -m venv .venv && . .venv/bin/activate
4pip install -r requirements.txt
5python scripts/train_qwen35.py \
6 --base_model Qwen/Qwen3.5-4B \
7 --train data/splits/train.jsonl \
8 --val data/splits/val.jsonl \
9 --out outputs/models/qwen3.5-4b-ue5-loratrain_meta.json (bundled in this repo).final_eval.json records the validation loss after the third epoch. The full
side-by-side benchmark (base vs. fine-tuned, tool-call exact-match rate, JSON
schema conformance, and lm_eval results) lives in
Yhyu13/UE5_Training_MCP/outputs/results/.cmd_*), Blueprint→Python
(py_*), and the introspection tools declared in the bundled
config/mcp_config.json.