Downloads · 30 days
0
kuririrn/qwen3-4b-agent-trajectory-lora-sft_multi_dpo
qwen3-4b-agent-trajectory-lora-sft_multi_dpo is a text generation model from kuririrn. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using LoRA + DPO (Direct Preference Optimization).
Downloads · 30 days
0
Access
Public
Updated Mar 1, 2026
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using LoRA + DPO (Direct Preference Optimization).
The adapter is trained on top of an existing SFT adapter:
This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is optimized to improve multi-step agent behavior in ALFWorld-style environments by learning from pairwise preferences:
The main targeted failure modes include:
Action loops Repeatedly selecting exactly the same action without progress.
Premature task success Outputting "ACTION: task succeeded" before the goal is actually achieved.
Irrelevant exploration Searching in locations that are implausible for the target object (for example, looking for a kitchen tool in a bathroom sink).
Note: DPO training is performed on top of a merged SFT model. Details of the SFT training and data are documented in the model card of kuririrn/qwen3-4b-agent-trajectory_dpo_v1_merged.
The starting point for this DPO adapter is an SFT-trained adapter:
Please refer to its model card for detailed information about the supervised fine-tuning data and configuration.
This dataset provides round-wise DPO samples with fields:
The DPO loss is computed only on the next turn (chosen vs rejected) conditioned on the same messages history.
The model is used as an environment-interacting agent. A typical prompt is constructed as a chat-style conversation:
Actions are emitted as a single line:
Examples:
ACTION: go to countertop 1
ACTION: take apple 1 from countertop 1
ACTION: open drawer 2
ACTION: task succeeded
Internally, the DPO data normalizes historical tags such as "Act:" and "Think:" to "ACTION:" and "THOUGHT:" to align with the evaluation environment and reduce errors caused by format mismatch.
Below is a minimal example for loading the adapter on top of the base model using transformers and peft (shown as plain text for safety in this README):
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "your_username/your_dpo_repo"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
# Now you can generate actions conditioned on the environment history.
Please make sure that your usage of this adapter and any associated dataset complies with:
If you build your own DPO dataset or modify the training setup, please update this README accordingly to reflect the changes.