FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generation
On the map: Mixture-of-experts → MoE large language models
Abstract (arXiv)
Despite rapid progress in LLM-based code generation, existing models are predominantly trained on imperative languages, leaving functional programming languages (FPLs) such as Haskell, OCaml, and Scala chronically underexplored, with even frontier models performing substantially worse on FPLs. Fine-tuning is a natural remedy, but our experiments show that per-language fine-tuning fails to capture shared functional abstractions, while merged multi-language fine-tuning introduces cross-language interference. To address this, we introduce FPMoE, a lightweight, open-source code generation model built on a sparse Mixture-of-Experts (MoE) architecture with three language-specific routed experts (one each for Haskell, OCaml, and Scala) and a shared expert that captures cross-language functional patterns such as monadic reasoning and type-directed programming. This design resolves both failure modes simultaneously: dedicated experts eliminate interference, while the shared expert preserves abstractions that per-language models miss. On FPEval, FPMoE substantially outperforms fine-tuned baselines and, with only 3B active parameters, matches the performance of much larger models including DeepSeek-Coder-6.7B, Qwen2.5-Coder-14B-Instruct, and Qwen3-Coder-30B-A3B.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 8 of its 24 references that are in the map. First posted on arXiv 27 May 2026.
Builds on
8 of 24 references.
Closest ancestors · 2
Same direction, newest first
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models11 Jan
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer23 Jan
Other references · 6
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Studycited by 7
- 2024Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generationcited by 5
- 2026Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programmingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfer
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligence
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus
- 2025MultiPL-MoE: Multi-Programming-Lingual Extension of Large Language Models through Hybrid Mixture-of-Experts
- 2024Assessing Code Generation with Intermediate Languages
- 2023L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Models