u-10bei/sft_alfworld_trajectory_dataset_v5
Viewer • Updated • 2.5k • 97
How to use tomoniyukiwo/qwen25_7b_agentbench_lora_trained with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
model = PeftModel.from_pretrained(base_model, "tomoniyukiwo/qwen25_7b_agentbench_lora_trained")This repository provides a LoRA adapter fine-tuned from Qwen/Qwen2.5-7B-Instruct using LoRA + Unsloth + Single-Phase Training.
Note: This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is trained to improve multi-turn agent task performance on ALFWorld (household tasks) and DBBench (database operations).
Loss is applied to all assistant turns in the multi-turn trajectory, enabling the model to learn environment observation, action selection, tool use, and recovery from errors.
| Phase | Data | Epochs | LR | Purpose |
|---|
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Method | QLoRA (base + FP16 LoRA) |
| LoRA R / Alpha | 64 / 128 |
| RSLoRA | Enabled |
| Max seq length | 4096 |
| Optimizer | adamw_8bit |
| Gradient clip | 1.0 |
| LR scheduler | Cosine with warmup |
| Phase | Final Train Loss | Time |
|---|---|---|
| Total | 1.2h |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen2.5-7B-Instruct"
adapter = "tomoniyukiwo/qwen25_7b_agentbench_lora_trained"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="tomoniyukiwo/qwen25_7b_agentbench_lora_trained",
max_seq_length=4096,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)