Instructions to use SnifferCaptain/YModel3.2-fm-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SnifferCaptain/YModel3.2-fm-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SnifferCaptain/YModel3.2-fm-1B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("SnifferCaptain/YModel3.2-fm-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SnifferCaptain/YModel3.2-fm-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SnifferCaptain/YModel3.2-fm-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SnifferCaptain/YModel3.2-fm-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SnifferCaptain/YModel3.2-fm-1B
- SGLang
How to use SnifferCaptain/YModel3.2-fm-1B 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 "SnifferCaptain/YModel3.2-fm-1B" \ --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": "SnifferCaptain/YModel3.2-fm-1B", "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 "SnifferCaptain/YModel3.2-fm-1B" \ --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": "SnifferCaptain/YModel3.2-fm-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SnifferCaptain/YModel3.2-fm-1B with Docker Model Runner:
docker model run hf.co/SnifferCaptain/YModel3.2-fm-1B
this file is generated by Qwen3.8-27B under human supervision
ๆจกๅๆ่ฟฐ
YModel3.2-fm-1B ๆฏ YModel3.2 ๅฎถๆ็ 1B ๅๆฐๅบ็กๆ้ๆจกๅ๏ผfoundation weights๏ผใ
ๆจกๅ็ป่
| ้กน็ฎ | ๅผ |
|---|---|
| ๆถๆ | YModel3.2 |
| Scale level | 1 |
| ๅๆฐ้ | 1,120,343,553๏ผ1.12B๏ผๅซๅตๅ ฅ๏ผ |
| Hidden size | 1024 |
| ๅๆฐ | 31๏ผ6 ไธช FullBlock + 25 ไธช GroupBlock๏ผ |
| layer pattern | fgggggfgggggfgggggfgggggfgggggf |
| ๆณจๆๅๅคด / KV ๅคด | 8 / 2๏ผGQA๏ผ |
| ๅคด็ปดๅบฆ | 256 |
| Group size | 8๏ผๅบๅฎๅ็ป๏ผ |
| FFN | SwiGLU + SEBlock๏ผintermediate 3072 |
| DCP | dynamic compression probe๏ผprobe hidden 1024๏ผ๏ผuse_dcp=false๏ผๅ็ปๅบๅฎ๏ผprobe ๆ้ไฟ็ |
| Sengram | bucket 16384 / topk 12 |
| ่ฏ่กจ | 151,669๏ผQwen3 tokenizer๏ผtied embeddings๏ผ |
| ไธไธๆ | 8192 |
| ็ฒพๅบฆ | bfloat16 |
Group Attn ไธ Token Superposition
YModel3.2-fm ็ group attn ไธป่ฆๅ้ดไบ่ฎบๆ Efficient Pre-Training with Token Superposition๏ผBowen Peng, Thรฉo Gigant, Jeffrey Quesnelle, arXiv:2605.06546๏ผ็ๆๆณ๏ผๅฐ่ฟ็ปญ token ๅ็ป๏ผsuperpose๏ผไธบไธไธชๆดไฝ่ฟ่ก้ซๆๅค็ใ่ฎบๆๆๅบ็ Token-Superposition Training๏ผTST๏ผๆๅคไธช่ฟ็ปญ token ๅๅนถไธบไธไธช bagใไปฅ multi-hot ไบคๅ็ต๏ผMCE๏ผ็ฎๆ ่ฎญ็ป๏ผๅ็ป recovery ้ถๆฎตๅๅฐๆ ๅ่ฎญ็ป๏ผๅจ 10B A1B ่งๆจกไธๆฅๅไบ่ณๅค 2.5x ็้ข่ฎญ็ปๆถ้ด็ผฉๅใๆฌๆจกๅ็ group attn ๆฏๅ ถๆถๆไพง็ๅปถไผธ๏ผGroupBlock ไปฅ group_size=8 ็ๅ็ปๅค็ token๏ผFullBlock / GroupBlock ๆ f/g pattern ไบค้ๆๅธ๏ผๅนถ็จ F2G / G2F ๅฑๅฎๆ็ปไธๅฎๆด token ๆตไน้ด็ไฟกๆฏ่ฝฌๆขใ
่ฎญ็ป็ป่
่ฎญ็ปๅๅไธช้ถๆฎตๅฎๆ๏ผbf16๏ผAdamW ไธ Muon ๅไผๅๅจ๏ผ๏ผ
- ้ข่ฎญ็ป๏ผcausal LM๏ผ1024 ไธไธๆ๏ผ8.52B Tokens๏ผๅป็ปๅตๅ ฅไธ lm_headใ
- SFT๏ผUltraData SFT + Instant ๆททๅ่ฏญๆ๏ผ8192 ไธไธๆ๏ผ้ข่ฎญ็ปไธบ 1024๏ผๆญค้ถๆฎต้ฆๆฌกๆฉๅฑๅฐ 8192๏ผ๏ผMuon 5e-6 / AdamW 5e-7๏ผๅตๅ ฅไธ lm_head ๅป็ป๏ผ4.14B Tokensใ
- ่ธ้ฆ๏ผteacher ไธบ Qwen3-0.6B๏ผCE=0.5 / KL=0.5๏ผtemperature=1.0๏ผ๏ผๅบๅฎ group_size=4๏ผDCP probe ๅป็ป๏ผๅๅธ่พ ๅฉ็็ฃๅ ๅผบ่ณ 1e-1๏ผMuon 1e-4 / AdamW 1e-5๏ผ0.98B Tokensใ
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "SnifferCaptain/YModel3.2-fm-1B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype="auto",
)
ๅฏน่ฏๆ ผๅผ
ๆจกๅไฝฟ็จ ChatML ้ฃๆ ผ็ๅฏน่ฏ่พน็ใๅฎๆด็่พๅ ฅๅฏไปฅๅๆ๏ผ
<|im_start|>system
{system prompt}<|im_end|>
<|im_start|>user
{user content}<|im_end|>
<|im_start|>assistant
<think>{thinking_definitions}
{reasoning content}</think>
{assistant content}<|im_end|>
ๅ
ถไธญ๏ผ{thinking_definitions} ๆฏ็ดง่ทๅจ <think> ๅ้ข็็ฌฌไธ่กๆงๅถไฟกๆฏ๏ผไธๆฏๆ่ๆญฃๆใๅฎๅฏไปฅๆฏ๏ผ
juice = 1.23๏ผๆ่้ข็ฎๆ็คบ๏ผๅฏไปฅไฝฟ็จๅฐๆฐใstructured = true๏ผ่กจ็คบ็ปๆๅๆ่ใjuice = 1.23; structured = true๏ผๅๆถๆๅฎ้ข็ฎๅ็ปๆๅๆ่ใ
ๆงๅถ่ก็ปๆๅๆข่ก๏ผๅๅๅ
ฅ {reasoning content}๏ผๆ่็ปๆไฝฟ็จ </think>๏ผไนๅ็ฉบไธ่กๅๆ็ป็ {assistant content}ใ่ช็ฑๅฝขๅผๆ่ๅฏไปฅ็็ฅ structured๏ผไนๅฏไปฅๆพๅผๅๆ structured = falseใๅฆๆๆฒกๆๆงๅถๅญๆฎต๏ผไฟ็็ฉบ็ๆงๅถ่กๅณๅฏ๏ผ
<think>
{reasoning content}
</think>
ๆฏไธช่ง่ฒ้ฝไฝฟ็จ <|im_start|>role\n...<|im_end|> ่พน็๏ผsystem ๅ user ๅ
ๅฎนไธไผๆพๅ
ฅ <think>๏ผๆ่ไธๆ็ปๅ็ญๅชๅฑไบ assistant ๆถๆฏใ
ๆณจๆ๏ผ่ฏฅๆถๆ็ generate() ไธบๆจกๅ่ชๅฎไนๅฎ็ฐ๏ผไธไฝฟ็จ KV cache๏ผๆฏๆญฅ้็ฎๅฎๆดๅ็ผ๏ผ๏ผ้ฟๅบๅ็ๆไผ็ธๅบๅๆ
ขใ
Notes
- ๅ
ๅซ่ชๅฎไนไปฃ็ ๏ผ
modeling_ymodel32.py๏ผ่ชๅ ๅซ๏ผ้ ็ฝฎ็ฑป + ๅฎๆดๆถๆ๏ผใymodel32_eval.py๏ผๅ่ๅฎ็ฐ๏ผ๏ผๅ ่ฝฝ้trust_remote_code=Trueใ - ๆ้ไธบๅไธช
model.safetensors๏ผbfloat16๏ผ็บฆ 2.55GB๏ผใ - ๅบๅๅๆฐไธ็คบไพ่พๅบๅพ ่กฅๅ ใ
Model Description
YModel3.2-fm-1B is the 1B-parameter foundation-weights model of the YModel3.2 family.
Model Details
| Item | Value |
|---|---|
| Architecture | YModel3.2 |
| Scale level | 1 |
| Parameters | 1,120,343,553 (1.12B, incl. embeddings) |
| Hidden size | 1024 |
| Blocks | 31 (6 FullBlocks + 25 GroupBlocks) |
| Layer pattern | fgggggfgggggfgggggfgggggfgggggf |
| Attention heads / KV heads | 8 / 2 (GQA) |
| Head dim | 256 |
| Group size | 8 (fixed grouping) |
| FFN | SwiGLU + SEBlock, intermediate 3072 |
| DCP | dynamic compression probe (probe hidden 1024); use_dcp=false, fixed grouping, probe weights retained |
| Sengram | bucket 16384 / topk 12 |
| Vocab | 151,669 (Qwen3 tokenizer, tied embeddings) |
| Context | 8192 |
| Dtype | bfloat16 |
Group Attn and Token Superposition
The group attn of YModel3.2-fm is inspired primarily by Efficient Pre-Training with Token Superposition (Bowen Peng, Thรฉo Gigant, Jeffrey Quesnelle, arXiv:2605.06546): superposing contiguous tokens into a group and processing them as a single unit. The paper's Token-Superposition Training (TST) merges many contiguous tokens into one bag and trains with a multi-hot cross-entropy (MCE) objective, then recovers to standard training, reporting up to a 2.5x pre-training time reduction at 10B A1B scale. This model's group attn is the architectural extension of that idea: GroupBlocks process tokens in groups of 8, FullBlocks and GroupBlocks are interleaved per the f/g pattern, and F2G / G2F layers transfer information between the group and full-token streams.
Training Details
Training ran in four stages (bf16, AdamW + Muon dual optimizers):
- Pre-training: causal LM, 1024 context, 8.52B Tokens, embeddings and lm_head frozen.
- SFT: mixed UltraData SFT + Instant corpus, 8192 context (pre-training used 1024, so 8192 is new context here), Muon 5e-6 / AdamW 5e-7, embeddings and lm_head frozen, 4.14B Tokens.
- Distillation: teacher Qwen3-0.6B (CE=0.5 / KL=0.5, temperature 1.0), fixed group_size=4, DCP probe frozen, hash auxiliary supervision raised to 1e-1, Muon 1e-4 / AdamW 1e-5, 0.98B Tokens.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "SnifferCaptain/YModel3.2-fm-1B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype="auto",
)
Chat Format
The model uses ChatML-style turn boundaries. A complete input can be written as:
<|im_start|>system
{system prompt}<|im_end|>
<|im_start|>user
{user content}<|im_end|>
<|im_start|>assistant
<think>{thinking_definitions}
{reasoning content}</think>
{assistant content}<|im_end|>
{thinking_definitions} is the first control line immediately after <think>, not the reasoning body. It may be:
juice = 1.23for a numeric reasoning-budget hint;structured = trueto mark structured reasoning; orjuice = 1.23; structured = trueto provide both fields.
Terminate the control line with a newline, then place the reasoning in {reasoning content}. Close it with </think>, leave one blank line, and put the final answer in {assistant content}. For free-form reasoning, structured may be omitted or written as structured = false. If no control field is needed, keep an empty control line:
<think>
{reasoning content}
</think>
Note: this architecture ships a custom generate() implementation without KV caching (the full prefix is recomputed each step), so long-sequence generation is correspondingly slower.
Notes
- Custom code included:
modeling_ymodel32.py(self-contained: config class + full architecture) andymodel32_eval.py(reference implementation); load withtrust_remote_code=True. - Weights: single
model.safetensors(bfloat16, ~2.55GB). - Benchmark scores and sample outputs: to be added.
- Downloads last month
- 64