Downloads · 30 days
0
kamy-dev/llm-2025-model
llm-2025-model is a text generation model from kamy-dev. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository provides a merged model fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth).
Downloads · 30 days
0
Access
Public
Updated Mar 2, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.4 KB · 61%
From the Hugging Face model README
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.
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.
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))