pokutuna/llm2025-basic-exp018-003

Fine-tuned model based on Qwen/Qwen3-4B-Instruct-2507 for structured output generation (JSON / YAML / XML / TOML / CSV).

This repository contains model weights and tokenizer.

Training

  • Full fine-tuning (SFT) with NEFTune noise regularization
  • 34,415 samples with rule-based format augmentation and camelCase key variation
  • TOML/XML oversampled to address weaker performance

Training Data

All datasets are from the LLM2025 competition allowed list.

  • u-10bei/StructuredOutputPractice_Train_2500
  • u-10bei/StructuredOutputPractice_Train_2500_v2
  • u-10bei/StructuredOutputPractice_Train_512
  • u-10bei/StructuredOutputPractice_Train_512_v2
  • u-10bei/StructuredOutputPractice_Train_512_v4
  • u-10bei/StructuredOutputPractice_Train_512_v5

Preprocessing:

  • Removed CoT (Chain-of-Thought) reasoning; train on structured output only
  • Generated cross-format conversion pairs (JSON/YAML/TOML/XML/CSV)
  • Added camelCase key name variants
  • Fixed missing root element in XML→JSON conversions
  • Filtered out rows with invalid XML tag names (numeric prefixes)
  • 2x oversampling of TOML/XML to balance format distribution

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "pokutuna/llm2025-basic-exp018-003"

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

messages = [{"role": "user", "content": "Convert the following text to JSON: ..."}]
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=1024, do_sample=False)

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

License

  • Model: Apache-2.0 (inherited from base model)
Downloads last month
19
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for pokutuna/llm2025-basic-exp018-003

Finetuned
(2356)
this model