Upload LoRA adapter v3
Browse files- README.md +14 -40
- adapter_config.json +17 -5
- adapter_model.safetensors +1 -1
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -1,72 +1,46 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 3 |
datasets:
|
| 4 |
-
- u-10bei/
|
| 5 |
-
- u-10bei/sft_alfworld_trajectory_dataset_v2
|
| 6 |
-
- u-10bei/sft_alfworld_trajectory_dataset_v3
|
| 7 |
-
- u-10bei/sft_alfworld_trajectory_dataset_v5
|
| 8 |
-
- u-10bei/dbbench_sft_dataset_react_v4
|
| 9 |
language:
|
| 10 |
- en
|
| 11 |
license: apache-2.0
|
| 12 |
library_name: peft
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
tags:
|
|
|
|
| 15 |
- lora
|
| 16 |
-
-
|
| 17 |
-
- tool-use
|
| 18 |
-
- alfworld
|
| 19 |
-
- dbbench
|
| 20 |
---
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
This repository provides a **LoRA adapter** fine-tuned from
|
| 25 |
-
**Qwen/Qwen3-4B-Instruct-2507** using **
|
| 26 |
|
| 27 |
This repository contains **LoRA adapter weights only**.
|
| 28 |
The base model must be loaded separately.
|
| 29 |
|
| 30 |
## Training Objective
|
| 31 |
|
| 32 |
-
This adapter is trained to improve **
|
| 33 |
-
|
| 34 |
|
| 35 |
-
Loss is applied to
|
| 36 |
-
|
| 37 |
-
tool use, and recovery from errors.
|
| 38 |
|
| 39 |
## Training Configuration
|
| 40 |
|
| 41 |
- Base model: Qwen/Qwen3-4B-Instruct-2507
|
| 42 |
-
- Method:
|
| 43 |
- Max sequence length: 2048
|
| 44 |
- Epochs: 3
|
| 45 |
-
- Learning rate: 2e-
|
| 46 |
- LoRA: r=64, alpha=128
|
| 47 |
|
| 48 |
-
## Usage
|
| 49 |
-
|
| 50 |
-
```python
|
| 51 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 52 |
-
from peft import PeftModel
|
| 53 |
-
import torch
|
| 54 |
-
|
| 55 |
-
base = "Qwen/Qwen3-4B-Instruct-2507"
|
| 56 |
-
adapter = "your_id/your-repo"
|
| 57 |
-
|
| 58 |
-
tokenizer = AutoTokenizer.from_pretrained(base)
|
| 59 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 60 |
-
base,
|
| 61 |
-
torch_dtype=torch.float16,
|
| 62 |
-
device_map="auto",
|
| 63 |
-
)
|
| 64 |
-
model = PeftModel.from_pretrained(model, adapter)
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
## Sources & Terms (IMPORTANT)
|
| 68 |
|
| 69 |
-
Training data: u-10bei/
|
| 70 |
|
| 71 |
-
Dataset License: MIT License.
|
| 72 |
-
Compliance: Users must comply with the MIT license
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 3 |
datasets:
|
| 4 |
+
- u-10bei/structured_data_with_cot_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
license: apache-2.0
|
| 8 |
library_name: peft
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
tags:
|
| 11 |
+
- qlora
|
| 12 |
- lora
|
| 13 |
+
- structured-output
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
+
<clean version 3>
|
| 17 |
|
| 18 |
This repository provides a **LoRA adapter** fine-tuned from
|
| 19 |
+
**Qwen/Qwen3-4B-Instruct-2507** using **QLoRA (4-bit, Unsloth)**.
|
| 20 |
|
| 21 |
This repository contains **LoRA adapter weights only**.
|
| 22 |
The base model must be loaded separately.
|
| 23 |
|
| 24 |
## Training Objective
|
| 25 |
|
| 26 |
+
This adapter is trained to improve **structured output accuracy**
|
| 27 |
+
(JSON / YAML / XML / TOML / CSV).
|
| 28 |
|
| 29 |
+
Loss is applied only to the final assistant output,
|
| 30 |
+
while intermediate reasoning (Chain-of-Thought) is masked.
|
|
|
|
| 31 |
|
| 32 |
## Training Configuration
|
| 33 |
|
| 34 |
- Base model: Qwen/Qwen3-4B-Instruct-2507
|
| 35 |
+
- Method: QLoRA (4-bit)
|
| 36 |
- Max sequence length: 2048
|
| 37 |
- Epochs: 3
|
| 38 |
+
- Learning rate: 2e-06
|
| 39 |
- LoRA: r=64, alpha=128
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
## Sources & Terms (IMPORTANT)
|
| 42 |
|
| 43 |
+
Training data: u-10bei/structured_data_with_cot_dataset
|
| 44 |
|
| 45 |
+
Dataset License: MIT License.
|
| 46 |
+
Compliance: Users must comply with the MIT license and the base model's original terms of use.
|
adapter_config.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"alpha_pattern": {},
|
|
|
|
| 3 |
"auto_mapping": {
|
| 4 |
"base_model_class": "Qwen3ForCausalLM",
|
| 5 |
"parent_library": "transformers.models.qwen3.modeling_qwen3",
|
| 6 |
"unsloth_fixed": true
|
| 7 |
},
|
| 8 |
-
"base_model_name_or_path": "unsloth/
|
| 9 |
"bias": "none",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"fan_in_fan_out": false,
|
| 11 |
"inference_mode": true,
|
| 12 |
"init_lora_weights": true,
|
|
@@ -15,24 +21,30 @@
|
|
| 15 |
"layers_to_transform": null,
|
| 16 |
"loftq_config": {},
|
| 17 |
"lora_alpha": 128,
|
| 18 |
-
"
|
|
|
|
| 19 |
"megatron_config": null,
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
"modules_to_save": null,
|
| 22 |
"peft_type": "LORA",
|
|
|
|
|
|
|
| 23 |
"r": 64,
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
-
"
|
| 28 |
"k_proj",
|
|
|
|
|
|
|
| 29 |
"up_proj",
|
| 30 |
"down_proj",
|
| 31 |
-
"o_proj",
|
| 32 |
-
"q_proj",
|
| 33 |
"v_proj"
|
| 34 |
],
|
|
|
|
| 35 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 36 |
"use_dora": false,
|
|
|
|
| 37 |
"use_rslora": false
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
"auto_mapping": {
|
| 6 |
"base_model_class": "Qwen3ForCausalLM",
|
| 7 |
"parent_library": "transformers.models.qwen3.modeling_qwen3",
|
| 8 |
"unsloth_fixed": true
|
| 9 |
},
|
| 10 |
+
"base_model_name_or_path": "unsloth/qwen3-4b-instruct-2507-unsloth-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
+
"corda_config": null,
|
| 13 |
+
"ensure_weight_tying": false,
|
| 14 |
+
"eva_config": null,
|
| 15 |
+
"exclude_modules": null,
|
| 16 |
"fan_in_fan_out": false,
|
| 17 |
"inference_mode": true,
|
| 18 |
"init_lora_weights": true,
|
|
|
|
| 21 |
"layers_to_transform": null,
|
| 22 |
"loftq_config": {},
|
| 23 |
"lora_alpha": 128,
|
| 24 |
+
"lora_bias": false,
|
| 25 |
+
"lora_dropout": 0.04,
|
| 26 |
"megatron_config": null,
|
| 27 |
"megatron_core": "megatron.core",
|
| 28 |
"modules_to_save": null,
|
| 29 |
"peft_type": "LORA",
|
| 30 |
+
"peft_version": "0.18.1",
|
| 31 |
+
"qalora_group_size": 16,
|
| 32 |
"r": 64,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
+
"q_proj",
|
| 37 |
"k_proj",
|
| 38 |
+
"gate_proj",
|
| 39 |
+
"o_proj",
|
| 40 |
"up_proj",
|
| 41 |
"down_proj",
|
|
|
|
|
|
|
| 42 |
"v_proj"
|
| 43 |
],
|
| 44 |
+
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
| 46 |
+
"trainable_token_indices": null,
|
| 47 |
"use_dora": false,
|
| 48 |
+
"use_qalora": false,
|
| 49 |
"use_rslora": false
|
| 50 |
}
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 528550256
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41548c2466e91a4d418f5c3e23726adb53510fa1ab23fcb14d019e05e95e16a6
|
| 3 |
size 528550256
|
tokenizer_config.json
CHANGED
|
@@ -233,7 +233,7 @@
|
|
| 233 |
"extra_special_tokens": {},
|
| 234 |
"model_max_length": 262144,
|
| 235 |
"pad_token": "<|vision_pad|>",
|
| 236 |
-
"padding_side": "
|
| 237 |
"split_special_tokens": false,
|
| 238 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 239 |
"unk_token": null
|
|
|
|
| 233 |
"extra_special_tokens": {},
|
| 234 |
"model_max_length": 262144,
|
| 235 |
"pad_token": "<|vision_pad|>",
|
| 236 |
+
"padding_side": "right",
|
| 237 |
"split_special_tokens": false,
|
| 238 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 239 |
"unk_token": null
|