qwen3-4b-alfworld-adv46-mix1024-lr2e6
This repository provides a merged model fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using LoRA + Unsloth.
The LoRA adapter has been merged into the base model. This repository contains the full merged model weights.
Training Objective
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.
Training Configuration
- Base model: Qwen/Qwen3-4B-Instruct-2507
- Method: LoRA (full precision base)
- Max sequence length: 1024
- Epochs: 1
- Learning rate: 2e-6
- Warmup ratio: 0.05
- LoRA: r=64, alpha=64
- Target modules: up_proj, q_proj
Usage
With vLLM (Recommended for Docker Environment)
from vllm import LLM, SamplingParams
model = LLM(
model="kevineen/qwen3-4b-alfworld-adv46-mix1024-lr2e6",
max_model_len=8192,
gpu_memory_utilization=0.95,
)
prompts = [
"Your task is to: put a clean lettuce leaf in the fridge.",
# ... more prompts
]
sampling_params = SamplingParams(temperature=0.0, max_tokens=512)
outputs = model.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
With Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "kevineen/qwen3-4b-alfworld-adv46-mix1024-lr2e6"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# Inference
messages = [{"role": "user", "content": "Your task here"}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
Sources & Terms (IMPORTANT)
Training data: ALFWorld + DBBench mixed dataset
Datasets:
- u-10bei/sft_alfworld_trajectory_dataset_v5
- 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
- 2
Model tree for kevineen/qwen3-4b-alfworld-adv46-mix1024-lr2e6
Base model
Qwen/Qwen3-4B-Instruct-2507