daichira/structured-hard-sft-4k
Viewer • Updated • 4k • 167 • 2
How to use NTA2/qwen3-4b-structured-mix with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen3-4b-instruct-2507-unsloth-bnb-4bit")
model = PeftModel.from_pretrained(base_model, "NTA2/qwen3-4b-structured-mix")This is a LoRA adapter fine-tuned on a custom dataset optimized for structured output tasks (JSON/XML). The model was trained using Unsloth and QLoRA on a Tesla T4 GPU.
u-10bei/structured_data_with_cot_dataset_512_v2daichira/structured-hard-sft-4kfrom peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = "Qwen/Qwen3-4B-Instruct-2507"
# Replace with your username/repo
adapter_name = "NTA2/qwen3-4b-structured-mix"
model = AutoModelForCausalLM.from_pretrained(base_model, load_in_4bit=True, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_name)
tokenizer = AutoTokenizer.from_pretrained(base_model)
Base model
Qwen/Qwen3-4B-Instruct-2507