Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Model description

This checkpoint was trained with supervised fine-tuning (full weights, not LoRA) on 20,000 kept Apparel23 outfit bundles. Each training example maps a user query to a compact bundle of real product titles (title-only, no ASINs in the target).

Typical use: shopping assistants, outfit planners, or retrieval pipelines that need structured bundle output before product lookup.

Limitations:

  • Predictions are often category-plausible but not exact vs gold catalog items (10% exact bundle match on a 10-sample eval).
  • Performance drops when explicit item hints are removed from the query.
  • Trained on English apparel queries from the Apparel23 / Qwen-32B labeling pipeline.

Intended use

System prompt (training default)

markdown

You are an outfit bundle assistant for apparel shopping. Given a natural-language outfit request, return the matching bundle as compact product evidence for each selected item. Include the outfit role and product title for every item in the outfit.

Output format

text

### Item 1: dress
Mikarose Chloe Modest Chiffon Maxi Dress or Modest Bridesmaid Dress
### Item 2: footwear
Clarks Women's Danelly Sky Loafer

Supported roles: top, bottom, dress, outer_layer, footwear, accessory.

Quick start

python

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flavianv/qwen4b-apparel23-bundle-sft"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
system = (
"You are an outfit bundle assistant for apparel shopping. "
"Given a natural-language outfit request, return the matching bundle as "
"compact product evidence for each selected item. Include the outfit role "
"and product title for every item in the outfit."
)
messages = [
{"role": "system", "content": system},
{"role": "user", "content": "Casual summer outfit for women: denim shorts and ballet flats"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
with torch.inference_mode():
out = model.generate(**inputs, max_new_tokens=384, do_sample=False)
print(tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Training data

SplitRows
Train20,000
Test (held out)13,705

Training procedure

SettingValue
Base modelQwen/Qwen3-4B-Instruct-2507
MethodFull SFT
Epochs1 (2,500 steps)
Learning rate2e-5
Max length768
Batch size1 × grad accum 8 (effective 8)
LossAssistant-only
Seed42
HardwareNVIDIA B200 MIG 4g.90gb
Run IDqwen4b_apparel23_bundle_sft_20260616_142947

Training metadata is included in bundle_sft_metadata.json in this repo.

Evaluation

Greedy decoding (do_sample=False, max_new_tokens=384) unless noted.

Task metrics (perplexity)

SplitPerplexityMean token entropy*
Train (20k)3.121.19
Test (13.7k)3.461.25

*Entropy computed on a 256-row subsample per split (assistant tokens).

Generalization probes (post-SFT)

ProbeScore
Easy math90% (9/10)
Collapse suite87.5% (7/8)
Combined88.75

Zero-shot baseline (same 10 samples, seed=42)

Compared against Qwen/Qwen3-4B-Instruct-2507 with the same system prompt:

MetricZero-shotThis model
Bundle format compliance0/1010/10
Item count matches gold0/1010/10
Exact bundle match0/101/10
Mean title recall0.00.10

Zero-shot produces generic prose titles; this model learns the structured bundle schema and catalog-title style.

Example

Query: Casual summer outfit for women: denim shorts and ballet flats

Output (exact match on eval sample):

text

### Item 1: bottom
Levi's Women's 501 Original Shorts ​​​​​(Also Available in Plus)
### Item 2: footwear
Amazon Essentials Women's Belice Ballet Flat

Citation / lineage

License

This model inherits the license of the base Qwen3-4B-Instruct model. See the Qwen model card for terms.

Model provider

flavianv

Model tree

Base

Qwen/Qwen3-4B-Instruct-2507

Fine-tuned

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today