Update README.md
Browse files
README.md
CHANGED
|
@@ -13,53 +13,40 @@ tags:
|
|
| 13 |
- structured-output
|
| 14 |
---
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
This repository provides a
|
| 19 |
-
**unsloth/Qwen3-4B-Instruct-2507** using **QLoRA (4-bit, Unsloth)**.
|
| 20 |
|
| 21 |
-
This repository contains
|
| 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 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
- LoRA: r=16, alpha=32
|
| 40 |
|
| 41 |
## Usage
|
| 42 |
-
|
| 43 |
-
```python
|
| 44 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 45 |
from peft import PeftModel
|
| 46 |
import torch
|
| 47 |
|
| 48 |
base = "unsloth/Qwen3-4B-Instruct-2507"
|
| 49 |
-
adapter = "
|
| 50 |
|
| 51 |
-
tokenizer = AutoTokenizer.from_pretrained(base)
|
| 52 |
model = AutoModelForCausalLM.from_pretrained(
|
| 53 |
base,
|
| 54 |
torch_dtype=torch.float16,
|
| 55 |
device_map="auto",
|
|
|
|
| 56 |
)
|
| 57 |
model = PeftModel.from_pretrained(model, adapter)
|
| 58 |
-
```
|
| 59 |
|
| 60 |
## Sources & Terms (IMPORTANT)
|
| 61 |
-
|
| 62 |
Training data: u-10bei/structured_data_with_cot_dataset_512_v5
|
| 63 |
-
|
| 64 |
-
Dataset License: MIT License. This dataset is used and distributed under the terms of the MIT License.
|
| 65 |
-
Compliance: Users must comply with the MIT license (including copyright notice) and the base model's original terms of use.
|
|
|
|
| 13 |
- structured-output
|
| 14 |
---
|
| 15 |
|
| 16 |
+
LoRA adapter Repo ID: Mani124124/structeval-lora
|
| 17 |
+
Base model ID used for training: unsloth/Qwen3-4B-Instruct-2507
|
| 18 |
|
| 19 |
+
This repository provides a LoRA adapter fine-tuned from unsloth/Qwen3-4B-Instruct-2507.
|
|
|
|
| 20 |
|
| 21 |
+
This repository contains LoRA adapter weights only. The base model must be loaded separately.
|
|
|
|
| 22 |
|
| 23 |
## Training Objective
|
| 24 |
+
This adapter is trained to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## Training Configuration
|
| 27 |
+
Base model: unsloth/Qwen3-4B-Instruct-2507
|
| 28 |
+
Method: LoRA (PEFT)
|
| 29 |
+
Max sequence length: 256
|
| 30 |
+
Epochs: 1
|
| 31 |
+
Learning rate: 5e-05
|
| 32 |
+
LoRA: r=16, alpha=32
|
|
|
|
| 33 |
|
| 34 |
## Usage
|
|
|
|
|
|
|
| 35 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 36 |
from peft import PeftModel
|
| 37 |
import torch
|
| 38 |
|
| 39 |
base = "unsloth/Qwen3-4B-Instruct-2507"
|
| 40 |
+
adapter = "Mani124124/structeval-lora"
|
| 41 |
|
| 42 |
+
tokenizer = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
|
| 43 |
model = AutoModelForCausalLM.from_pretrained(
|
| 44 |
base,
|
| 45 |
torch_dtype=torch.float16,
|
| 46 |
device_map="auto",
|
| 47 |
+
trust_remote_code=True,
|
| 48 |
)
|
| 49 |
model = PeftModel.from_pretrained(model, adapter)
|
|
|
|
| 50 |
|
| 51 |
## Sources & Terms (IMPORTANT)
|
|
|
|
| 52 |
Training data: u-10bei/structured_data_with_cot_dataset_512_v5
|
|
|
|
|
|
|
|
|