JetBrains/Mellum-4b-dpo-python
Hugging Face
TEXT GENERATIONConcurrency Cost:1Model Size:4BQuant:BF16Ctx Length:32kPublished:Sep 30, 2025License:apache-2.0Architecture:Transformer0.0K Open Weights Warm

Mellum-4b-dpo-python is a 4 billion parameter, LLaMA-style causal language model developed by JetBrains, specifically fine-tuned for code completion in Python. Pre-trained on over 4 trillion tokens with an 8192-token context window, this model utilizes direct preference optimization (DPO) to generate more readable and useful code. It is designed for integration into professional developer tools like IDEs, AI-powered coding assistants, and for research in code understanding and generation.

Loading preview...

JetBrains Mellum-4b-dpo-python: DPO-Optimized Code Completion

Mellum-4b-dpo-python is a 4 billion parameter, LLaMA-style language model developed by JetBrains, specifically engineered for Python code completion. This model represents the third stage in JetBrains' training pipeline, following pretraining and Supervised Fine-Tuning (SFT), and has been further refined using Direct Preference Optimization (DPO) to enhance the readability and utility of its generated code.

Key Capabilities & Features

  • Python Code Completion: Highly specialized for generating high-quality, readable, and useful Python code.
  • LLaMA-style Architecture: Built on a LLaMA-style architecture, ensuring efficiency for both cloud and local inference environments (e.g., via vLLM, llama.cpp, or Ollama).
  • Extensive Pretraining: Pre-trained on over 4 trillion tokens across multiple programming languages, providing a robust foundation for code understanding.
  • Large Context Window: Supports an 8192-token context window, allowing it to process and generate code within larger contextual scopes.
  • DPO Fine-tuning: Leverages direct preference optimization to align code generation with human preferences for code quality.
  • Automatic Mixed Precision (AMP): Trained with bf16 precision, with the public Hugging Face version retaining this format.

Good For

  • Intelligent Code Suggestions: Ideal for integration into Integrated Development Environments (IDEs) to provide advanced code completion.
  • AI-Powered Coding Assistants: Suitable for building sophisticated tools that assist developers with coding tasks.
  • Code Understanding & Generation Research: A valuable resource for academic and industrial research into large language models for code.
  • Educational Applications: Can be used in learning environments to demonstrate and practice code generation.
  • Fine-tuning Experiments: Serves as a strong base model for further fine-tuning on specific code-related tasks or domains.