Run this model with HF Jobs
Run morizon/qwen3-4b-structured-output-lora_0712_run_4-step150 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/morizon/qwen3-4b-structured-output-lora_0712_run_4-step150. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/morizon/qwen3-4b-structured-output-lora_0712_run_4-step150 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/morizon/qwen3-4b-structured-output-lora_0712_run_4-step150. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/morizon/qwen3-4b-structured-output-lora_0712_run_4-step150. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use morizon/qwen3-4b-structured-output-lora_0712_run_4-step150 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use morizon/qwen3-4b-structured-output-lora_0712_run_4-step150 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, "morizon/qwen3-4b-structured-output-lora_0712_run_4-step150") - Notebooks
- Google Colab
- Kaggle
qwen3-4b-structured-output-lora_0712_run_4 — step 150
このリポジトリにはLoRAアダプタのみが含まれています。
ベースモデル Qwen/Qwen3-4B-Instruct-2507 は別途読み込む必要があります。
学習目的
最良YAML LoRAをアンカーに、方向・教師出力長を層別化したJSON-targetとnative Text→TOMLを各約4%だけ追加する短いStage-2継続学習によって、YAMLを保持しながらJSON/TOMLを改善できるか。
このRunは、YAML-onlyで得られた強いLoRAを初期値にしたStage-2継続学習です。
初期アダプタは morizon/qwen3-4b-structured-output-lora_0710_run_1 です。新しいLoRAを重ねず、
同じLoRAパラメータへ小さな補正を加えています。
データ
YAML中心ベースデータ
- データセット:
daichira/structeval-t-sft-hq-yaml-cleaned - リビジョン:
e73a755d3b50bd3ac38c99c1ede87ca9b3139cba - 最終教師トークン比率: 92.0452%
- ライセンス: Apache-2.0
層別JSON-targetリプレイ
- 取得元:
daichira/structured-5k-mix-sft - リビジョン:
740e82f5bb5ae31c9b0f9c2fa15f78bbcaf3dbe2 - フィルター:
- category:
C_JSON - subcategories:
['csv_to_json', 'xml_to_json', 'toml_to_json', 'yaml_to_json', 'text_to_json'] - direction weights:
{'csv_to_json': 0.28, 'xml_to_json': 0.26, 'toml_to_json': 0.22, 'yaml_to_json': 0.2, 'text_to_json': 0.04}
- category:
- 選択行数: 51
- 選択時比率: 4.1137%
- 最終教師トークン比率: 3.9489%
- 方向別選択数:
{'text_to_json': 14, 'toml_to_json': 8, 'yaml_to_json': 7, 'xml_to_json': 11, 'csv_to_json': 11}
native Text→TOMLリプレイ
- 取得元:
daichira/structured-5k-mix-sft - リビジョン:
740e82f5bb5ae31c9b0f9c2fa15f78bbcaf3dbe2 - 選択行数: 333
- 目標最終教師トークン比率: 4.0000%
- 実際の最終教師トークン比率: 4.0059%
- 由来:
{'native_text_to_toml': 333} - 長さ選択サイクル:
['short', 'short', 'short', 'short', 'medium', 'medium', 'long']
公開TOML問題と入力方向を揃えるため、変換で作ったYAML→TOMLではなく、 元データセットのnative Text→TOMLをそのまま使用しています。
追加データは次の条件を満たす例だけを使用しています。
- TOMLを
tomllibで解析可能 - 説明文、コードフェンス、思考タグを含まない
- チャットテンプレート適用後の完全シーケンスが 2048トークン以内
追加データセットのライセンスはCC-BY-4.0です。
学習設定
- ベースモデル:
Qwen/Qwen3-4B-Instruct-2507 - Stage-1初期アダプタ:
morizon/qwen3-4b-structured-output-lora_0710_run_1 - 手法: Unslothを用いた4ビットQLoRA
- 最大シーケンス長: 2048
- 学習予算方式:
steps - 要求エポック数: None
- 実際の最終ステップ数: 300
- 実際の最終エポック: 2.0981
- ウォームアップ比率: 0.05
- 実際のウォームアップステップ数: 15
- 学習率: 3e-07
- スケジューラー: cosine
- 重み減衰: 0.05
- 実効バッチサイズ: 16
- LoRAランク: 64
- LoRAアルファ: 128
- 精度: BF16
評価データ方針
public_150.jsonは読み込まず、学習、追加データ構築、
チェックポイント選択、早期終了のいずれにも使用していません。
使用方法
import torch
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
)
from peft import PeftModel
base_model_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "morizon/qwen3-4b-structured-output-lora_0712_run_4-step150"
tokenizer = AutoTokenizer.from_pretrained(
base_model_id
)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(
base_model,
adapter_id,
)
再現性
このリポジトリには、dataset_manifest.json、
training_summary.json、選択済みIDファイルが含まれます。
データセットの正確なリビジョン、シード、トークン統計、
方向・長さを層別化した追加データ選択結果、実際の最終ステップを確認できます。
利用条件
利用者は、ベースモデルおよび各データセットのライセンスと 利用条件を確認してください。
チェックポイント情報
- 学習ステップ: 150
- 実際の最終ステップ: 300
- 最終モデルか: いいえ
- 学習データ、データ分割、シード、学習率スケジュールは、 同じ実験内の他のチェックポイントと共通です。
- 公開150件は、学習、チェックポイント作成、 チェックポイント選択には使用していません。
- Downloads last month
- 4
Model tree for morizon/qwen3-4b-structured-output-lora_0712_run_4-step150
Base model
Qwen/Qwen3-4B-Instruct-2507