All models

phimoe_tiny

Microsoft's 16-expert, top-2 routed Phi-3.5 mixture-of-experts language model, captured as a tiny config.

Language · 281 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (20 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
4.4M
Operations
281
Framework
PyTorch
Recurrent
No
Published
2024
Cited by
3,561 (as of 29 November 2026)
Authors
Marah Abdin, Jyoti Aneja, Hany Awadalla and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8166
Graph hash
606c8a57f98c6f2c962a862bc3d87d2f63a63c9f8d6bb0a03cd35ff4a5b17b04
Skeleton hash
086b652b408e34b119b4e96afa02bb81b108eef0c95a628d07f0db0c5c3d1bf8
Architecture hash
162412a8642fe21681efda7c33956f022afadff509c1eff050545a7539065e96
Diagram SHA-256
443237372f6eaff51aa340643258e97780232f8f9c722adf1bddfd206e7021a5
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCausalLM.from_config()

What it is

Phi-3.5-MoE is a lightweight open model built upon the datasets used for Phi-3, synthetic data and filtered publicly available documents, with a focus on very high-quality, reasoning dense data. It belongs to the phi-3.5 series, introduced to enhance multilingual, multimodal and long-context capabilities alongside phi-3.5-mini and phi-3.5-Vision. The Phi line's thesis is that a combination of LLM-based filtering of publicly available web data and LLM-created synthetic data enables performance in smaller language models that was typically seen only in much larger models.

The model adopts a Mixture-of-Experts architecture to selectively activate parts of modules on specific inputs to improve efficiency. The MoE layers serve as its feedforward modules, with top-2 routing among 16 expert networks, each a separate GLU network. For each token the router activates 2 of the 16 experts, so the 16×3.8B model has 6.6B activated parameters out of 42B. The sparse router is trained with the SparseMixer approach. It shares the tokenizer of phi-3-medium and phi-3-mini, with a vocabulary size of 32064. The Hub card describes it as a mixture-of-expert decoder-only Transformer model with 16x3.8B parameters and 6.6B active parameters when using 2 experts. It supports multilingual use and comes with a 128K token context length. Post-training combined supervised fine-tuning, proximal policy optimization and direct preference optimization.

Training used 4.9T tokens on 512 H100-80G GPUs over 23 days, between April and August 2024. The data includes newly created synthetic, textbook-like data for teaching math, coding, common sense reasoning and general knowledge of the world. Per the technical report, it achieves superior performance in language reasoning, math and code tasks compared to open-source models of similar scale such as Llama 3.1 and the Mixtral series, and is on par with Gemini-1.5-Flash and GPT-4o-mini. The card concedes that the model simply does not have the capacity to store too much factual knowledge, so users may experience factual incorrectness. The model is licensed under the MIT license. It is integrated in the official version of transformers starting from 4.46.0.

Key idea. Phi-3.5-MoE brings the Phi data recipe to a sparse 16-expert, top-2 routed mixture-of-experts decoder, so that 6.6B active parameters deliver language understanding and math comparable to much larger models.

  • phi-3.5-moe
  • phimoe
  • phi-3.5
  • phi-3
  • mixture of experts
  • moe
  • top2 routing
  • 16 experts
  • 6.6b active parameters
  • sparsemixer
  • microsoft
  • phi-3.5-moe-instruct
  • 128k context

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{abdin2024phi3technicalreporthighly,
      title={Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone}, 
      author={Marah Abdin and Jyoti Aneja and Hany Awadalla and Ahmed Awadallah and Ammar Ahmad Awan and Nguyen Bach and Amit Bahree and Arash Bakhtiari and Jianmin Bao and Harkirat Behl and Alon Benhaim and Misha Bilenko and Johan Bjorck and Sébastien Bubeck and Martin Cai and Qin Cai and Vishrav Chaudhary and Dong Chen and Dongdong Chen and Weizhu Chen and Yen-Chun Chen and Yi-Ling Chen and Hao Cheng and Parul Chopra and Xiyang Dai and Matthew Dixon and Ronen Eldan and Victor Fragoso and Jianfeng Gao and Mei Gao and Min Gao and Amit Garg and Allie Del Giorno and Abhishek Goswami and Suriya Gunasekar and Emman Haider and Junheng Hao and Russell J. Hewett and Wenxiang Hu and Jamie Huynh and Dan Iter and Sam Ade Jacobs and Mojan Javaheripi and Xin Jin and Nikos Karampatziakis and Piero Kauffmann and Mahoud Khademi and Dongwoo Kim and Young Jin Kim and Lev Kurilenko and James R. Lee and Yin Tat Lee and Yuanzhi Li and Yunsheng Li and Chen Liang and Lars Liden and Xihui Lin and Zeqi Lin and Ce Liu and Liyuan Liu and Mengchen Liu and Weishung Liu and Xiaodong Liu and Chong Luo and Piyush Madan and Ali Mahmoudzadeh and David Majercak and Matt Mazzola and Caio César Teodoro Mendes and Arindam Mitra and Hardik Modi and Anh Nguyen and Brandon Norick and Barun Patra and Daniel Perez-Becker and Thomas Portet and Reid Pryzant and Heyang Qin and Marko Radmilac and Liliang Ren and Gustavo de Rosa and Corby Rosset and Sambudha Roy and Olatunji Ruwase and Olli Saarikivi and Amin Saied and Adil Salim and Michael Santacroce and Shital Shah and Ning Shang and Hiteshi Sharma and Yelong Shen and Swadheen Shukla and Xia Song and Masahiro Tanaka and Andrea Tupini and Praneetha Vaddamanu and Chunyu Wang and Guanhua Wang and Lijuan Wang and Shuohang Wang and Xin Wang and Yu Wang and Rachel Ward and Wen Wen and Philipp Witte and Haiping Wu and Xiaoxia Wu and Michael Wyatt and Bin Xiao and Can Xu and Jiahang Xu and Weijian Xu and Jilong Xue and Sonali Yadav and Fan Yang and Jianwei Yang and Yifan Yang and Ziyi Yang and Donghan Yu and Lu Yuan and Chenruidong Zhang and Cyril Zhang and Jianwen Zhang and Li Lyna Zhang and Yi Zhang and Yue Zhang and Yunan Zhang and Xiren Zhou},
      year={2024},
      eprint={2404.14219},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2404.14219}, 
}