Instructions to use UNI-PIC/Retail-TW-Qwen3.5-4B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UNI-PIC/Retail-TW-Qwen3.5-4B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UNI-PIC/Retail-TW-Qwen3.5-4B-Base") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("UNI-PIC/Retail-TW-Qwen3.5-4B-Base") model = AutoModelForMultimodalLM.from_pretrained("UNI-PIC/Retail-TW-Qwen3.5-4B-Base", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use UNI-PIC/Retail-TW-Qwen3.5-4B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UNI-PIC/Retail-TW-Qwen3.5-4B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UNI-PIC/Retail-TW-Qwen3.5-4B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UNI-PIC/Retail-TW-Qwen3.5-4B-Base
- SGLang
How to use UNI-PIC/Retail-TW-Qwen3.5-4B-Base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "UNI-PIC/Retail-TW-Qwen3.5-4B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UNI-PIC/Retail-TW-Qwen3.5-4B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "UNI-PIC/Retail-TW-Qwen3.5-4B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UNI-PIC/Retail-TW-Qwen3.5-4B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UNI-PIC/Retail-TW-Qwen3.5-4B-Base with Docker Model Runner:
docker model run hf.co/UNI-PIC/Retail-TW-Qwen3.5-4B-Base
Retail-TW-Qwen3.5-4B-Base
Retail-TW-Qwen3.5-4B-Base is a continually pre-trained (CPT) checkpoint of Qwen/Qwen3.5-4B-Base, adapted to Taiwan (Traditional Chinese) retail and e-commerce knowledge.
Note: This is a base checkpoint. It is neither instruction-tuned nor safety-aligned, and it is intended as a foundation for downstream supervised fine-tuning (SFT).
Model Details
| Developed by | President Information Corp. (統一資訊, PIC) and Uni-President Information Philippines Corp. (UNI-PIPC) |
| Model type | Decoder-only causal language model (hybrid Gated DeltaNet–Gated Attention, as in Qwen3.5) |
| Base model | Qwen/Qwen3.5-4B-Base |
| Adaptation method | Continual pre-training (CPT) |
| Domain | Taiwan retail and e-commerce |
| Languages | Traditional Chinese (zh-TW, primary), Simplified Chinese (zh-CN), English (en) |
| Training framework | ms-swift |
| Training hardware | 4× NVIDIA H100 96 GB |
| License | Apache 2.0 |
Key Features
- 🎯 Retail-Domain Adaptation: Continual pre-training on 2.56B tokens, including 7.30M proprietary Taiwan product listings across 15 retail categories.
- 🇹🇼 Taiwan Retail Knowledge: Synthetic brand and contributor wikis, together with name variants (aliases, foreign-language names, Zhuyin and Pinyin spellings, and typographical errors), generated with NVIDIA NeMo Data Designer.
- 🌐 General-Language Retention: A replay mix of general-domain text (Wikipedia in zh-TW, zh-CN, and en, plus en↔zh translation pairs) preserves general and multilingual language modeling ability.
Training Data
Data Mixture
Token counts are computed with the base model tokenizer. A 0.1% split of each dataset is held out for validation.
Token Mix at a Glance
Product Listings
The product listings are proprietary Taiwan retail data comprising title, brand, category, price, and description. The data was cleaned with NVIDIA NeMo Curator, which removed SEO filler text, emojis, contact details, hyperlinks, and policy terms, followed by exact and fuzzy deduplication.
Category distribution (15 categories, share of listings)
Evaluation
Evaluation Setup
The CPT model is compared against its base model, Qwen/Qwen3.5-4B-Base. Statistical significance is assessed with a 95% paired bootstrap over items (1,000 resamples):
🟢 significant improvement · 🔴 significant degradation · ⚪ no significant difference
Language Modeling
Metric: Bits per byte (BPB); lower is better.
Held-Out Domain Data
General-Domain Replay Data
Knowledge Probes
Metric: PMI-normalized accuracy, which adjusts for the prior likelihood of each option; higher is better.
Setup: Zero-shot, five-option multiple choice (chance level: 20%). Each option is scored by its log-likelihood as a continuation of the prompt.
Data: Internal probe sets derived from the retail training data. Alias and wiki-fact labels are LLM-derived. Scores are not comparable with results reported for other models.
Summary by Probe Set
Product and Work Knowledge
These probes test knowledge about products and about the works (books, music, and other media) that products represent.
Retail Wiki Knowledge
A contributor is a credited person or organization on a product or work, such as an author, singer, artist, illustrator, translator, editor, or publisher. Brand origin is the country or region where the brand was founded.
Name Variants
A name variant is an alternative form of a brand or contributor name: a foreign-language alias, a different script, a phonetic spelling, or a typographical error. The canonical name is the standard form of the name.
Query Normalization (Variant → Canonical Name). Given a noisy variant of a brand or contributor name, the model selects the canonical name. A typographical error is either a Latin-letter typo or a same-sound Chinese character substitution.
Variant Generation (Canonical Name → Variant). Given a canonical brand or contributor name, the model selects the correct variant.
Citation
@misc{retailtwqwen354bbase,
title = {Retail-TW-Qwen3.5-4B-Base},
author = {President Information Corp. (PIC) and Uni-President Information Philippines Corp. (UNI-PIPC)},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/UNI-PIC/Retail-TW-Qwen3.5-4B-Base}
}
Contact
- Taiwan: pic.net.tw/contactUs
- Philippines: pic.net.ph/about/contactUs
- Downloads last month
- 15
Model tree for UNI-PIC/Retail-TW-Qwen3.5-4B-Base
Base model
Qwen/Qwen3.5-4B-Base