Text Generation
Transformers
English
qlora
lora
merged
structured-output
qwen3

llm-2025-model (Merged)

This repository provides a merged model fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth).

This repository contains the fully merged weights (base model + LoRA adapter). No separate base model or adapter loading is required.

Training Objective

This model is trained to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).

Loss is applied only to the final assistant output, while intermediate reasoning (Chain-of-Thought) is masked.

Training Configuration

  • Base model: Qwen/Qwen3-4B-Instruct-2507
  • Method: QLoRA (4-bit) → merged to full-precision weights
  • Max sequence length: 512
  • Epochs: 1
  • Learning rate: 1e-6
  • Warmup ratio: 0.1
  • Weight decay: 0.05
  • Batch size: 2 (× gradient accumulation 8 = effective 16)
  • LoRA: r=64, alpha=128
  • Precision: fp16 (T4 GPU)

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "your_id/your-merged-repo"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="auto",
)

messages = [{"role": "user", "content": "Convert this to JSON: name is Alice, age is 30"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.0, do_sample=False)

print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Sources & Terms (IMPORTANT)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kamy-dev/llm-2025-model

Adapter
(5723)
this model

Dataset used to train kamy-dev/llm-2025-model