Thank you for your interest in contributing to APEX-1! This document provides guidelines for contributing.
By participating, you agree to abide by our Code of Conduct.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USER/APEX-1.git - Create a virtual environment:
python -m venv .venv && source .venv/bin/activate - Install dev dependencies:
pip install -e ".[all]" - Install pre-commit hooks:
pre-commit install
- PEP 8 compliance is mandatory
- Black formatter with
--line-length=100 - isort for import ordering (profile: black)
- Type hints required on all function signatures
- Docstrings required on all public classes and functions (Google style)
- Maximum line length: 100 characters
We use Conventional Commits:
feat: add new MoE expert routing strategy
fix: correct RoPE cache indexing for batch > 1
docs: update training pipeline documentation
test: add YaRN scaling property tests
refactor: simplify attention mask builder
perf: optimize MoE token dispatch with scatter
- Create a feature branch:
git checkout -b feat/your-feature - Make changes with passing tests
- Run the full test suite:
pytest tests/ -v - Run linters:
black . && isort . && flake8 . && mypy apex/ - Push and open a PR against
main - Describe your changes and link any relevant issues
- Every new module must have corresponding unit tests in
tests/ - All tests must pass:
pytest tests/ -v - Maintain or improve code coverage
- Test edge cases (empty inputs, single tokens, batch size 1)
- Create the module in the appropriate
apex/subdirectory - Add exports to the package
__init__.py - Write unit tests in
tests/ - Update
CHANGELOG.md - Add docstrings with usage examples
source .venv/bin/activate
pytest tests/ -v # all tests
pytest tests/test_all.py -k "norm" # specific tests
pytest tests/ --cov=apex # with coverageJoin our Discord server or open a GitHub Issue for questions and discussions.