Downloads · 30 days
12
16% of all-time downloads
Alogotron/Qwen2.5-3B-JSON-StructuredOutput
Qwen2.5-3B-JSON-StructuredOutput is a text generation model from Alogotron. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
A LoRA adapter that enhances Qwen2.5-3B-Instruct for extracting structured JSON from unstructured text.
Downloads · 30 days
12
16% of all-time downloads
All-time downloads
74
Public
Repo size
71.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors59.9 MB · 84%
From the Hugging Face model README
A LoRA adapter that enhances Qwen2.5-3B-Instruct for extracting structured JSON from unstructured text.
| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-3B-Instruct |
| Method | QLoRA (4-bit NF4) |
| LoRA Rank | 16 |
| LoRA Alpha | 32 |
| Target Modules | q,k,v,o,gate,up,down |
| Trainable Params | 29.9M (1.76%) |
| Training Examples | 20 curated |
| Epochs | 5 |
| Learning Rate | 5e-5 |
| Final Loss | 1.506 |
| Hardware | NVIDIA RTX 3090 x2 |
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch, json
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct", quantization_config=bnb, device_map="auto")
model = PeftModel.from_pretrained(model, "2reb/Qwen2.5-3B-JSON-StructuredOutput")
MIT