Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,21 +1,78 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
license: apache-2.0
|
| 9 |
language:
|
| 10 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 3 |
+
datasets:
|
| 4 |
+
- u-10bei/dbbench_sft_dataset_react
|
| 5 |
+
- u-10bei/dbbench_sft_dataset_react_v2
|
| 6 |
+
- u-10bei/dbbench_sft_dataset_react_v3
|
| 7 |
+
- u-10bei/dbbench_sft_dataset_react_v4
|
|
|
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
tags:
|
| 13 |
+
- unsloth
|
| 14 |
+
- agent
|
| 15 |
+
- tool-use
|
| 16 |
+
- alfworld
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# Qwen3-4B Agent Trajectory (v14)
|
| 20 |
+
|
| 21 |
+
This repository provides a **fully merged model** fine-tuned from **Qwen/Qwen3-4B-Instruct-2507** using Unsloth.
|
| 22 |
+
|
| 23 |
+
Unlike standard adapter repositories, this repository contains the **merged weights**, meaning you do not need to load the base model separately.
|
| 24 |
+
|
| 25 |
+
## Training Objective
|
| 26 |
+
|
| 27 |
+
This model is trained to improve **multi-turn agent task performance**
|
| 28 |
+
on ALFWorld (household tasks).
|
| 29 |
+
|
| 30 |
+
Loss is applied to **all assistant turns** in the multi-turn trajectory,
|
| 31 |
+
enabling the model to learn environment observation, action selection,
|
| 32 |
+
tool use, and recovery from errors.
|
| 33 |
+
|
| 34 |
+
## Data Processing
|
| 35 |
+
|
| 36 |
+
- Train/Validation Split: 95% / 5%
|
| 37 |
+
- Random Seed: 3407 (used for shuffling and initialization)
|
| 38 |
+
- Loss Masking: Loss was computed only on the assistant's responses. User prompts and observations were masked during training (`train_on_responses_only` was applied to `<|im_start|>assistant\n`).
|
| 39 |
+
|
| 40 |
+
## Training Configuration
|
| 41 |
+
- **Base model**: Qwen/Qwen3-4B-Instruct-2507
|
| 42 |
+
- **Method**: LoRA + Unsloth (Merged in 16-bit)
|
| 43 |
+
- **Max sequence length**: 8192
|
| 44 |
+
- **Epochs**: 1
|
| 45 |
+
- **Learning rate**: 2e-06
|
| 46 |
+
- **LoRA**: r=16, alpha=32
|
| 47 |
+
- **PER_DEVICE_TRAIN_BATCH_SIZE** = 4
|
| 48 |
+
- **GRAD_ACCUM** = 4
|
| 49 |
+
- **WARMUP_RATIO** = 0.1
|
| 50 |
+
- **WEIGHT_DECAY** = 0.05
|
| 51 |
+
- **NEFTUNE_NOISE_ALPHA** = 5.0
|
| 52 |
+
- **VAL_RATIO** = 0.05
|
| 53 |
+
|
| 54 |
+
## Usage
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 58 |
+
import torch
|
| 59 |
+
|
| 60 |
+
model_id = "choco800/qwen3-4b-agent-v14"
|
| 61 |
|
| 62 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 63 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 64 |
+
model_id,
|
| 65 |
+
torch_dtype=torch.bfloat16,
|
| 66 |
+
device_map="auto",
|
| 67 |
+
)
|
| 68 |
+
```
|
| 69 |
+
## Sources & Terms (IMPORTANT)
|
| 70 |
|
| 71 |
+
Training data:
|
| 72 |
+
- u-10bei/dbbench_sft_dataset_react (available on Hugging Face Hub)
|
| 73 |
+
- u-10bei/dbbench_sft_dataset_react_v2 (available on Hugging Face Hub)
|
| 74 |
+
- u-10bei/dbbench_sft_dataset_react_v3 (available on Hugging Face Hub)
|
| 75 |
+
- u-10bei/dbbench_sft_dataset_react_v4
|
| 76 |
|
| 77 |
+
Dataset License: MIT License. These datasets are used and distributed under the terms of the MIT License.
|
| 78 |
+
Compliance: Users must comply with the dataset licenses and the base model's original terms of use (Apache 2.0).
|