Downloads · 30 days
3
8% of all-time downloads
satoyutaka/LLM2025_SFT10
LLM2025_SFT10 is a machine learning model from satoyutaka. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using the PEFT library on Apple Silicon (M4).
Downloads · 30 days
3
8% of all-time downloads
All-time downloads
37
Public
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using the PEFT library on Apple Silicon (M4).
This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is specifically trained to improve structured output accuracy (JSON / XML) for high-difficulty tasks.
A key feature of this model is the "No-Preamble" training: the model is trained to output JSON/XML starting directly with { or < characters, minimizing irrelevant introductory text ("Here is your JSON...") to ensure compatibility with strict parsers.
To ensure high-quality structured outputs, the training data underwent a specialized preparation pipeline:
<root> or {.bert-base-multilingual-cased. Randomly masked non-critical words in instructions and predicted alternatives to improve the model's robustness against different phrasing of tasks.from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "satoyutaka/LLM2025_SFT10"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
このリポジトリは、Qwen/Qwen3-4B-Instruct-2507 をベースモデルとし、Apple Silicon (M4) 環境の PEFT ライブラリを用いてファインチューニングされた LoRA アダプターを提供します。
【重要】本リポジトリには LoRA アダプターの重みのみが含まれています。ベースモデルは別途ロードする必要があります。
このアダプターは、高難度なタスクにおける構造化出力(JSON / XML)の精度向上を目的としてトレーニングされています。
本モデルの大きな特徴は、**「前置きの排除(No-Preamble)」**学習です。AIが回答の冒頭に不要な文章(例:「はい、承知しました。以下がJSONです:」)を書かず、直接 { や < から書き始めるように訓練されており、厳格なパースを必要とするシステムとの互換性を最大化しています。
高品質な構造化出力を実現するため、学習データに対して以下の特別な前処理を行っています。
<root> や { から書き始めるように調整しています。bert-base-multilingual-cased を使用し、指示文の単語をランダムに置換することで指示のバリエーションを増やしました。これにより、多少異なる命令のされ方に対しても、モデルが安定して同じ形式を出力できるよう「頑健性」を高めています。from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "satoyutaka/LLM2025_SFT10"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)