choco800 commited on
Commit
3fc0ea7
·
verified ·
1 Parent(s): 1a6b1e2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +66 -12
README.md CHANGED
@@ -1,21 +1,75 @@
1
  ---
2
  base_model: Qwen/Qwen3-4B-Instruct-2507
3
- tags:
4
- - text-generation-inference
5
- - transformers
6
- - unsloth
7
- - qwen3
8
- license: apache-2.0
9
  language:
10
  - en
 
 
 
 
 
 
 
 
11
  ---
12
 
13
- # Uploaded finetuned model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- - **Developed by:** choco800
16
- - **License:** apache-2.0
17
- - **Finetuned from model :** Qwen/Qwen3-4B-Instruct-2507
 
 
 
 
 
18
 
19
- This qwen3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
 
 
20
 
21
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
1
  ---
2
  base_model: Qwen/Qwen3-4B-Instruct-2507
3
+ datasets:
4
+ - u-10bei/sft_alfworld_trajectory_dataset_v3
5
+ - u-10bei/dbbench_sft_dataset_react_v4
 
 
 
6
  language:
7
  - en
8
+ license: apache-2.0
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - unsloth
12
+ - agent
13
+ - tool-use
14
+ - alfworld
15
+ - dbbench
16
  ---
17
 
18
+ # Qwen3-4B Agent Trajectory (v4)
19
+
20
+ This repository provides a **fully merged model** fine-tuned from **Qwen/Qwen3-4B-Instruct-2507** using Unsloth.
21
+
22
+ Unlike standard adapter repositories, this repository contains the **merged weights**, meaning you do not need to load the base model separately.
23
+
24
+ ## Training Objective
25
+
26
+ This model is trained to improve **multi-turn agent task performance**
27
+ on ALFWorld (household tasks) and DBBench (database operations).
28
+
29
+ Loss is applied to **all assistant turns** in the multi-turn trajectory,
30
+ enabling the model to learn environment observation, action selection,
31
+ tool use, and recovery from errors.
32
+
33
+ ## Data Processing
34
+
35
+ - Train/Validation Split: 95% / 5%
36
+ - Random Seed: 3407 (used for shuffling and initialization)
37
+ - 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`).
38
+
39
+ ## Training Configuration
40
+ - **Base model**: Qwen/Qwen3-4B-Instruct-2507
41
+ - **Method**: LoRA + Unsloth (Merged in 16-bit)
42
+ - **Max sequence length**: 8192
43
+ - **Epochs**: 1
44
+ - **Learning rate**: 1e-05
45
+ - **LoRA**: r=16, alpha=32
46
+ - **PER_DEVICE_TRAIN_BATCH_SIZE** = 8
47
+ - **GRAD_ACCUM** = 2
48
+ - **WARMUP_RATIO** = 0.1
49
+ - **WEIGHT_DECAY** = 0.05
50
+ - **NEFTUNE_NOISE_ALPHA** = 5.0
51
+ - **VAL_RATIO** = 0.05
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from transformers import AutoModelForCausalLM, AutoTokenizer
57
+ import torch
58
+
59
+ model_id = "choco800/qwen3-4b-agent-v4"
60
 
61
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
62
+ model = AutoModelForCausalLM.from_pretrained(
63
+ model_id,
64
+ torch_dtype=torch.bfloat16,
65
+ device_map="auto",
66
+ )
67
+ ```
68
+ ## Sources & Terms (IMPORTANT)
69
 
70
+ Training data:
71
+ - u-10bei/sft_alfworld_trajectory_dataset_v3
72
+ - u-10bei/dbbench_sft_dataset_react_v4
73
 
74
+ Dataset License: MIT License. These datasets are used and distributed under the terms of the MIT License.
75
+ Compliance: Users must comply with the dataset licenses and the base model's original terms of use (Apache 2.0).