qwen2.5-7b-agent-trajectory-lora

This repository provides a LoRA adapter fine-tuned from Qwen/Qwen2.5-7B-Instruct using LoRA + Unsloth. This adapter is specifically optimized for high-performance autonomous agents that balance spatial efficiency and logical reasoning.

Training Objective

This adapter is trained to improve multi-turn agent task performance across two distinct domains:

  1. ALFWorld (Physical Commonsense): Focuses on efficient household task completion with minimal redundant exploration.
  2. DBBench (Logical Reasoning): Focuses on accurate SQL generation and autonomous error recovery using the ReAct framework.

Dataset Processing (Multi-Domain Strategy)

To overcome the "repetitive loop" issue common in 7B-class models, we employed a Mixed Expert Dataset approach:

1. ALFWorld: Efficiency Filtering

To instill a "shortest path" instinct, we strictly filtered the ALFWorld v5 dataset:

  • Selected Detours: Only success trajectories with 0, 1, 2, or 3 detours were retained.
  • Goal: Eliminate "brain-dead loops" while maintaining the ability to recover from minor exploration failures.

2. DBBench v4: Logical Debugging

We integrated the ReAct-based DBBench v4 dataset to enhance the model's "mental resilience":

  • Self-Correction: Learns to use DESCRIBE and error messages to fix incorrect SQL queries.
  • Synergy: The logical discipline of database operations helps reduce irrational "fidgeting" actions in physical tasks.

Training Configuration

  • Base model: Qwen/Qwen2.5-7B-Instruct
  • Method: LoRA (Unsloth optimized)
  • Max sequence length: 2048
  • Epochs: 2
  • Learning rate: 2e-06
  • LoRA Config: r=64, alpha=128, target_modules=all_linears

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base = "Qwen/Qwen2.5-7B-Instruct"
adapter = "your_id/your-repo"

tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
    base,
    torch_dtype=torch.float16,
    device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)

Sources & Terms (IMPORTANT)

Training data ALFWorld Data: u-10bei/sft_alfworld_trajectory_dataset_v5 DBBench Data: u-10bei/dbbench_sft_dataset_react_v4

Dataset License: MIT License. This dataset is used and distributed under the terms of the MIT License. Compliance: Users must comply with the MIT license (including copyright notice) and the base model's original terms of use.

Downloads last month
-
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for naru0411/LLM-Competition-advanced-004

Base model

Qwen/Qwen2.5-7B
Adapter
(1161)
this model

Datasets used to train naru0411/LLM-Competition-advanced-004