u-10bei/structured_data_with_cot_dataset_512_v2
Viewer • Updated • 3.93k • 146 • 1
How to use tropico0313/my-lora-test 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, "tropico0313/my-lora-test")How to use tropico0313/my-lora-test 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 tropico0313/my-lora-test 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 tropico0313/my-lora-test to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tropico0313/my-lora-test to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="tropico0313/my-lora-test",
max_seq_length=2048,
)This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit) with Unsloth.
⚠️ This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is trained to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
Loss is applied only to the final assistant output (assistant-only loss).
Chain-of-Thought masking: Enabled
Learning mode: after_marker
Rule-based normalization was applied before training:
json / yaml / xml / toml)Dedupe enabled: Yes
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "tropico0313/my-lora-test"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
Sources & Terms (IMPORTANT)
Training dataset: u-10bei/structured_data_with_cot_dataset_512_v2
Dataset License: MIT License.
Users must comply with the MIT license (including copyright notice)
and the base model's original terms of use.
Base model
Qwen/Qwen3-4B-Instruct-2507