u-10bei/structured_data_with_cot_dataset_512_v2
Viewer • Updated • 3.93k • 153 • 1
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")How to use NTA2/qwen3-4b-structured-mix with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NTA2/qwen3-4b-structured-mix to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NTA2/qwen3-4b-structured-mix to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for NTA2/qwen3-4b-structured-mix to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="NTA2/qwen3-4b-structured-mix",
max_seq_length=2048,
)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